~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

1.7.1 by Sebastian Dröge
Import upstream version 2.18.6
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
2
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1.11.1 by Sebastian Dröge
Import upstream version 2.19.6
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
# Configure paths for GLIB
23
# Owen Taylor     1997-2001
24
25
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
27
dnl gthread, or gio is specified in MODULES, pass to pkg-config
28
dnl
29
AC_DEFUN([AM_PATH_GLIB_2_0],
30
[dnl 
31
dnl Get the cflags and libraries from pkg-config
32
dnl
33
AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
34
		    , enable_glibtest=yes)
35
36
  pkg_config_args=glib-2.0
37
  for module in . $4
38
  do
39
      case "$module" in
40
         gmodule) 
41
             pkg_config_args="$pkg_config_args gmodule-2.0"
42
         ;;
43
         gmodule-no-export) 
44
             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
45
         ;;
46
         gobject) 
47
             pkg_config_args="$pkg_config_args gobject-2.0"
48
         ;;
49
         gthread) 
50
             pkg_config_args="$pkg_config_args gthread-2.0"
51
         ;;
52
         gio*) 
53
             pkg_config_args="$pkg_config_args $module-2.0"
54
         ;;
55
      esac
56
  done
57
58
  PKG_PROG_PKG_CONFIG([0.16])
59
60
  no_glib=""
61
62
  if test "x$PKG_CONFIG" = x ; then
63
    no_glib=yes
64
    PKG_CONFIG=no
65
  fi
66
67
  min_glib_version=ifelse([$1], ,2.0.0,$1)
68
  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
69
70
  if test x$PKG_CONFIG != xno ; then
71
    ## don't try to run the test against uninstalled libtool libs
72
    if $PKG_CONFIG --uninstalled $pkg_config_args; then
73
	  echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
74
	  enable_glibtest=no
75
    fi
76
77
    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
78
	  :
79
    else
80
	  no_glib=yes
81
    fi
82
  fi
83
84
  if test x"$no_glib" = x ; then
85
    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
86
    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
87
    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
88
89
    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
90
    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
91
    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
92
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
93
    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
94
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
95
    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
96
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
97
    if test "x$enable_glibtest" = "xyes" ; then
98
      ac_save_CFLAGS="$CFLAGS"
99
      ac_save_LIBS="$LIBS"
100
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
101
      LIBS="$GLIB_LIBS $LIBS"
102
dnl
103
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
104
dnl checks the results of pkg-config to some extent)
105
dnl
106
      rm -f conf.glibtest
107
      AC_TRY_RUN([
108
#include <glib.h>
109
#include <stdio.h>
110
#include <stdlib.h>
111
112
int 
113
main ()
114
{
115
  int major, minor, micro;
116
  char *tmp_version;
117
1.7.2 by Emilio Pozuelo Monfort
Import upstream version 2.18.7
118
  fclose (fopen ("conf.glibtest", "w"));
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
119
120
  /* HP/UX 9 (%@#!) writes to sscanf strings */
121
  tmp_version = g_strdup("$min_glib_version");
122
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
123
     printf("%s, bad version string\n", "$min_glib_version");
124
     exit(1);
125
   }
126
127
  if ((glib_major_version != $glib_config_major_version) ||
128
      (glib_minor_version != $glib_config_minor_version) ||
129
      (glib_micro_version != $glib_config_micro_version))
130
    {
131
      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
132
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
133
             glib_major_version, glib_minor_version, glib_micro_version);
134
      printf ("*** was found! If pkg-config was correct, then it is best\n");
135
      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
136
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
137
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
138
      printf("*** required on your system.\n");
139
      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
140
      printf("*** to point to the correct configuration files\n");
141
    } 
142
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
143
	   (glib_minor_version != GLIB_MINOR_VERSION) ||
144
           (glib_micro_version != GLIB_MICRO_VERSION))
145
    {
146
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
147
	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
148
      printf("*** library (version %d.%d.%d)\n",
149
	     glib_major_version, glib_minor_version, glib_micro_version);
150
    }
151
  else
152
    {
153
      if ((glib_major_version > major) ||
154
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
155
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
156
      {
157
        return 0;
158
       }
159
     else
160
      {
161
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
162
               glib_major_version, glib_minor_version, glib_micro_version);
163
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
164
	       major, minor, micro);
165
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
166
        printf("***\n");
167
        printf("*** If you have already installed a sufficiently new version, this error\n");
168
        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
169
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
170
        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
171
        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
172
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
173
        printf("*** so that the correct libraries are found at run-time))\n");
174
      }
175
    }
176
  return 1;
177
}
178
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
179
       CFLAGS="$ac_save_CFLAGS"
180
       LIBS="$ac_save_LIBS"
181
     fi
182
  fi
183
  if test "x$no_glib" = x ; then
184
     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
185
     ifelse([$2], , :, [$2])     
186
  else
187
     AC_MSG_RESULT(no)
188
     if test "$PKG_CONFIG" = "no" ; then
189
       echo "*** A new enough version of pkg-config was not found."
190
       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
191
     else
192
       if test -f conf.glibtest ; then
193
        :
194
       else
195
          echo "*** Could not run GLIB test program, checking why..."
196
          ac_save_CFLAGS="$CFLAGS"
197
          ac_save_LIBS="$LIBS"
198
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
199
          LIBS="$LIBS $GLIB_LIBS"
200
          AC_TRY_LINK([
201
#include <glib.h>
202
#include <stdio.h>
203
],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
204
        [ echo "*** The test program compiled, but did not run. This usually means"
205
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
206
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
207
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
208
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
209
          echo "*** is required on your system"
210
	  echo "***"
211
          echo "*** If you have an old version installed, it is best to remove it, although"
212
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
213
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
214
          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
215
          CFLAGS="$ac_save_CFLAGS"
216
          LIBS="$ac_save_LIBS"
217
       fi
218
     fi
219
     GLIB_CFLAGS=""
220
     GLIB_LIBS=""
221
     GLIB_GENMARSHAL=""
222
     GOBJECT_QUERY=""
223
     GLIB_MKENUMS=""
224
     ifelse([$3], , :, [$3])
225
  fi
226
  AC_SUBST(GLIB_CFLAGS)
227
  AC_SUBST(GLIB_LIBS)
228
  AC_SUBST(GLIB_GENMARSHAL)
229
  AC_SUBST(GOBJECT_QUERY)
230
  AC_SUBST(GLIB_MKENUMS)
231
  rm -f conf.glibtest
232
])
233
234
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
235
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
236
#
237
# This file is free software, distributed under the terms of the GNU
238
# General Public License.  As a special exception to the GNU General
239
# Public License, this file may be distributed as part of a program
240
# that contains a configuration script generated by Autoconf, under
241
# the same distribution terms as the rest of that program.
242
#
243
# This file can be copied and used freely without restrictions.  It can
244
# be used in projects which are not available under the GNU Public License
245
# but which still want to provide support for the GNU gettext functionality.
246
#
247
# Macro to add for using GNU gettext.
248
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
249
#
250
# Modified to never use included libintl. 
251
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
252
#
253
# Major rework to remove unused code
254
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
255
#
256
# Added better handling of ALL_LINGUAS from GNU gettext version 
257
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
258
#
259
# Modified to require ngettext
260
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
261
#
262
# We need this here as well, since someone might use autoconf-2.5x
263
# to configure GLib then an older version to configure a package
264
# using AM_GLIB_GNU_GETTEXT
265
AC_PREREQ(2.53)
266
267
dnl
268
dnl We go to great lengths to make sure that aclocal won't 
269
dnl try to pull in the installed version of these macros
270
dnl when running aclocal in the glib directory.
271
dnl
272
m4_copy([AC_DEFUN],[glib_DEFUN])
273
m4_copy([AC_REQUIRE],[glib_REQUIRE])
274
dnl
275
dnl At the end, if we're not within glib, we'll define the public
276
dnl definitions in terms of our private definitions.
277
dnl
278
279
# GLIB_LC_MESSAGES
280
#--------------------
281
glib_DEFUN([GLIB_LC_MESSAGES],
282
  [AC_CHECK_HEADERS([locale.h])
283
    if test $ac_cv_header_locale_h = yes; then
284
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
285
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
286
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
287
    if test $am_cv_val_LC_MESSAGES = yes; then
288
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
289
        [Define if your <locale.h> file defines LC_MESSAGES.])
290
    fi
291
  fi])
292
293
# GLIB_PATH_PROG_WITH_TEST
294
#----------------------------
295
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
296
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
297
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
298
[# Extract the first word of "$2", so it can be a program name with args.
299
set dummy $2; ac_word=[$]2
300
AC_MSG_CHECKING([for $ac_word])
301
AC_CACHE_VAL(ac_cv_path_$1,
302
[case "[$]$1" in
303
  /*)
304
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
305
  ;;
306
  *)
307
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
308
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
309
    test -z "$ac_dir" && ac_dir=.
310
    if test -f $ac_dir/$ac_word; then
311
      if [$3]; then
312
	ac_cv_path_$1="$ac_dir/$ac_word"
313
	break
314
      fi
315
    fi
316
  done
317
  IFS="$ac_save_ifs"
318
dnl If no 4th arg is given, leave the cache variable unset,
319
dnl so AC_PATH_PROGS will keep looking.
320
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
321
])dnl
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
322
  ;;
323
esac])dnl
324
$1="$ac_cv_path_$1"
325
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
326
  AC_MSG_RESULT([$]$1)
327
else
328
  AC_MSG_RESULT(no)
329
fi
330
AC_SUBST($1)dnl
331
])
332
333
# GLIB_WITH_NLS
334
#-----------------
335
glib_DEFUN([GLIB_WITH_NLS],
336
  dnl NLS is obligatory
337
  [USE_NLS=yes
338
    AC_SUBST(USE_NLS)
339
340
    gt_cv_have_gettext=no
341
342
    CATOBJEXT=NONE
343
    XGETTEXT=:
344
    INTLLIBS=
345
346
    AC_CHECK_HEADER(libintl.h,
347
     [gt_cv_func_dgettext_libintl="no"
348
      libintl_extra_libs=""
349
350
      #
351
      # First check in libc
352
      #
353
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
354
        [AC_TRY_LINK([
355
#include <libintl.h>
356
],
357
         [return !ngettext ("","", 1)],
358
	  gt_cv_func_ngettext_libc=yes,
359
          gt_cv_func_ngettext_libc=no)
360
        ])
361
  
362
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
363
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
364
        	[AC_TRY_LINK([
365
#include <libintl.h>
366
],
367
	          [return !dgettext ("","")],
368
		  gt_cv_func_dgettext_libc=yes,
369
	          gt_cv_func_dgettext_libc=no)
370
        	])
371
      fi
372
  
373
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
374
        AC_CHECK_FUNCS(bind_textdomain_codeset)
375
      fi
376
377
      #
378
      # If we don't have everything we want, check in libintl
379
      #
380
      if test "$gt_cv_func_dgettext_libc" != "yes" \
381
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
382
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
383
        
384
        AC_CHECK_LIB(intl, bindtextdomain,
385
	    [AC_CHECK_LIB(intl, ngettext,
386
		    [AC_CHECK_LIB(intl, dgettext,
387
			          gt_cv_func_dgettext_libintl=yes)])])
388
389
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
390
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
391
	  AC_MSG_RESULT([])
392
  	  AC_CHECK_LIB(intl, ngettext,
393
          	[AC_CHECK_LIB(intl, dcgettext,
394
		       [gt_cv_func_dgettext_libintl=yes
395
			libintl_extra_libs=-liconv],
396
			:,-liconv)],
397
		:,-liconv)
398
        fi
399
400
        #
401
        # If we found libintl, then check in it for bind_textdomain_codeset();
402
        # we'll prefer libc if neither have bind_textdomain_codeset(),
403
        # and both have dgettext and ngettext
404
        #
405
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
406
          glib_save_LIBS="$LIBS"
407
          LIBS="$LIBS -lintl $libintl_extra_libs"
408
          unset ac_cv_func_bind_textdomain_codeset
409
          AC_CHECK_FUNCS(bind_textdomain_codeset)
410
          LIBS="$glib_save_LIBS"
411
412
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
413
            gt_cv_func_dgettext_libc=no
414
          else
415
            if test "$gt_cv_func_dgettext_libc" = "yes" \
416
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
417
              gt_cv_func_dgettext_libintl=no
418
            fi
419
          fi
420
        fi
421
      fi
422
423
      if test "$gt_cv_func_dgettext_libc" = "yes" \
424
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
425
        gt_cv_have_gettext=yes
426
      fi
427
  
428
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
429
        INTLLIBS="-lintl $libintl_extra_libs"
430
      fi
431
  
432
      if test "$gt_cv_have_gettext" = "yes"; then
433
	AC_DEFINE(HAVE_GETTEXT,1,
434
	  [Define if the GNU gettext() function is already present or preinstalled.])
435
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
436
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
437
	if test "$MSGFMT" != "no"; then
438
          glib_save_LIBS="$LIBS"
439
          LIBS="$LIBS $INTLLIBS"
440
	  AC_CHECK_FUNCS(dcgettext)
441
	  MSGFMT_OPTS=
442
	  AC_MSG_CHECKING([if msgfmt accepts -c])
443
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
444
msgid ""
445
msgstr ""
446
"Content-Type: text/plain; charset=UTF-8\n"
447
"Project-Id-Version: test 1.0\n"
448
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
449
"Last-Translator: test <foo@bar.xx>\n"
450
"Language-Team: C <LL@li.org>\n"
451
"MIME-Version: 1.0\n"
452
"Content-Transfer-Encoding: 8bit\n"
453
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
454
	  AC_SUBST(MSGFMT_OPTS)
455
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
456
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
457
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
458
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
459
			 return _nl_msg_cat_cntr],
460
	    [CATOBJEXT=.gmo 
461
             DATADIRNAME=share],
462
	    [case $host in
463
	    *-*-solaris*)
464
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
465
	    dnl GNU format message catalog is always supported,
466
            dnl since both are added to the libc all together.
467
	    dnl Hence, we'd like to go with DATADIRNAME=share and
468
	    dnl and CATOBJEXT=.gmo in this case.
469
            AC_CHECK_FUNC(bind_textdomain_codeset,
470
	      [CATOBJEXT=.gmo 
471
               DATADIRNAME=share],
472
	      [CATOBJEXT=.mo
473
               DATADIRNAME=lib])
474
	    ;;
475
	    *)
476
	    CATOBJEXT=.mo
477
            DATADIRNAME=lib
478
	    ;;
479
	    esac])
480
          LIBS="$glib_save_LIBS"
481
	  INSTOBJEXT=.mo
482
	else
483
	  gt_cv_have_gettext=no
484
	fi
485
      fi
486
    ])
487
488
    if test "$gt_cv_have_gettext" = "yes" ; then
489
      AC_DEFINE(ENABLE_NLS, 1,
490
        [always defined to indicate that i18n is enabled])
491
    fi
492
493
    dnl Test whether we really found GNU xgettext.
494
    if test "$XGETTEXT" != ":"; then
495
      dnl If it is not GNU xgettext we define it as : so that the
496
      dnl Makefiles still can work.
497
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
498
        : ;
499
      else
500
        AC_MSG_RESULT(
501
	  [found xgettext program is not GNU xgettext; ignore it])
502
        XGETTEXT=":"
503
      fi
504
    fi
505
506
    # We need to process the po/ directory.
507
    POSUB=po
508
509
    AC_OUTPUT_COMMANDS(
510
      [case "$CONFIG_FILES" in *po/Makefile.in*)
511
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
512
      esac])
513
514
    dnl These rules are solely for the distribution goal.  While doing this
515
    dnl we only have to keep exactly one list of the available catalogs
516
    dnl in configure.in.
517
    for lang in $ALL_LINGUAS; do
518
      GMOFILES="$GMOFILES $lang.gmo"
519
      POFILES="$POFILES $lang.po"
520
    done
521
522
    dnl Make all variables we use known to autoconf.
523
    AC_SUBST(CATALOGS)
524
    AC_SUBST(CATOBJEXT)
525
    AC_SUBST(DATADIRNAME)
526
    AC_SUBST(GMOFILES)
527
    AC_SUBST(INSTOBJEXT)
528
    AC_SUBST(INTLLIBS)
529
    AC_SUBST(PO_IN_DATADIR_TRUE)
530
    AC_SUBST(PO_IN_DATADIR_FALSE)
531
    AC_SUBST(POFILES)
532
    AC_SUBST(POSUB)
533
  ])
534
535
# AM_GLIB_GNU_GETTEXT
536
# -------------------
537
# Do checks necessary for use of gettext. If a suitable implementation 
538
# of gettext is found in either in libintl or in the C library,
539
# it will set INTLLIBS to the libraries needed for use of gettext
540
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
541
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
542
# on various variables needed by the Makefile.in.in installed by 
543
# glib-gettextize.
544
dnl
545
glib_DEFUN([GLIB_GNU_GETTEXT],
546
  [AC_REQUIRE([AC_PROG_CC])dnl
547
   AC_REQUIRE([AC_HEADER_STDC])dnl
548
   
549
   GLIB_LC_MESSAGES
550
   GLIB_WITH_NLS
551
552
   if test "$gt_cv_have_gettext" = "yes"; then
553
     if test "x$ALL_LINGUAS" = "x"; then
554
       LINGUAS=
555
     else
556
       AC_MSG_CHECKING(for catalogs to be installed)
557
       NEW_LINGUAS=
558
       for presentlang in $ALL_LINGUAS; do
559
         useit=no
560
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
561
           desiredlanguages="$LINGUAS"
562
         else
563
           desiredlanguages="$ALL_LINGUAS"
564
         fi
565
         for desiredlang in $desiredlanguages; do
566
 	   # Use the presentlang catalog if desiredlang is
567
           #   a. equal to presentlang, or
568
           #   b. a variant of presentlang (because in this case,
569
           #      presentlang can be used as a fallback for messages
570
           #      which are not translated in the desiredlang catalog).
571
           case "$desiredlang" in
572
             "$presentlang"*) useit=yes;;
573
           esac
574
         done
575
         if test $useit = yes; then
576
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
577
         fi
578
       done
579
       LINGUAS=$NEW_LINGUAS
580
       AC_MSG_RESULT($LINGUAS)
581
     fi
582
583
     dnl Construct list of names of catalog files to be constructed.
584
     if test -n "$LINGUAS"; then
585
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
586
     fi
587
   fi
588
589
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
590
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
591
   dnl Try to locate is.
592
   MKINSTALLDIRS=
593
   if test -n "$ac_aux_dir"; then
594
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
595
   fi
596
   if test -z "$MKINSTALLDIRS"; then
597
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
598
   fi
599
   AC_SUBST(MKINSTALLDIRS)
600
601
   dnl Generate list of files to be processed by xgettext which will
602
   dnl be included in po/Makefile.
603
   test -d po || mkdir po
604
   if test "x$srcdir" != "x."; then
605
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
606
       posrcprefix="$srcdir/"
607
     else
608
       posrcprefix="../$srcdir/"
609
     fi
610
   else
611
     posrcprefix="../"
612
   fi
613
   rm -f po/POTFILES
614
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
615
	< $srcdir/po/POTFILES.in > po/POTFILES
616
  ])
617
618
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
619
# -------------------------------
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
620
# Define VARIABLE to the location where catalog files will
621
# be installed by po/Makefile.
622
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
623
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
624
glib_save_prefix="$prefix"
625
glib_save_exec_prefix="$exec_prefix"
626
glib_save_datarootdir="$datarootdir"
627
test "x$prefix" = xNONE && prefix=$ac_default_prefix
628
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
629
datarootdir=`eval echo "${datarootdir}"`
630
if test "x$CATOBJEXT" = "x.mo" ; then
631
  localedir=`eval echo "${libdir}/locale"`
632
else
633
  localedir=`eval echo "${datadir}/locale"`
634
fi
635
prefix="$glib_save_prefix"
636
exec_prefix="$glib_save_exec_prefix"
637
datarootdir="$glib_save_datarootdir"
638
AC_DEFINE_UNQUOTED($1, "$localedir",
639
  [Define the location where the catalogs will be installed])
640
])
641
642
dnl
643
dnl Now the definitions that aclocal will find
644
dnl
645
ifdef(glib_configure_in,[],[
646
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
647
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
648
])dnl
649
650
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
651
# 
652
# Create a temporary file with TEST-FILE as its contents and pass the
653
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
654
# 0 and perform ACTION-IF-FAIL for any other exit status.
655
AC_DEFUN([GLIB_RUN_PROG],
656
[cat >conftest.foo <<_ACEOF
657
$2
658
_ACEOF
659
if AC_RUN_LOG([$1 conftest.foo]); then
660
  m4_ifval([$3], [$3], [:])
661
m4_ifvaln([$4], [else $4])dnl
662
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
663
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
664
fi])
665
666
1.13.1 by Sebastian Dröge
Import upstream version 2.20.1
667
dnl -*- mode: autoconf -*-
668
669
# serial 1
670
671
dnl Usage:
672
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
673
AC_DEFUN([GTK_DOC_CHECK],
674
[
675
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
676
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
677
678
  dnl check for tools we added during development
679
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
680
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
681
  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
682
683
  dnl for overriding the documentation installation directory
684
  AC_ARG_WITH([html-dir],
685
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
686
    [with_html_dir='${datadir}/gtk-doc/html'])
687
  HTML_DIR="$with_html_dir"
688
  AC_SUBST([HTML_DIR])
689
690
  dnl enable/disable documentation building
691
  AC_ARG_ENABLE([gtk-doc],
692
    AS_HELP_STRING([--enable-gtk-doc],
693
                   [use gtk-doc to build documentation [[default=no]]]),,
694
    [enable_gtk_doc=no])
695
696
  if test x$enable_gtk_doc = xyes; then
697
    ifelse([$1],[],
698
      [PKG_CHECK_EXISTS([gtk-doc],,
699
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
700
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
701
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
702
  fi
703
704
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
705
  AC_MSG_RESULT($enable_gtk_doc)
706
707
  dnl enable/disable output formats
708
  AC_ARG_ENABLE([gtk-doc-html],
709
    AS_HELP_STRING([--enable-gtk-doc-html],
710
                   [build documentation in html format [[default=yes]]]),,
711
    [enable_gtk_doc_html=yes])
712
    AC_ARG_ENABLE([gtk-doc-pdf],
713
      AS_HELP_STRING([--enable-gtk-doc-pdf],
714
                     [build documentation in pdf format [[default=no]]]),,
715
      [enable_gtk_doc_pdf=no])
716
717
  if test -z "$GTKDOC_MKPDF"; then
718
    enable_gtk_doc_pdf=no
719
  fi
720
721
722
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
723
  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
724
  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
725
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
726
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
727
])
728
729
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
730
#
731
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
732
#                 2006, 2007, 2008 Free Software Foundation, Inc.
733
#   Written by Gordon Matzigkeit, 1996
734
#
735
# This file is free software; the Free Software Foundation gives
736
# unlimited permission to copy and/or distribute it, with or without
737
# modifications, as long as this notice is preserved.
738
739
m4_define([_LT_COPYING], [dnl
740
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
741
#                 2006, 2007, 2008 Free Software Foundation, Inc.
742
#   Written by Gordon Matzigkeit, 1996
743
#
744
#   This file is part of GNU Libtool.
745
#
746
# GNU Libtool is free software; you can redistribute it and/or
747
# modify it under the terms of the GNU General Public License as
748
# published by the Free Software Foundation; either version 2 of
749
# the License, or (at your option) any later version.
750
#
751
# As a special exception to the GNU General Public License,
752
# if you distribute this file as part of a program or library that
753
# is built using GNU Libtool, you may include this file under the
754
# same distribution terms that you use for the rest of that program.
755
#
756
# GNU Libtool is distributed in the hope that it will be useful,
757
# but WITHOUT ANY WARRANTY; without even the implied warranty of
758
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
759
# GNU General Public License for more details.
760
#
761
# You should have received a copy of the GNU General Public License
762
# along with GNU Libtool; see the file COPYING.  If not, a copy
763
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
764
# obtained by writing to the Free Software Foundation, Inc.,
765
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
766
])
767
768
# serial 56 LT_INIT
769
770
771
# LT_PREREQ(VERSION)
772
# ------------------
773
# Complain and exit if this libtool version is less that VERSION.
774
m4_defun([LT_PREREQ],
775
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
776
       [m4_default([$3],
777
		   [m4_fatal([Libtool version $1 or higher is required],
778
		             63)])],
779
       [$2])])
780
781
782
# _LT_CHECK_BUILDDIR
783
# ------------------
784
# Complain if the absolute build directory name contains unusual characters
785
m4_defun([_LT_CHECK_BUILDDIR],
786
[case `pwd` in
787
  *\ * | *\	*)
788
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
789
esac
790
])
791
792
793
# LT_INIT([OPTIONS])
794
# ------------------
795
AC_DEFUN([LT_INIT],
796
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
797
AC_BEFORE([$0], [LT_LANG])dnl
798
AC_BEFORE([$0], [LT_OUTPUT])dnl
799
AC_BEFORE([$0], [LTDL_INIT])dnl
800
m4_require([_LT_CHECK_BUILDDIR])dnl
801
802
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
803
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
804
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
805
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
806
dnl unless we require an AC_DEFUNed macro:
807
AC_REQUIRE([LTOPTIONS_VERSION])dnl
808
AC_REQUIRE([LTSUGAR_VERSION])dnl
809
AC_REQUIRE([LTVERSION_VERSION])dnl
810
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
811
m4_require([_LT_PROG_LTMAIN])dnl
812
813
dnl Parse OPTIONS
814
_LT_SET_OPTIONS([$0], [$1])
815
816
# This can be used to rebuild libtool when needed
817
LIBTOOL_DEPS="$ltmain"
818
819
# Always use our own libtool.
820
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
821
AC_SUBST(LIBTOOL)dnl
822
823
_LT_SETUP
824
825
# Only expand once:
826
m4_define([LT_INIT])
827
])# LT_INIT
828
829
# Old names:
830
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
831
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
832
dnl aclocal-1.4 backwards compatibility:
833
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
834
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
835
836
837
# _LT_CC_BASENAME(CC)
838
# -------------------
839
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
840
m4_defun([_LT_CC_BASENAME],
841
[for cc_temp in $1""; do
842
  case $cc_temp in
843
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
844
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
845
    \-*) ;;
846
    *) break;;
847
  esac
848
done
849
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
850
])
851
852
853
# _LT_FILEUTILS_DEFAULTS
854
# ----------------------
855
# It is okay to use these file commands and assume they have been set
856
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
857
m4_defun([_LT_FILEUTILS_DEFAULTS],
858
[: ${CP="cp -f"}
859
: ${MV="mv -f"}
860
: ${RM="rm -f"}
861
])# _LT_FILEUTILS_DEFAULTS
862
863
864
# _LT_SETUP
865
# ---------
866
m4_defun([_LT_SETUP],
867
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
868
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
869
_LT_DECL([], [host_alias], [0], [The host system])dnl
870
_LT_DECL([], [host], [0])dnl
871
_LT_DECL([], [host_os], [0])dnl
872
dnl
873
_LT_DECL([], [build_alias], [0], [The build system])dnl
874
_LT_DECL([], [build], [0])dnl
875
_LT_DECL([], [build_os], [0])dnl
876
dnl
877
AC_REQUIRE([AC_PROG_CC])dnl
878
AC_REQUIRE([LT_PATH_LD])dnl
879
AC_REQUIRE([LT_PATH_NM])dnl
880
dnl
881
AC_REQUIRE([AC_PROG_LN_S])dnl
882
test -z "$LN_S" && LN_S="ln -s"
883
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
884
dnl
885
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
886
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
887
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
888
dnl
889
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
890
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
891
m4_require([_LT_CMD_RELOAD])dnl
892
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
893
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
894
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
895
896
_LT_CONFIG_LIBTOOL_INIT([
897
# See if we are running on zsh, and set the options which allow our
898
# commands through without removal of \ escapes INIT.
899
if test -n "\${ZSH_VERSION+set}" ; then
900
   setopt NO_GLOB_SUBST
901
fi
902
])
903
if test -n "${ZSH_VERSION+set}" ; then
904
   setopt NO_GLOB_SUBST
905
fi
906
907
_LT_CHECK_OBJDIR
908
909
m4_require([_LT_TAG_COMPILER])dnl
910
_LT_PROG_ECHO_BACKSLASH
911
912
case $host_os in
913
aix3*)
914
  # AIX sometimes has problems with the GCC collect2 program.  For some
915
  # reason, if we set the COLLECT_NAMES environment variable, the problems
916
  # vanish in a puff of smoke.
917
  if test "X${COLLECT_NAMES+set}" != Xset; then
918
    COLLECT_NAMES=
919
    export COLLECT_NAMES
920
  fi
921
  ;;
922
esac
923
924
# Sed substitution that helps us do robust quoting.  It backslashifies
925
# metacharacters that are still active within double-quoted strings.
926
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
927
928
# Same as above, but do not quote variable references.
929
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
930
931
# Sed substitution to delay expansion of an escaped shell variable in a
932
# double_quote_subst'ed string.
933
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
934
935
# Sed substitution to delay expansion of an escaped single quote.
936
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
937
938
# Sed substitution to avoid accidental globbing in evaled expressions
939
no_glob_subst='s/\*/\\\*/g'
940
941
# Global variables:
942
ofile=libtool
943
can_build_shared=yes
944
945
# All known linkers require a `.a' archive for static linking (except MSVC,
946
# which needs '.lib').
947
libext=a
948
949
with_gnu_ld="$lt_cv_prog_gnu_ld"
950
951
old_CC="$CC"
952
old_CFLAGS="$CFLAGS"
953
954
# Set sane defaults for various variables
955
test -z "$CC" && CC=cc
956
test -z "$LTCC" && LTCC=$CC
957
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
958
test -z "$LD" && LD=ld
959
test -z "$ac_objext" && ac_objext=o
960
961
_LT_CC_BASENAME([$compiler])
962
963
# Only perform the check for file, if the check method requires it
964
test -z "$MAGIC_CMD" && MAGIC_CMD=file
965
case $deplibs_check_method in
966
file_magic*)
967
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
968
    _LT_PATH_MAGIC
969
  fi
970
  ;;
971
esac
972
973
# Use C for the default configuration in the libtool script
974
LT_SUPPORTED_TAG([CC])
975
_LT_LANG_C_CONFIG
976
_LT_LANG_DEFAULT_CONFIG
977
_LT_CONFIG_COMMANDS
978
])# _LT_SETUP
979
980
981
# _LT_PROG_LTMAIN
982
# ---------------
983
# Note that this code is called both from `configure', and `config.status'
984
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
985
# `config.status' has no value for ac_aux_dir unless we are using Automake,
986
# so we pass a copy along to make sure it has a sensible value anyway.
987
m4_defun([_LT_PROG_LTMAIN],
988
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
989
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
990
ltmain="$ac_aux_dir/ltmain.sh"
991
])# _LT_PROG_LTMAIN
992
993
994
995
# So that we can recreate a full libtool script including additional
996
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
997
# in macros and then make a single call at the end using the `libtool'
998
# label.
999
1000
1001
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1002
# ----------------------------------------
1003
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1004
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1005
[m4_ifval([$1],
1006
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1007
                     [$1
1008
])])])
1009
1010
# Initialize.
1011
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1012
1013
1014
# _LT_CONFIG_LIBTOOL([COMMANDS])
1015
# ------------------------------
1016
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1017
m4_define([_LT_CONFIG_LIBTOOL],
1018
[m4_ifval([$1],
1019
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1020
                     [$1
1021
])])])
1022
1023
# Initialize.
1024
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1025
1026
1027
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1028
# -----------------------------------------------------
1029
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1030
[_LT_CONFIG_LIBTOOL([$1])
1031
_LT_CONFIG_LIBTOOL_INIT([$2])
1032
])
1033
1034
1035
# _LT_FORMAT_COMMENT([COMMENT])
1036
# -----------------------------
1037
# Add leading comment marks to the start of each line, and a trailing
1038
# full-stop to the whole comment if one is not present already.
1039
m4_define([_LT_FORMAT_COMMENT],
1040
[m4_ifval([$1], [
1041
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1042
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1043
)])
1044
1045
1046
1047
1048
1049
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1050
# -------------------------------------------------------------------
1051
# CONFIGNAME is the name given to the value in the libtool script.
1052
# VARNAME is the (base) name used in the configure script.
1053
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1054
# VARNAME.  Any other value will be used directly.
1055
m4_define([_LT_DECL],
1056
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1057
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1058
	[m4_ifval([$1], [$1], [$2])])
1059
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1060
    m4_ifval([$4],
1061
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1062
    lt_dict_add_subkey([lt_decl_dict], [$2],
1063
	[tagged?], [m4_ifval([$5], [yes], [no])])])
1064
])
1065
1066
1067
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1068
# --------------------------------------------------------
1069
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1070
1071
1072
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1073
# ------------------------------------------------
1074
m4_define([lt_decl_tag_varnames],
1075
[_lt_decl_filter([tagged?], [yes], $@)])
1076
1077
1078
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1079
# ---------------------------------------------------------
1080
m4_define([_lt_decl_filter],
1081
[m4_case([$#],
1082
  [0], [m4_fatal([$0: too few arguments: $#])],
1083
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1084
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1085
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1086
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1087
])
1088
1089
1090
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1091
# --------------------------------------------------
1092
m4_define([lt_decl_quote_varnames],
1093
[_lt_decl_filter([value], [1], $@)])
1094
1095
1096
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1097
# ---------------------------------------------------
1098
m4_define([lt_decl_dquote_varnames],
1099
[_lt_decl_filter([value], [2], $@)])
1100
1101
1102
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1103
# ---------------------------------------------------
1104
m4_define([lt_decl_varnames_tagged],
1105
[m4_assert([$# <= 2])dnl
1106
_$0(m4_quote(m4_default([$1], [[, ]])),
1107
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1108
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1109
m4_define([_lt_decl_varnames_tagged],
1110
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1111
1112
1113
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1114
# ------------------------------------------------
1115
m4_define([lt_decl_all_varnames],
1116
[_$0(m4_quote(m4_default([$1], [[, ]])),
1117
     m4_if([$2], [],
1118
	   m4_quote(lt_decl_varnames),
1119
	m4_quote(m4_shift($@))))[]dnl
1120
])
1121
m4_define([_lt_decl_all_varnames],
1122
[lt_join($@, lt_decl_varnames_tagged([$1],
1123
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1124
])
1125
1126
1127
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1128
# ------------------------------------
1129
# Quote a variable value, and forward it to `config.status' so that its
1130
# declaration there will have the same value as in `configure'.  VARNAME
1131
# must have a single quote delimited value for this to work.
1132
m4_define([_LT_CONFIG_STATUS_DECLARE],
1133
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1134
1135
1136
# _LT_CONFIG_STATUS_DECLARATIONS
1137
# ------------------------------
1138
# We delimit libtool config variables with single quotes, so when
1139
# we write them to config.status, we have to be sure to quote all
1140
# embedded single quotes properly.  In configure, this macro expands
1141
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1142
#
1143
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1144
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1145
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1146
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1147
1148
1149
# _LT_LIBTOOL_TAGS
1150
# ----------------
1151
# Output comment and list of tags supported by the script
1152
m4_defun([_LT_LIBTOOL_TAGS],
1153
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1154
available_tags="_LT_TAGS"dnl
1155
])
1156
1157
1158
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1159
# -----------------------------------
1160
# Extract the dictionary values for VARNAME (optionally with TAG) and
1161
# expand to a commented shell variable setting:
1162
#
1163
#    # Some comment about what VAR is for.
1164
#    visible_name=$lt_internal_name
1165
m4_define([_LT_LIBTOOL_DECLARE],
1166
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1167
					   [description])))[]dnl
1168
m4_pushdef([_libtool_name],
1169
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1170
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1171
    [0], [_libtool_name=[$]$1],
1172
    [1], [_libtool_name=$lt_[]$1],
1173
    [2], [_libtool_name=$lt_[]$1],
1174
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1175
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1176
])
1177
1178
1179
# _LT_LIBTOOL_CONFIG_VARS
1180
# -----------------------
1181
# Produce commented declarations of non-tagged libtool config variables
1182
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1183
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1184
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1185
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1186
[m4_foreach([_lt_var],
1187
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1188
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1189
1190
1191
# _LT_LIBTOOL_TAG_VARS(TAG)
1192
# -------------------------
1193
m4_define([_LT_LIBTOOL_TAG_VARS],
1194
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1195
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1196
1197
1198
# _LT_TAGVAR(VARNAME, [TAGNAME])
1199
# ------------------------------
1200
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1201
1202
1203
# _LT_CONFIG_COMMANDS
1204
# -------------------
1205
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1206
# variables for single and double quote escaping we saved from calls
1207
# to _LT_DECL, we can put quote escaped variables declarations
1208
# into `config.status', and then the shell code to quote escape them in
1209
# for loops in `config.status'.  Finally, any additional code accumulated
1210
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1211
m4_defun([_LT_CONFIG_COMMANDS],
1212
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1213
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1214
	dnl instead of duplicating it all over again into config.status,
1215
	dnl then we will have config.status run $CONFIG_LT later, so it
1216
	dnl needs to know what name is stored there:
1217
        [AC_CONFIG_COMMANDS([libtool],
1218
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1219
    dnl If the libtool generation code is destined for config.status,
1220
    dnl expand the accumulated commands and init code now:
1221
    [AC_CONFIG_COMMANDS([libtool],
1222
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1223
])#_LT_CONFIG_COMMANDS
1224
1225
1226
# Initialize.
1227
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1228
[
1229
1230
# The HP-UX ksh and POSIX shell print the target directory to stdout
1231
# if CDPATH is set.
1232
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1233
1234
sed_quote_subst='$sed_quote_subst'
1235
double_quote_subst='$double_quote_subst'
1236
delay_variable_subst='$delay_variable_subst'
1237
_LT_CONFIG_STATUS_DECLARATIONS
1238
LTCC='$LTCC'
1239
LTCFLAGS='$LTCFLAGS'
1240
compiler='$compiler_DEFAULT'
1241
1242
# Quote evaled strings.
1243
for var in lt_decl_all_varnames([[ \
1244
]], lt_decl_quote_varnames); do
1245
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1246
    *[[\\\\\\\`\\"\\\$]]*)
1247
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1248
      ;;
1249
    *)
1250
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1251
      ;;
1252
    esac
1253
done
1254
1255
# Double-quote double-evaled strings.
1256
for var in lt_decl_all_varnames([[ \
1257
]], lt_decl_dquote_varnames); do
1258
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1259
    *[[\\\\\\\`\\"\\\$]]*)
1260
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1261
      ;;
1262
    *)
1263
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1264
      ;;
1265
    esac
1266
done
1267
1268
# Fix-up fallback echo if it was mangled by the above quoting rules.
1269
case \$lt_ECHO in
1270
*'\\\[$]0 --fallback-echo"')dnl "
1271
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1272
  ;;
1273
esac
1274
1275
_LT_OUTPUT_LIBTOOL_INIT
1276
])
1277
1278
1279
# LT_OUTPUT
1280
# ---------
1281
# This macro allows early generation of the libtool script (before
1282
# AC_OUTPUT is called), incase it is used in configure for compilation
1283
# tests.
1284
AC_DEFUN([LT_OUTPUT],
1285
[: ${CONFIG_LT=./config.lt}
1286
AC_MSG_NOTICE([creating $CONFIG_LT])
1287
cat >"$CONFIG_LT" <<_LTEOF
1288
#! $SHELL
1289
# Generated by $as_me.
1290
# Run this file to recreate a libtool stub with the current configuration.
1291
1292
lt_cl_silent=false
1293
SHELL=\${CONFIG_SHELL-$SHELL}
1294
_LTEOF
1295
1296
cat >>"$CONFIG_LT" <<\_LTEOF
1297
AS_SHELL_SANITIZE
1298
_AS_PREPARE
1299
1300
exec AS_MESSAGE_FD>&1
1301
exec AS_MESSAGE_LOG_FD>>config.log
1302
{
1303
  echo
1304
  AS_BOX([Running $as_me.])
1305
} >&AS_MESSAGE_LOG_FD
1306
1307
lt_cl_help="\
1308
\`$as_me' creates a local libtool stub from the current configuration,
1309
for use in further configure time tests before the real libtool is
1310
generated.
1311
1312
Usage: $[0] [[OPTIONS]]
1313
1314
  -h, --help      print this help, then exit
1315
  -V, --version   print version number, then exit
1316
  -q, --quiet     do not print progress messages
1317
  -d, --debug     don't remove temporary files
1318
1319
Report bugs to <bug-libtool@gnu.org>."
1320
1321
lt_cl_version="\
1322
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1323
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1324
configured by $[0], generated by m4_PACKAGE_STRING.
1325
1326
Copyright (C) 2008 Free Software Foundation, Inc.
1327
This config.lt script is free software; the Free Software Foundation
1328
gives unlimited permision to copy, distribute and modify it."
1329
1330
while test $[#] != 0
1331
do
1332
  case $[1] in
1333
    --version | --v* | -V )
1334
      echo "$lt_cl_version"; exit 0 ;;
1335
    --help | --h* | -h )
1336
      echo "$lt_cl_help"; exit 0 ;;
1337
    --debug | --d* | -d )
1338
      debug=: ;;
1339
    --quiet | --q* | --silent | --s* | -q )
1340
      lt_cl_silent=: ;;
1341
1342
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1343
Try \`$[0] --help' for more information.]) ;;
1344
1345
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1346
Try \`$[0] --help' for more information.]) ;;
1347
  esac
1348
  shift
1349
done
1350
1351
if $lt_cl_silent; then
1352
  exec AS_MESSAGE_FD>/dev/null
1353
fi
1354
_LTEOF
1355
1356
cat >>"$CONFIG_LT" <<_LTEOF
1357
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1358
_LTEOF
1359
1360
cat >>"$CONFIG_LT" <<\_LTEOF
1361
AC_MSG_NOTICE([creating $ofile])
1362
_LT_OUTPUT_LIBTOOL_COMMANDS
1363
AS_EXIT(0)
1364
_LTEOF
1365
chmod +x "$CONFIG_LT"
1366
1367
# configure is writing to config.log, but config.lt does its own redirection,
1368
# appending to config.log, which fails on DOS, as config.log is still kept
1369
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1370
# config.log, so it can be properly (re)opened and appended to by config.lt.
1371
if test "$no_create" != yes; then
1372
  lt_cl_success=:
1373
  test "$silent" = yes &&
1374
    lt_config_lt_args="$lt_config_lt_args --quiet"
1375
  exec AS_MESSAGE_LOG_FD>/dev/null
1376
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1377
  exec AS_MESSAGE_LOG_FD>>config.log
1378
  $lt_cl_success || AS_EXIT(1)
1379
fi
1380
])# LT_OUTPUT
1381
1382
1383
# _LT_CONFIG(TAG)
1384
# ---------------
1385
# If TAG is the built-in tag, create an initial libtool script with a
1386
# default configuration from the untagged config vars.  Otherwise add code
1387
# to config.status for appending the configuration named by TAG from the
1388
# matching tagged config vars.
1389
m4_defun([_LT_CONFIG],
1390
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1391
_LT_CONFIG_SAVE_COMMANDS([
1392
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1393
  m4_if(_LT_TAG, [C], [
1394
    # See if we are running on zsh, and set the options which allow our
1395
    # commands through without removal of \ escapes.
1396
    if test -n "${ZSH_VERSION+set}" ; then
1397
      setopt NO_GLOB_SUBST
1398
    fi
1399
1400
    cfgfile="${ofile}T"
1401
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1402
    $RM "$cfgfile"
1403
1404
    cat <<_LT_EOF >> "$cfgfile"
1405
#! $SHELL
1406
1407
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1408
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1409
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1410
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1411
#
1412
_LT_COPYING
1413
_LT_LIBTOOL_TAGS
1414
1415
# ### BEGIN LIBTOOL CONFIG
1416
_LT_LIBTOOL_CONFIG_VARS
1417
_LT_LIBTOOL_TAG_VARS
1418
# ### END LIBTOOL CONFIG
1419
1420
_LT_EOF
1421
1422
  case $host_os in
1423
  aix3*)
1424
    cat <<\_LT_EOF >> "$cfgfile"
1425
# AIX sometimes has problems with the GCC collect2 program.  For some
1426
# reason, if we set the COLLECT_NAMES environment variable, the problems
1427
# vanish in a puff of smoke.
1428
if test "X${COLLECT_NAMES+set}" != Xset; then
1429
  COLLECT_NAMES=
1430
  export COLLECT_NAMES
1431
fi
1432
_LT_EOF
1433
    ;;
1434
  esac
1435
1436
  _LT_PROG_LTMAIN
1437
1438
  # We use sed instead of cat because bash on DJGPP gets confused if
1439
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1440
  # text mode, it properly converts lines to CR/LF.  This bash problem
1441
  # is reportedly fixed, but why not run on old versions too?
1442
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1443
    || (rm -f "$cfgfile"; exit 1)
1444
1445
  _LT_PROG_XSI_SHELLFNS
1446
1447
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1448
    || (rm -f "$cfgfile"; exit 1)
1449
1450
  mv -f "$cfgfile" "$ofile" ||
1451
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1452
  chmod +x "$ofile"
1453
],
1454
[cat <<_LT_EOF >> "$ofile"
1455
1456
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1457
dnl in a comment (ie after a #).
1458
# ### BEGIN LIBTOOL TAG CONFIG: $1
1459
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1460
# ### END LIBTOOL TAG CONFIG: $1
1461
_LT_EOF
1462
])dnl /m4_if
1463
],
1464
[m4_if([$1], [], [
1465
    PACKAGE='$PACKAGE'
1466
    VERSION='$VERSION'
1467
    TIMESTAMP='$TIMESTAMP'
1468
    RM='$RM'
1469
    ofile='$ofile'], [])
1470
])dnl /_LT_CONFIG_SAVE_COMMANDS
1471
])# _LT_CONFIG
1472
1473
1474
# LT_SUPPORTED_TAG(TAG)
1475
# ---------------------
1476
# Trace this macro to discover what tags are supported by the libtool
1477
# --tag option, using:
1478
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1479
AC_DEFUN([LT_SUPPORTED_TAG], [])
1480
1481
1482
# C support is built-in for now
1483
m4_define([_LT_LANG_C_enabled], [])
1484
m4_define([_LT_TAGS], [])
1485
1486
1487
# LT_LANG(LANG)
1488
# -------------
1489
# Enable libtool support for the given language if not already enabled.
1490
AC_DEFUN([LT_LANG],
1491
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1492
m4_case([$1],
1493
  [C],			[_LT_LANG(C)],
1494
  [C++],		[_LT_LANG(CXX)],
1495
  [Java],		[_LT_LANG(GCJ)],
1496
  [Fortran 77],		[_LT_LANG(F77)],
1497
  [Fortran],		[_LT_LANG(FC)],
1498
  [Windows Resource],	[_LT_LANG(RC)],
1499
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1500
    [_LT_LANG($1)],
1501
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1502
])# LT_LANG
1503
1504
1505
# _LT_LANG(LANGNAME)
1506
# ------------------
1507
m4_defun([_LT_LANG],
1508
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1509
  [LT_SUPPORTED_TAG([$1])dnl
1510
  m4_append([_LT_TAGS], [$1 ])dnl
1511
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1512
  _LT_LANG_$1_CONFIG($1)])dnl
1513
])# _LT_LANG
1514
1515
1516
# _LT_LANG_DEFAULT_CONFIG
1517
# -----------------------
1518
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1519
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1520
  [LT_LANG(CXX)],
1521
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1522
1523
AC_PROVIDE_IFELSE([AC_PROG_F77],
1524
  [LT_LANG(F77)],
1525
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1526
1527
AC_PROVIDE_IFELSE([AC_PROG_FC],
1528
  [LT_LANG(FC)],
1529
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1530
1531
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1532
dnl pulling things in needlessly.
1533
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1534
  [LT_LANG(GCJ)],
1535
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1536
    [LT_LANG(GCJ)],
1537
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1538
      [LT_LANG(GCJ)],
1539
      [m4_ifdef([AC_PROG_GCJ],
1540
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1541
       m4_ifdef([A][M_PROG_GCJ],
1542
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1543
       m4_ifdef([LT_PROG_GCJ],
1544
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1545
1546
AC_PROVIDE_IFELSE([LT_PROG_RC],
1547
  [LT_LANG(RC)],
1548
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1549
])# _LT_LANG_DEFAULT_CONFIG
1550
1551
# Obsolete macros:
1552
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1553
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1554
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1555
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1556
dnl aclocal-1.4 backwards compatibility:
1557
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1558
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1559
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1560
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1561
1562
1563
# _LT_TAG_COMPILER
1564
# ----------------
1565
m4_defun([_LT_TAG_COMPILER],
1566
[AC_REQUIRE([AC_PROG_CC])dnl
1567
1568
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1569
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1570
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1571
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1572
1573
# If no C compiler was specified, use CC.
1574
LTCC=${LTCC-"$CC"}
1575
1576
# If no C compiler flags were specified, use CFLAGS.
1577
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1578
1579
# Allow CC to be a program name with arguments.
1580
compiler=$CC
1581
])# _LT_TAG_COMPILER
1582
1583
1584
# _LT_COMPILER_BOILERPLATE
1585
# ------------------------
1586
# Check for compiler boilerplate output or warnings with
1587
# the simple compiler test code.
1588
m4_defun([_LT_COMPILER_BOILERPLATE],
1589
[m4_require([_LT_DECL_SED])dnl
1590
ac_outfile=conftest.$ac_objext
1591
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1592
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1593
_lt_compiler_boilerplate=`cat conftest.err`
1594
$RM conftest*
1595
])# _LT_COMPILER_BOILERPLATE
1596
1597
1598
# _LT_LINKER_BOILERPLATE
1599
# ----------------------
1600
# Check for linker boilerplate output or warnings with
1601
# the simple link test code.
1602
m4_defun([_LT_LINKER_BOILERPLATE],
1603
[m4_require([_LT_DECL_SED])dnl
1604
ac_outfile=conftest.$ac_objext
1605
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1606
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1607
_lt_linker_boilerplate=`cat conftest.err`
1608
$RM -r conftest*
1609
])# _LT_LINKER_BOILERPLATE
1610
1611
# _LT_REQUIRED_DARWIN_CHECKS
1612
# -------------------------
1613
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1614
  case $host_os in
1615
    rhapsody* | darwin*)
1616
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1617
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1618
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1619
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1620
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1621
    _LT_DECL([], [DSYMUTIL], [1],
1622
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1623
    _LT_DECL([], [NMEDIT], [1],
1624
      [Tool to change global to local symbols on Mac OS X])
1625
    _LT_DECL([], [LIPO], [1],
1626
      [Tool to manipulate fat objects and archives on Mac OS X])
1627
    _LT_DECL([], [OTOOL], [1],
1628
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1629
    _LT_DECL([], [OTOOL64], [1],
1630
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1631
1632
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1633
      [lt_cv_apple_cc_single_mod=no
1634
      if test -z "${LT_MULTI_MODULE}"; then
1635
	# By default we will add the -single_module flag. You can override
1636
	# by either setting the environment variable LT_MULTI_MODULE
1637
	# non-empty at configure time, or by adding -multi_module to the
1638
	# link flags.
1639
	rm -rf libconftest.dylib*
1640
	echo "int foo(void){return 1;}" > conftest.c
1641
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1642
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1643
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1644
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1645
        _lt_result=$?
1646
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1647
	  lt_cv_apple_cc_single_mod=yes
1648
	else
1649
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1650
	fi
1651
	rm -rf libconftest.dylib*
1652
	rm -f conftest.*
1653
      fi])
1654
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1655
      [lt_cv_ld_exported_symbols_list],
1656
      [lt_cv_ld_exported_symbols_list=no
1657
      save_LDFLAGS=$LDFLAGS
1658
      echo "_main" > conftest.sym
1659
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1660
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1661
	[lt_cv_ld_exported_symbols_list=yes],
1662
	[lt_cv_ld_exported_symbols_list=no])
1663
	LDFLAGS="$save_LDFLAGS"
1664
    ])
1665
    case $host_os in
1666
    rhapsody* | darwin1.[[012]])
1667
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1668
    darwin1.*)
1669
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1670
    darwin*) # darwin 5.x on
1671
      # if running on 10.5 or later, the deployment target defaults
1672
      # to the OS version, if on x86, and 10.4, the deployment
1673
      # target defaults to 10.4. Don't you love it?
1674
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1675
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1676
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1677
	10.[[012]]*)
1678
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1679
	10.*)
1680
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1681
      esac
1682
    ;;
1683
  esac
1684
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1685
      _lt_dar_single_mod='$single_module'
1686
    fi
1687
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1688
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1689
    else
1690
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1691
    fi
1692
    if test "$DSYMUTIL" != ":"; then
1693
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1694
    else
1695
      _lt_dsymutil=
1696
    fi
1697
    ;;
1698
  esac
1699
])
1700
1701
1702
# _LT_DARWIN_LINKER_FEATURES
1703
# --------------------------
1704
# Checks for linker and compiler features on darwin
1705
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1706
[
1707
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1708
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1709
  _LT_TAGVAR(hardcode_direct, $1)=no
1710
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1711
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1712
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1713
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1714
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1715
  case $cc_basename in
1716
     ifort*) _lt_dar_can_shared=yes ;;
1717
     *) _lt_dar_can_shared=$GCC ;;
1718
  esac
1719
  if test "$_lt_dar_can_shared" = "yes"; then
1720
    output_verbose_link_cmd=echo
1721
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1722
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1723
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1724
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1725
    m4_if([$1], [CXX],
1726
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1727
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1728
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1729
    fi
1730
],[])
1731
  else
1732
  _LT_TAGVAR(ld_shlibs, $1)=no
1733
  fi
1734
])
1735
1736
# _LT_SYS_MODULE_PATH_AIX
1737
# -----------------------
1738
# Links a minimal program and checks the executable
1739
# for the system default hardcoded library path. In most cases,
1740
# this is /usr/lib:/lib, but when the MPI compilers are used
1741
# the location of the communication and MPI libs are included too.
1742
# If we don't find anything, use the default library path according
1743
# to the aix ld manual.
1744
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1745
[m4_require([_LT_DECL_SED])dnl
1746
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1747
lt_aix_libpath_sed='
1748
    /Import File Strings/,/^$/ {
1749
	/^0/ {
1750
	    s/^0  *\(.*\)$/\1/
1751
	    p
1752
	}
1753
    }'
1754
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1755
# Check for a 64-bit object if we didn't find anything.
1756
if test -z "$aix_libpath"; then
1757
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1758
fi],[])
1759
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1760
])# _LT_SYS_MODULE_PATH_AIX
1761
1762
1763
# _LT_SHELL_INIT(ARG)
1764
# -------------------
1765
m4_define([_LT_SHELL_INIT],
1766
[ifdef([AC_DIVERSION_NOTICE],
1767
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1768
	 [AC_DIVERT_PUSH(NOTICE)])
1769
$1
1770
AC_DIVERT_POP
1771
])# _LT_SHELL_INIT
1772
1773
1774
# _LT_PROG_ECHO_BACKSLASH
1775
# -----------------------
1776
# Add some code to the start of the generated configure script which
1777
# will find an echo command which doesn't interpret backslashes.
1778
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1779
[_LT_SHELL_INIT([
1780
# Check that we are running under the correct shell.
1781
SHELL=${CONFIG_SHELL-/bin/sh}
1782
1783
case X$lt_ECHO in
1784
X*--fallback-echo)
1785
  # Remove one level of quotation (which was required for Make).
1786
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1787
  ;;
1788
esac
1789
1790
ECHO=${lt_ECHO-echo}
1791
if test "X[$]1" = X--no-reexec; then
1792
  # Discard the --no-reexec flag, and continue.
1793
  shift
1794
elif test "X[$]1" = X--fallback-echo; then
1795
  # Avoid inline document here, it may be left over
1796
  :
1797
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1798
  # Yippee, $ECHO works!
1799
  :
1800
else
1801
  # Restart under the correct shell.
1802
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1803
fi
1804
1805
if test "X[$]1" = X--fallback-echo; then
1806
  # used as fallback echo
1807
  shift
1808
  cat <<_LT_EOF
1809
[$]*
1810
_LT_EOF
1811
  exit 0
1812
fi
1813
1814
# The HP-UX ksh and POSIX shell print the target directory to stdout
1815
# if CDPATH is set.
1816
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1817
1818
if test -z "$lt_ECHO"; then
1819
  if test "X${echo_test_string+set}" != Xset; then
1820
    # find a string as large as possible, as long as the shell can cope with it
1821
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1822
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1823
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1824
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1825
      then
1826
        break
1827
      fi
1828
    done
1829
  fi
1830
1831
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1832
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1833
     test "X$echo_testing_string" = "X$echo_test_string"; then
1834
    :
1835
  else
1836
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1837
    # backslashes.  This makes it impossible to quote backslashes using
1838
    #   echo "$something" | sed 's/\\/\\\\/g'
1839
    #
1840
    # So, first we look for a working echo in the user's PATH.
1841
1842
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1843
    for dir in $PATH /usr/ucb; do
1844
      IFS="$lt_save_ifs"
1845
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1846
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1847
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1848
         test "X$echo_testing_string" = "X$echo_test_string"; then
1849
        ECHO="$dir/echo"
1850
        break
1851
      fi
1852
    done
1853
    IFS="$lt_save_ifs"
1854
1855
    if test "X$ECHO" = Xecho; then
1856
      # We didn't find a better echo, so look for alternatives.
1857
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1858
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1859
         test "X$echo_testing_string" = "X$echo_test_string"; then
1860
        # This shell has a builtin print -r that does the trick.
1861
        ECHO='print -r'
1862
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1863
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1864
        # If we have ksh, try running configure again with it.
1865
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1866
        export ORIGINAL_CONFIG_SHELL
1867
        CONFIG_SHELL=/bin/ksh
1868
        export CONFIG_SHELL
1869
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1870
      else
1871
        # Try using printf.
1872
        ECHO='printf %s\n'
1873
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1874
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1875
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1876
	  # Cool, printf works
1877
	  :
1878
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1879
	     test "X$echo_testing_string" = 'X\t' &&
1880
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1881
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1882
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1883
	  export CONFIG_SHELL
1884
	  SHELL="$CONFIG_SHELL"
1885
	  export SHELL
1886
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1887
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1888
	     test "X$echo_testing_string" = 'X\t' &&
1889
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1890
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1891
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1892
        else
1893
	  # maybe with a smaller string...
1894
	  prev=:
1895
1896
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1897
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1898
	    then
1899
	      break
1900
	    fi
1901
	    prev="$cmd"
1902
	  done
1903
1904
	  if test "$prev" != 'sed 50q "[$]0"'; then
1905
	    echo_test_string=`eval $prev`
1906
	    export echo_test_string
1907
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1908
	  else
1909
	    # Oops.  We lost completely, so just stick with echo.
1910
	    ECHO=echo
1911
	  fi
1912
        fi
1913
      fi
1914
    fi
1915
  fi
1916
fi
1917
1918
# Copy echo and quote the copy suitably for passing to libtool from
1919
# the Makefile, instead of quoting the original, which is used later.
1920
lt_ECHO=$ECHO
1921
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1922
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1923
fi
1924
1925
AC_SUBST(lt_ECHO)
1926
])
1927
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1928
_LT_DECL([], [ECHO], [1],
1929
    [An echo program that does not interpret backslashes])
1930
])# _LT_PROG_ECHO_BACKSLASH
1931
1932
1933
# _LT_ENABLE_LOCK
1934
# ---------------
1935
m4_defun([_LT_ENABLE_LOCK],
1936
[AC_ARG_ENABLE([libtool-lock],
1937
  [AS_HELP_STRING([--disable-libtool-lock],
1938
    [avoid locking (might break parallel builds)])])
1939
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1940
1941
# Some flags need to be propagated to the compiler or linker for good
1942
# libtool support.
1943
case $host in
1944
ia64-*-hpux*)
1945
  # Find out which ABI we are using.
1946
  echo 'int i;' > conftest.$ac_ext
1947
  if AC_TRY_EVAL(ac_compile); then
1948
    case `/usr/bin/file conftest.$ac_objext` in
1949
      *ELF-32*)
1950
	HPUX_IA64_MODE="32"
1951
	;;
1952
      *ELF-64*)
1953
	HPUX_IA64_MODE="64"
1954
	;;
1955
    esac
1956
  fi
1957
  rm -rf conftest*
1958
  ;;
1959
*-*-irix6*)
1960
  # Find out which ABI we are using.
1961
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1962
  if AC_TRY_EVAL(ac_compile); then
1963
    if test "$lt_cv_prog_gnu_ld" = yes; then
1964
      case `/usr/bin/file conftest.$ac_objext` in
1965
	*32-bit*)
1966
	  LD="${LD-ld} -melf32bsmip"
1967
	  ;;
1968
	*N32*)
1969
	  LD="${LD-ld} -melf32bmipn32"
1970
	  ;;
1971
	*64-bit*)
1972
	  LD="${LD-ld} -melf64bmip"
1973
	;;
1974
      esac
1975
    else
1976
      case `/usr/bin/file conftest.$ac_objext` in
1977
	*32-bit*)
1978
	  LD="${LD-ld} -32"
1979
	  ;;
1980
	*N32*)
1981
	  LD="${LD-ld} -n32"
1982
	  ;;
1983
	*64-bit*)
1984
	  LD="${LD-ld} -64"
1985
	  ;;
1986
      esac
1987
    fi
1988
  fi
1989
  rm -rf conftest*
1990
  ;;
1991
1992
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1993
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1994
  # Find out which ABI we are using.
1995
  echo 'int i;' > conftest.$ac_ext
1996
  if AC_TRY_EVAL(ac_compile); then
1997
    case `/usr/bin/file conftest.o` in
1998
      *32-bit*)
1999
	case $host in
2000
	  x86_64-*kfreebsd*-gnu)
2001
	    LD="${LD-ld} -m elf_i386_fbsd"
2002
	    ;;
2003
	  x86_64-*linux*)
2004
	    LD="${LD-ld} -m elf_i386"
2005
	    ;;
2006
	  ppc64-*linux*|powerpc64-*linux*)
2007
	    LD="${LD-ld} -m elf32ppclinux"
2008
	    ;;
2009
	  s390x-*linux*)
2010
	    LD="${LD-ld} -m elf_s390"
2011
	    ;;
2012
	  sparc64-*linux*)
2013
	    LD="${LD-ld} -m elf32_sparc"
2014
	    ;;
2015
	esac
2016
	;;
2017
      *64-bit*)
2018
	case $host in
2019
	  x86_64-*kfreebsd*-gnu)
2020
	    LD="${LD-ld} -m elf_x86_64_fbsd"
2021
	    ;;
2022
	  x86_64-*linux*)
2023
	    LD="${LD-ld} -m elf_x86_64"
2024
	    ;;
2025
	  ppc*-*linux*|powerpc*-*linux*)
2026
	    LD="${LD-ld} -m elf64ppc"
2027
	    ;;
2028
	  s390*-*linux*|s390*-*tpf*)
2029
	    LD="${LD-ld} -m elf64_s390"
2030
	    ;;
2031
	  sparc*-*linux*)
2032
	    LD="${LD-ld} -m elf64_sparc"
2033
	    ;;
2034
	esac
2035
	;;
2036
    esac
2037
  fi
2038
  rm -rf conftest*
2039
  ;;
2040
2041
*-*-sco3.2v5*)
2042
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2043
  SAVE_CFLAGS="$CFLAGS"
2044
  CFLAGS="$CFLAGS -belf"
2045
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2046
    [AC_LANG_PUSH(C)
2047
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2048
     AC_LANG_POP])
2049
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2050
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2051
    CFLAGS="$SAVE_CFLAGS"
2052
  fi
2053
  ;;
2054
sparc*-*solaris*)
2055
  # Find out which ABI we are using.
2056
  echo 'int i;' > conftest.$ac_ext
2057
  if AC_TRY_EVAL(ac_compile); then
2058
    case `/usr/bin/file conftest.o` in
2059
    *64-bit*)
2060
      case $lt_cv_prog_gnu_ld in
2061
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2062
      *)
2063
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2064
	  LD="${LD-ld} -64"
2065
	fi
2066
	;;
2067
      esac
2068
      ;;
2069
    esac
2070
  fi
2071
  rm -rf conftest*
2072
  ;;
2073
esac
2074
2075
need_locks="$enable_libtool_lock"
2076
])# _LT_ENABLE_LOCK
2077
2078
2079
# _LT_CMD_OLD_ARCHIVE
2080
# -------------------
2081
m4_defun([_LT_CMD_OLD_ARCHIVE],
2082
[AC_CHECK_TOOL(AR, ar, false)
2083
test -z "$AR" && AR=ar
2084
test -z "$AR_FLAGS" && AR_FLAGS=cru
2085
_LT_DECL([], [AR], [1], [The archiver])
2086
_LT_DECL([], [AR_FLAGS], [1])
2087
2088
AC_CHECK_TOOL(STRIP, strip, :)
2089
test -z "$STRIP" && STRIP=:
2090
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2091
2092
AC_CHECK_TOOL(RANLIB, ranlib, :)
2093
test -z "$RANLIB" && RANLIB=:
2094
_LT_DECL([], [RANLIB], [1],
2095
    [Commands used to install an old-style archive])
2096
2097
# Determine commands to create old-style static archives.
2098
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2099
old_postinstall_cmds='chmod 644 $oldlib'
2100
old_postuninstall_cmds=
2101
2102
if test -n "$RANLIB"; then
2103
  case $host_os in
2104
  openbsd*)
2105
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2106
    ;;
2107
  *)
2108
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2109
    ;;
2110
  esac
2111
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2112
fi
2113
_LT_DECL([], [old_postinstall_cmds], [2])
2114
_LT_DECL([], [old_postuninstall_cmds], [2])
2115
_LT_TAGDECL([], [old_archive_cmds], [2],
2116
    [Commands used to build an old-style archive])
2117
])# _LT_CMD_OLD_ARCHIVE
2118
2119
2120
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2121
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2122
# ----------------------------------------------------------------
2123
# Check whether the given compiler option works
2124
AC_DEFUN([_LT_COMPILER_OPTION],
2125
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2126
m4_require([_LT_DECL_SED])dnl
2127
AC_CACHE_CHECK([$1], [$2],
2128
  [$2=no
2129
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2130
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2131
   lt_compiler_flag="$3"
2132
   # Insert the option either (1) after the last *FLAGS variable, or
2133
   # (2) before a word containing "conftest.", or (3) at the end.
2134
   # Note that $ac_compile itself does not contain backslashes and begins
2135
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2136
   # The option is referenced via a variable to avoid confusing sed.
2137
   lt_compile=`echo "$ac_compile" | $SED \
2138
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2139
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2140
   -e 's:$: $lt_compiler_flag:'`
2141
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2142
   (eval "$lt_compile" 2>conftest.err)
2143
   ac_status=$?
2144
   cat conftest.err >&AS_MESSAGE_LOG_FD
2145
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2146
   if (exit $ac_status) && test -s "$ac_outfile"; then
2147
     # The compiler can only warn and ignore the option if not recognized
2148
     # So say no if there are warnings other than the usual output.
2149
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2150
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2151
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2152
       $2=yes
2153
     fi
2154
   fi
2155
   $RM conftest*
2156
])
2157
2158
if test x"[$]$2" = xyes; then
2159
    m4_if([$5], , :, [$5])
2160
else
2161
    m4_if([$6], , :, [$6])
2162
fi
2163
])# _LT_COMPILER_OPTION
2164
2165
# Old name:
2166
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2167
dnl aclocal-1.4 backwards compatibility:
2168
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2169
2170
2171
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2172
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2173
# ----------------------------------------------------
2174
# Check whether the given linker option works
2175
AC_DEFUN([_LT_LINKER_OPTION],
2176
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2177
m4_require([_LT_DECL_SED])dnl
2178
AC_CACHE_CHECK([$1], [$2],
2179
  [$2=no
2180
   save_LDFLAGS="$LDFLAGS"
2181
   LDFLAGS="$LDFLAGS $3"
2182
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2183
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2184
     # The linker can only warn and ignore the option if not recognized
2185
     # So say no if there are warnings
2186
     if test -s conftest.err; then
2187
       # Append any errors to the config.log.
2188
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2189
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2190
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2191
       if diff conftest.exp conftest.er2 >/dev/null; then
2192
         $2=yes
2193
       fi
2194
     else
2195
       $2=yes
2196
     fi
2197
   fi
2198
   $RM -r conftest*
2199
   LDFLAGS="$save_LDFLAGS"
2200
])
2201
2202
if test x"[$]$2" = xyes; then
2203
    m4_if([$4], , :, [$4])
2204
else
2205
    m4_if([$5], , :, [$5])
2206
fi
2207
])# _LT_LINKER_OPTION
2208
2209
# Old name:
2210
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2211
dnl aclocal-1.4 backwards compatibility:
2212
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2213
2214
2215
# LT_CMD_MAX_LEN
2216
#---------------
2217
AC_DEFUN([LT_CMD_MAX_LEN],
2218
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2219
# find the maximum length of command line arguments
2220
AC_MSG_CHECKING([the maximum length of command line arguments])
2221
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2222
  i=0
2223
  teststring="ABCD"
2224
2225
  case $build_os in
2226
  msdosdjgpp*)
2227
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2228
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2229
    # during glob expansion).  Even if it were fixed, the result of this
2230
    # check would be larger than it should be.
2231
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2232
    ;;
2233
2234
  gnu*)
2235
    # Under GNU Hurd, this test is not required because there is
2236
    # no limit to the length of command line arguments.
2237
    # Libtool will interpret -1 as no limit whatsoever
2238
    lt_cv_sys_max_cmd_len=-1;
2239
    ;;
2240
2241
  cygwin* | mingw* | cegcc*)
2242
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2243
    # about 5 minutes as the teststring grows exponentially.
2244
    # Worse, since 9x/ME are not pre-emptively multitasking,
2245
    # you end up with a "frozen" computer, even though with patience
2246
    # the test eventually succeeds (with a max line length of 256k).
2247
    # Instead, let's just punt: use the minimum linelength reported by
2248
    # all of the supported platforms: 8192 (on NT/2K/XP).
2249
    lt_cv_sys_max_cmd_len=8192;
2250
    ;;
2251
2252
  amigaos*)
2253
    # On AmigaOS with pdksh, this test takes hours, literally.
2254
    # So we just punt and use a minimum line length of 8192.
2255
    lt_cv_sys_max_cmd_len=8192;
2256
    ;;
2257
2258
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2259
    # This has been around since 386BSD, at least.  Likely further.
2260
    if test -x /sbin/sysctl; then
2261
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2262
    elif test -x /usr/sbin/sysctl; then
2263
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2264
    else
2265
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2266
    fi
2267
    # And add a safety zone
2268
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2269
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2270
    ;;
2271
2272
  interix*)
2273
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2274
    lt_cv_sys_max_cmd_len=196608
2275
    ;;
2276
2277
  osf*)
2278
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2279
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2280
    # nice to cause kernel panics so lets avoid the loop below.
2281
    # First set a reasonable default.
2282
    lt_cv_sys_max_cmd_len=16384
2283
    #
2284
    if test -x /sbin/sysconfig; then
2285
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2286
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2287
      esac
2288
    fi
2289
    ;;
2290
  sco3.2v5*)
2291
    lt_cv_sys_max_cmd_len=102400
2292
    ;;
2293
  sysv5* | sco5v6* | sysv4.2uw2*)
2294
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2295
    if test -n "$kargmax"; then
2296
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2297
    else
2298
      lt_cv_sys_max_cmd_len=32768
2299
    fi
2300
    ;;
2301
  *)
2302
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2303
    if test -n "$lt_cv_sys_max_cmd_len"; then
2304
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2305
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2306
    else
2307
      # Make teststring a little bigger before we do anything with it.
2308
      # a 1K string should be a reasonable start.
2309
      for i in 1 2 3 4 5 6 7 8 ; do
2310
        teststring=$teststring$teststring
2311
      done
2312
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2313
      # If test is not a shell built-in, we'll probably end up computing a
2314
      # maximum length that is only half of the actual maximum length, but
2315
      # we can't tell.
2316
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2317
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2318
	      test $i != 17 # 1/2 MB should be enough
2319
      do
2320
        i=`expr $i + 1`
2321
        teststring=$teststring$teststring
2322
      done
2323
      # Only check the string length outside the loop.
2324
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2325
      teststring=
2326
      # Add a significant safety factor because C++ compilers can tack on
2327
      # massive amounts of additional arguments before passing them to the
2328
      # linker.  It appears as though 1/2 is a usable value.
2329
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2330
    fi
2331
    ;;
2332
  esac
2333
])
2334
if test -n $lt_cv_sys_max_cmd_len ; then
2335
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2336
else
2337
  AC_MSG_RESULT(none)
2338
fi
2339
max_cmd_len=$lt_cv_sys_max_cmd_len
2340
_LT_DECL([], [max_cmd_len], [0],
2341
    [What is the maximum length of a command?])
2342
])# LT_CMD_MAX_LEN
2343
2344
# Old name:
2345
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2346
dnl aclocal-1.4 backwards compatibility:
2347
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2348
2349
2350
# _LT_HEADER_DLFCN
2351
# ----------------
2352
m4_defun([_LT_HEADER_DLFCN],
2353
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2354
])# _LT_HEADER_DLFCN
2355
2356
2357
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2358
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2359
# ----------------------------------------------------------------
2360
m4_defun([_LT_TRY_DLOPEN_SELF],
2361
[m4_require([_LT_HEADER_DLFCN])dnl
2362
if test "$cross_compiling" = yes; then :
2363
  [$4]
2364
else
2365
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2366
  lt_status=$lt_dlunknown
2367
  cat > conftest.$ac_ext <<_LT_EOF
2368
[#line __oline__ "configure"
2369
#include "confdefs.h"
2370
2371
#if HAVE_DLFCN_H
2372
#include <dlfcn.h>
2373
#endif
2374
2375
#include <stdio.h>
2376
2377
#ifdef RTLD_GLOBAL
2378
#  define LT_DLGLOBAL		RTLD_GLOBAL
2379
#else
2380
#  ifdef DL_GLOBAL
2381
#    define LT_DLGLOBAL		DL_GLOBAL
2382
#  else
2383
#    define LT_DLGLOBAL		0
2384
#  endif
2385
#endif
2386
2387
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2388
   find out it does not work in some platform. */
2389
#ifndef LT_DLLAZY_OR_NOW
2390
#  ifdef RTLD_LAZY
2391
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2392
#  else
2393
#    ifdef DL_LAZY
2394
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2395
#    else
2396
#      ifdef RTLD_NOW
2397
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2398
#      else
2399
#        ifdef DL_NOW
2400
#          define LT_DLLAZY_OR_NOW	DL_NOW
2401
#        else
2402
#          define LT_DLLAZY_OR_NOW	0
2403
#        endif
2404
#      endif
2405
#    endif
2406
#  endif
2407
#endif
2408
2409
void fnord() { int i=42;}
2410
int main ()
2411
{
2412
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2413
  int status = $lt_dlunknown;
2414
2415
  if (self)
2416
    {
2417
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2418
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2419
      /* dlclose (self); */
2420
    }
2421
  else
2422
    puts (dlerror ());
2423
2424
  return status;
2425
}]
2426
_LT_EOF
2427
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2428
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2429
    lt_status=$?
2430
    case x$lt_status in
2431
      x$lt_dlno_uscore) $1 ;;
2432
      x$lt_dlneed_uscore) $2 ;;
2433
      x$lt_dlunknown|x*) $3 ;;
2434
    esac
2435
  else :
2436
    # compilation failed
2437
    $3
2438
  fi
2439
fi
2440
rm -fr conftest*
2441
])# _LT_TRY_DLOPEN_SELF
2442
2443
2444
# LT_SYS_DLOPEN_SELF
2445
# ------------------
2446
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2447
[m4_require([_LT_HEADER_DLFCN])dnl
2448
if test "x$enable_dlopen" != xyes; then
2449
  enable_dlopen=unknown
2450
  enable_dlopen_self=unknown
2451
  enable_dlopen_self_static=unknown
2452
else
2453
  lt_cv_dlopen=no
2454
  lt_cv_dlopen_libs=
2455
2456
  case $host_os in
2457
  beos*)
2458
    lt_cv_dlopen="load_add_on"
2459
    lt_cv_dlopen_libs=
2460
    lt_cv_dlopen_self=yes
2461
    ;;
2462
2463
  mingw* | pw32* | cegcc*)
2464
    lt_cv_dlopen="LoadLibrary"
2465
    lt_cv_dlopen_libs=
2466
    ;;
2467
2468
  cygwin*)
2469
    lt_cv_dlopen="dlopen"
2470
    lt_cv_dlopen_libs=
2471
    ;;
2472
2473
  darwin*)
2474
  # if libdl is installed we need to link against it
2475
    AC_CHECK_LIB([dl], [dlopen],
2476
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2477
    lt_cv_dlopen="dyld"
2478
    lt_cv_dlopen_libs=
2479
    lt_cv_dlopen_self=yes
2480
    ])
2481
    ;;
2482
2483
  *)
2484
    AC_CHECK_FUNC([shl_load],
2485
	  [lt_cv_dlopen="shl_load"],
2486
      [AC_CHECK_LIB([dld], [shl_load],
2487
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2488
	[AC_CHECK_FUNC([dlopen],
2489
	      [lt_cv_dlopen="dlopen"],
2490
	  [AC_CHECK_LIB([dl], [dlopen],
2491
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2492
	    [AC_CHECK_LIB([svld], [dlopen],
2493
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2494
	      [AC_CHECK_LIB([dld], [dld_link],
2495
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2496
	      ])
2497
	    ])
2498
	  ])
2499
	])
2500
      ])
2501
    ;;
2502
  esac
2503
2504
  if test "x$lt_cv_dlopen" != xno; then
2505
    enable_dlopen=yes
2506
  else
2507
    enable_dlopen=no
2508
  fi
2509
2510
  case $lt_cv_dlopen in
2511
  dlopen)
2512
    save_CPPFLAGS="$CPPFLAGS"
2513
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2514
2515
    save_LDFLAGS="$LDFLAGS"
2516
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2517
2518
    save_LIBS="$LIBS"
2519
    LIBS="$lt_cv_dlopen_libs $LIBS"
2520
2521
    AC_CACHE_CHECK([whether a program can dlopen itself],
2522
	  lt_cv_dlopen_self, [dnl
2523
	  _LT_TRY_DLOPEN_SELF(
2524
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2525
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2526
    ])
2527
2528
    if test "x$lt_cv_dlopen_self" = xyes; then
2529
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2530
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2531
	  lt_cv_dlopen_self_static, [dnl
2532
	  _LT_TRY_DLOPEN_SELF(
2533
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2534
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2535
      ])
2536
    fi
2537
2538
    CPPFLAGS="$save_CPPFLAGS"
2539
    LDFLAGS="$save_LDFLAGS"
2540
    LIBS="$save_LIBS"
2541
    ;;
2542
  esac
2543
2544
  case $lt_cv_dlopen_self in
2545
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2546
  *) enable_dlopen_self=unknown ;;
2547
  esac
2548
2549
  case $lt_cv_dlopen_self_static in
2550
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2551
  *) enable_dlopen_self_static=unknown ;;
2552
  esac
2553
fi
2554
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2555
	 [Whether dlopen is supported])
2556
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2557
	 [Whether dlopen of programs is supported])
2558
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2559
	 [Whether dlopen of statically linked programs is supported])
2560
])# LT_SYS_DLOPEN_SELF
2561
2562
# Old name:
2563
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2564
dnl aclocal-1.4 backwards compatibility:
2565
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2566
2567
2568
# _LT_COMPILER_C_O([TAGNAME])
2569
# ---------------------------
2570
# Check to see if options -c and -o are simultaneously supported by compiler.
2571
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2572
m4_defun([_LT_COMPILER_C_O],
2573
[m4_require([_LT_DECL_SED])dnl
2574
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2575
m4_require([_LT_TAG_COMPILER])dnl
2576
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2577
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2578
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2579
   $RM -r conftest 2>/dev/null
2580
   mkdir conftest
2581
   cd conftest
2582
   mkdir out
2583
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2584
2585
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2586
   # Insert the option either (1) after the last *FLAGS variable, or
2587
   # (2) before a word containing "conftest.", or (3) at the end.
2588
   # Note that $ac_compile itself does not contain backslashes and begins
2589
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2590
   lt_compile=`echo "$ac_compile" | $SED \
2591
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2592
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2593
   -e 's:$: $lt_compiler_flag:'`
2594
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2595
   (eval "$lt_compile" 2>out/conftest.err)
2596
   ac_status=$?
2597
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2598
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2599
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2600
   then
2601
     # The compiler can only warn and ignore the option if not recognized
2602
     # So say no if there are warnings
2603
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2604
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2605
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2606
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2607
     fi
2608
   fi
2609
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2610
   $RM conftest*
2611
   # SGI C++ compiler will create directory out/ii_files/ for
2612
   # template instantiation
2613
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2614
   $RM out/* && rmdir out
2615
   cd ..
2616
   $RM -r conftest
2617
   $RM conftest*
2618
])
2619
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2620
	[Does compiler simultaneously support -c and -o options?])
2621
])# _LT_COMPILER_C_O
2622
2623
2624
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2625
# ----------------------------------
2626
# Check to see if we can do hard links to lock some files if needed
2627
m4_defun([_LT_COMPILER_FILE_LOCKS],
2628
[m4_require([_LT_ENABLE_LOCK])dnl
2629
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2630
_LT_COMPILER_C_O([$1])
2631
2632
hard_links="nottested"
2633
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2634
  # do not overwrite the value of need_locks provided by the user
2635
  AC_MSG_CHECKING([if we can lock with hard links])
2636
  hard_links=yes
2637
  $RM conftest*
2638
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2639
  touch conftest.a
2640
  ln conftest.a conftest.b 2>&5 || hard_links=no
2641
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2642
  AC_MSG_RESULT([$hard_links])
2643
  if test "$hard_links" = no; then
2644
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2645
    need_locks=warn
2646
  fi
2647
else
2648
  need_locks=no
2649
fi
2650
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2651
])# _LT_COMPILER_FILE_LOCKS
2652
2653
2654
# _LT_CHECK_OBJDIR
2655
# ----------------
2656
m4_defun([_LT_CHECK_OBJDIR],
2657
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2658
[rm -f .libs 2>/dev/null
2659
mkdir .libs 2>/dev/null
2660
if test -d .libs; then
2661
  lt_cv_objdir=.libs
2662
else
2663
  # MS-DOS does not allow filenames that begin with a dot.
2664
  lt_cv_objdir=_libs
2665
fi
2666
rmdir .libs 2>/dev/null])
2667
objdir=$lt_cv_objdir
2668
_LT_DECL([], [objdir], [0],
2669
         [The name of the directory that contains temporary libtool files])dnl
2670
m4_pattern_allow([LT_OBJDIR])dnl
2671
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2672
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2673
])# _LT_CHECK_OBJDIR
2674
2675
2676
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2677
# --------------------------------------
2678
# Check hardcoding attributes.
2679
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2680
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2681
_LT_TAGVAR(hardcode_action, $1)=
2682
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2683
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2684
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2685
2686
  # We can hardcode non-existent directories.
2687
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2688
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2689
     # have to relink, otherwise we might link with an installed library
2690
     # when we should be linking with a yet-to-be-installed one
2691
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2692
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2693
    # Linking always hardcodes the temporary library directory.
2694
    _LT_TAGVAR(hardcode_action, $1)=relink
2695
  else
2696
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2697
    _LT_TAGVAR(hardcode_action, $1)=immediate
2698
  fi
2699
else
2700
  # We cannot hardcode anything, or else we can only hardcode existing
2701
  # directories.
2702
  _LT_TAGVAR(hardcode_action, $1)=unsupported
2703
fi
2704
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2705
2706
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2707
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2708
  # Fast installation is not supported
2709
  enable_fast_install=no
2710
elif test "$shlibpath_overrides_runpath" = yes ||
2711
     test "$enable_shared" = no; then
2712
  # Fast installation is not necessary
2713
  enable_fast_install=needless
2714
fi
2715
_LT_TAGDECL([], [hardcode_action], [0],
2716
    [How to hardcode a shared library path into an executable])
2717
])# _LT_LINKER_HARDCODE_LIBPATH
2718
2719
2720
# _LT_CMD_STRIPLIB
2721
# ----------------
2722
m4_defun([_LT_CMD_STRIPLIB],
2723
[m4_require([_LT_DECL_EGREP])
2724
striplib=
2725
old_striplib=
2726
AC_MSG_CHECKING([whether stripping libraries is possible])
2727
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2728
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2729
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2730
  AC_MSG_RESULT([yes])
2731
else
2732
# FIXME - insert some real tests, host_os isn't really good enough
2733
  case $host_os in
2734
  darwin*)
2735
    if test -n "$STRIP" ; then
2736
      striplib="$STRIP -x"
2737
      old_striplib="$STRIP -S"
2738
      AC_MSG_RESULT([yes])
2739
    else
2740
      AC_MSG_RESULT([no])
2741
    fi
2742
    ;;
2743
  *)
2744
    AC_MSG_RESULT([no])
2745
    ;;
2746
  esac
2747
fi
2748
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2749
_LT_DECL([], [striplib], [1])
2750
])# _LT_CMD_STRIPLIB
2751
2752
2753
# _LT_SYS_DYNAMIC_LINKER([TAG])
2754
# -----------------------------
2755
# PORTME Fill in your ld.so characteristics
2756
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2757
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2758
m4_require([_LT_DECL_EGREP])dnl
2759
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2760
m4_require([_LT_DECL_OBJDUMP])dnl
2761
m4_require([_LT_DECL_SED])dnl
2762
AC_MSG_CHECKING([dynamic linker characteristics])
2763
m4_if([$1],
2764
	[], [
2765
if test "$GCC" = yes; then
2766
  case $host_os in
2767
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2768
    *) lt_awk_arg="/^libraries:/" ;;
2769
  esac
2770
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2771
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2772
    # if the path contains ";" then we assume it to be the separator
2773
    # otherwise default to the standard path separator (i.e. ":") - it is
2774
    # assumed that no part of a normal pathname contains ";" but that should
2775
    # okay in the real world where ";" in dirpaths is itself problematic.
2776
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2777
  else
2778
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2779
  fi
2780
  # Ok, now we have the path, separated by spaces, we can step through it
2781
  # and add multilib dir if necessary.
2782
  lt_tmp_lt_search_path_spec=
2783
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2784
  for lt_sys_path in $lt_search_path_spec; do
2785
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2786
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2787
    else
2788
      test -d "$lt_sys_path" && \
2789
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2790
    fi
2791
  done
2792
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2793
BEGIN {RS=" "; FS="/|\n";} {
2794
  lt_foo="";
2795
  lt_count=0;
2796
  for (lt_i = NF; lt_i > 0; lt_i--) {
2797
    if ($lt_i != "" && $lt_i != ".") {
2798
      if ($lt_i == "..") {
2799
        lt_count++;
2800
      } else {
2801
        if (lt_count == 0) {
2802
          lt_foo="/" $lt_i lt_foo;
2803
        } else {
2804
          lt_count--;
2805
        }
2806
      }
2807
    }
2808
  }
2809
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2810
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2811
}'`
2812
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2813
else
2814
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2815
fi])
2816
library_names_spec=
2817
libname_spec='lib$name'
2818
soname_spec=
2819
shrext_cmds=".so"
2820
postinstall_cmds=
2821
postuninstall_cmds=
2822
finish_cmds=
2823
finish_eval=
2824
shlibpath_var=
2825
shlibpath_overrides_runpath=unknown
2826
version_type=none
2827
dynamic_linker="$host_os ld.so"
2828
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2829
need_lib_prefix=unknown
2830
hardcode_into_libs=no
2831
2832
# when you set need_version to no, make sure it does not cause -set_version
2833
# flags to be left without arguments
2834
need_version=unknown
2835
2836
case $host_os in
2837
aix3*)
2838
  version_type=linux
2839
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2840
  shlibpath_var=LIBPATH
2841
2842
  # AIX 3 has no versioning support, so we append a major version to the name.
2843
  soname_spec='${libname}${release}${shared_ext}$major'
2844
  ;;
2845
2846
aix[[4-9]]*)
2847
  version_type=linux
2848
  need_lib_prefix=no
2849
  need_version=no
2850
  hardcode_into_libs=yes
2851
  if test "$host_cpu" = ia64; then
2852
    # AIX 5 supports IA64
2853
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2854
    shlibpath_var=LD_LIBRARY_PATH
2855
  else
2856
    # With GCC up to 2.95.x, collect2 would create an import file
2857
    # for dependence libraries.  The import file would start with
2858
    # the line `#! .'.  This would cause the generated library to
2859
    # depend on `.', always an invalid library.  This was fixed in
2860
    # development snapshots of GCC prior to 3.0.
2861
    case $host_os in
2862
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2863
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2864
	   echo ' yes '
2865
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2866
	:
2867
      else
2868
	can_build_shared=no
2869
      fi
2870
      ;;
2871
    esac
2872
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2873
    # soname into executable. Probably we can add versioning support to
2874
    # collect2, so additional links can be useful in future.
2875
    if test "$aix_use_runtimelinking" = yes; then
2876
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2877
      # instead of lib<name>.a to let people know that these are not
2878
      # typical AIX shared libraries.
2879
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2880
    else
2881
      # We preserve .a as extension for shared libraries through AIX4.2
2882
      # and later when we are not doing run time linking.
2883
      library_names_spec='${libname}${release}.a $libname.a'
2884
      soname_spec='${libname}${release}${shared_ext}$major'
2885
    fi
2886
    shlibpath_var=LIBPATH
2887
  fi
2888
  ;;
2889
2890
amigaos*)
2891
  case $host_cpu in
2892
  powerpc)
2893
    # Since July 2007 AmigaOS4 officially supports .so libraries.
2894
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2895
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2896
    ;;
2897
  m68k)
2898
    library_names_spec='$libname.ixlibrary $libname.a'
2899
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2900
    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'
2901
    ;;
2902
  esac
2903
  ;;
2904
2905
beos*)
2906
  library_names_spec='${libname}${shared_ext}'
2907
  dynamic_linker="$host_os ld.so"
2908
  shlibpath_var=LIBRARY_PATH
2909
  ;;
2910
2911
bsdi[[45]]*)
2912
  version_type=linux
2913
  need_version=no
2914
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2915
  soname_spec='${libname}${release}${shared_ext}$major'
2916
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2917
  shlibpath_var=LD_LIBRARY_PATH
2918
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2919
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2920
  # the default ld.so.conf also contains /usr/contrib/lib and
2921
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2922
  # libtool to hard-code these into programs
2923
  ;;
2924
2925
cygwin* | mingw* | pw32* | cegcc*)
2926
  version_type=windows
2927
  shrext_cmds=".dll"
2928
  need_version=no
2929
  need_lib_prefix=no
2930
2931
  case $GCC,$host_os in
2932
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2933
    library_names_spec='$libname.dll.a'
2934
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2935
    postinstall_cmds='base_file=`basename \${file}`~
2936
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2937
      dldir=$destdir/`dirname \$dlpath`~
2938
      test -d \$dldir || mkdir -p \$dldir~
2939
      $install_prog $dir/$dlname \$dldir/$dlname~
2940
      chmod a+x \$dldir/$dlname~
2941
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2942
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2943
      fi'
2944
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2945
      dlpath=$dir/\$dldll~
2946
       $RM \$dlpath'
2947
    shlibpath_overrides_runpath=yes
2948
2949
    case $host_os in
2950
    cygwin*)
2951
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2952
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2953
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2954
      ;;
2955
    mingw* | cegcc*)
2956
      # MinGW DLLs use traditional 'lib' prefix
2957
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2958
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2959
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2960
        # It is most probably a Windows format PATH printed by
2961
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2962
        # path with ; separators, and with drive letters. We can handle the
2963
        # drive letters (cygwin fileutils understands them), so leave them,
2964
        # especially as we might pass files found there to a mingw objdump,
2965
        # which wouldn't understand a cygwinified path. Ahh.
2966
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2967
      else
2968
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2969
      fi
2970
      ;;
2971
    pw32*)
2972
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2973
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2974
      ;;
2975
    esac
2976
    ;;
2977
2978
  *)
2979
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2980
    ;;
2981
  esac
2982
  dynamic_linker='Win32 ld.exe'
2983
  # FIXME: first we should search . and the directory the executable is in
2984
  shlibpath_var=PATH
2985
  ;;
2986
2987
darwin* | rhapsody*)
2988
  dynamic_linker="$host_os dyld"
2989
  version_type=darwin
2990
  need_lib_prefix=no
2991
  need_version=no
2992
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2993
  soname_spec='${libname}${release}${major}$shared_ext'
2994
  shlibpath_overrides_runpath=yes
2995
  shlibpath_var=DYLD_LIBRARY_PATH
2996
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2997
m4_if([$1], [],[
2998
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2999
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3000
  ;;
3001
3002
dgux*)
3003
  version_type=linux
3004
  need_lib_prefix=no
3005
  need_version=no
3006
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3007
  soname_spec='${libname}${release}${shared_ext}$major'
3008
  shlibpath_var=LD_LIBRARY_PATH
3009
  ;;
3010
3011
freebsd1*)
3012
  dynamic_linker=no
3013
  ;;
3014
3015
freebsd* | dragonfly*)
3016
  # DragonFly does not have aout.  When/if they implement a new
3017
  # versioning mechanism, adjust this.
3018
  if test -x /usr/bin/objformat; then
3019
    objformat=`/usr/bin/objformat`
3020
  else
3021
    case $host_os in
3022
    freebsd[[123]]*) objformat=aout ;;
3023
    *) objformat=elf ;;
3024
    esac
3025
  fi
3026
  version_type=freebsd-$objformat
3027
  case $version_type in
3028
    freebsd-elf*)
3029
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3030
      need_version=no
3031
      need_lib_prefix=no
3032
      ;;
3033
    freebsd-*)
3034
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3035
      need_version=yes
3036
      ;;
3037
  esac
3038
  shlibpath_var=LD_LIBRARY_PATH
3039
  case $host_os in
3040
  freebsd2*)
3041
    shlibpath_overrides_runpath=yes
3042
    ;;
3043
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3044
    shlibpath_overrides_runpath=yes
3045
    hardcode_into_libs=yes
3046
    ;;
3047
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3048
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3049
    shlibpath_overrides_runpath=no
3050
    hardcode_into_libs=yes
3051
    ;;
3052
  *) # from 4.6 on, and DragonFly
3053
    shlibpath_overrides_runpath=yes
3054
    hardcode_into_libs=yes
3055
    ;;
3056
  esac
3057
  ;;
3058
3059
gnu*)
3060
  version_type=linux
3061
  need_lib_prefix=no
3062
  need_version=no
3063
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3064
  soname_spec='${libname}${release}${shared_ext}$major'
3065
  shlibpath_var=LD_LIBRARY_PATH
3066
  hardcode_into_libs=yes
3067
  ;;
3068
3069
hpux9* | hpux10* | hpux11*)
3070
  # Give a soname corresponding to the major version so that dld.sl refuses to
3071
  # link against other versions.
3072
  version_type=sunos
3073
  need_lib_prefix=no
3074
  need_version=no
3075
  case $host_cpu in
3076
  ia64*)
3077
    shrext_cmds='.so'
3078
    hardcode_into_libs=yes
3079
    dynamic_linker="$host_os dld.so"
3080
    shlibpath_var=LD_LIBRARY_PATH
3081
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3082
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3083
    soname_spec='${libname}${release}${shared_ext}$major'
3084
    if test "X$HPUX_IA64_MODE" = X32; then
3085
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3086
    else
3087
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3088
    fi
3089
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3090
    ;;
3091
  hppa*64*)
3092
    shrext_cmds='.sl'
3093
    hardcode_into_libs=yes
3094
    dynamic_linker="$host_os dld.sl"
3095
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3096
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3097
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3098
    soname_spec='${libname}${release}${shared_ext}$major'
3099
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3100
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3101
    ;;
3102
  *)
3103
    shrext_cmds='.sl'
3104
    dynamic_linker="$host_os dld.sl"
3105
    shlibpath_var=SHLIB_PATH
3106
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3107
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3108
    soname_spec='${libname}${release}${shared_ext}$major'
3109
    ;;
3110
  esac
3111
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3112
  postinstall_cmds='chmod 555 $lib'
3113
  ;;
3114
3115
interix[[3-9]]*)
3116
  version_type=linux
3117
  need_lib_prefix=no
3118
  need_version=no
3119
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3120
  soname_spec='${libname}${release}${shared_ext}$major'
3121
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3122
  shlibpath_var=LD_LIBRARY_PATH
3123
  shlibpath_overrides_runpath=no
3124
  hardcode_into_libs=yes
3125
  ;;
3126
3127
irix5* | irix6* | nonstopux*)
3128
  case $host_os in
3129
    nonstopux*) version_type=nonstopux ;;
3130
    *)
3131
	if test "$lt_cv_prog_gnu_ld" = yes; then
3132
		version_type=linux
3133
	else
3134
		version_type=irix
3135
	fi ;;
3136
  esac
3137
  need_lib_prefix=no
3138
  need_version=no
3139
  soname_spec='${libname}${release}${shared_ext}$major'
3140
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3141
  case $host_os in
3142
  irix5* | nonstopux*)
3143
    libsuff= shlibsuff=
3144
    ;;
3145
  *)
3146
    case $LD in # libtool.m4 will add one of these switches to LD
3147
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3148
      libsuff= shlibsuff= libmagic=32-bit;;
3149
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3150
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3151
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3152
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3153
    *) libsuff= shlibsuff= libmagic=never-match;;
3154
    esac
3155
    ;;
3156
  esac
3157
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3158
  shlibpath_overrides_runpath=no
3159
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3160
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3161
  hardcode_into_libs=yes
3162
  ;;
3163
3164
# No shared lib support for Linux oldld, aout, or coff.
3165
linux*oldld* | linux*aout* | linux*coff*)
3166
  dynamic_linker=no
3167
  ;;
3168
3169
# This must be Linux ELF.
3170
linux* | k*bsd*-gnu)
3171
  version_type=linux
3172
  need_lib_prefix=no
3173
  need_version=no
3174
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3175
  soname_spec='${libname}${release}${shared_ext}$major'
3176
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3177
  shlibpath_var=LD_LIBRARY_PATH
3178
  shlibpath_overrides_runpath=no
3179
  # Some binutils ld are patched to set DT_RUNPATH
3180
  save_LDFLAGS=$LDFLAGS
3181
  save_libdir=$libdir
3182
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3183
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3184
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3185
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3186
       [shlibpath_overrides_runpath=yes])])
3187
  LDFLAGS=$save_LDFLAGS
3188
  libdir=$save_libdir
3189
3190
  # This implies no fast_install, which is unacceptable.
3191
  # Some rework will be needed to allow for fast_install
3192
  # before this can be enabled.
3193
  hardcode_into_libs=yes
3194
3195
  # Add ABI-specific directories to the system library path.
3196
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3197
3198
  # Append ld.so.conf contents to the search path
3199
  if test -f /etc/ld.so.conf; then
3200
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3201
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3202
  fi
3203
3204
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3205
  # powerpc, because MkLinux only supported shared libraries with the
3206
  # GNU dynamic linker.  Since this was broken with cross compilers,
3207
  # most powerpc-linux boxes support dynamic linking these days and
3208
  # people can always --disable-shared, the test was removed, and we
3209
  # assume the GNU/Linux dynamic linker is in use.
3210
  dynamic_linker='GNU/Linux ld.so'
3211
  ;;
3212
3213
netbsd*)
3214
  version_type=sunos
3215
  need_lib_prefix=no
3216
  need_version=no
3217
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3218
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3219
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3220
    dynamic_linker='NetBSD (a.out) ld.so'
3221
  else
3222
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3223
    soname_spec='${libname}${release}${shared_ext}$major'
3224
    dynamic_linker='NetBSD ld.elf_so'
3225
  fi
3226
  shlibpath_var=LD_LIBRARY_PATH
3227
  shlibpath_overrides_runpath=yes
3228
  hardcode_into_libs=yes
3229
  ;;
3230
3231
newsos6)
3232
  version_type=linux
3233
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3234
  shlibpath_var=LD_LIBRARY_PATH
3235
  shlibpath_overrides_runpath=yes
3236
  ;;
3237
3238
*nto* | *qnx*)
3239
  version_type=qnx
3240
  need_lib_prefix=no
3241
  need_version=no
3242
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3243
  soname_spec='${libname}${release}${shared_ext}$major'
3244
  shlibpath_var=LD_LIBRARY_PATH
3245
  shlibpath_overrides_runpath=no
3246
  hardcode_into_libs=yes
3247
  dynamic_linker='ldqnx.so'
3248
  ;;
3249
3250
openbsd*)
3251
  version_type=sunos
3252
  sys_lib_dlsearch_path_spec="/usr/lib"
3253
  need_lib_prefix=no
3254
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3255
  case $host_os in
3256
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3257
    *)				need_version=no  ;;
3258
  esac
3259
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3260
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3261
  shlibpath_var=LD_LIBRARY_PATH
3262
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3263
    case $host_os in
3264
      openbsd2.[[89]] | openbsd2.[[89]].*)
3265
	shlibpath_overrides_runpath=no
3266
	;;
3267
      *)
3268
	shlibpath_overrides_runpath=yes
3269
	;;
3270
      esac
3271
  else
3272
    shlibpath_overrides_runpath=yes
3273
  fi
3274
  ;;
3275
3276
os2*)
3277
  libname_spec='$name'
3278
  shrext_cmds=".dll"
3279
  need_lib_prefix=no
3280
  library_names_spec='$libname${shared_ext} $libname.a'
3281
  dynamic_linker='OS/2 ld.exe'
3282
  shlibpath_var=LIBPATH
3283
  ;;
3284
3285
osf3* | osf4* | osf5*)
3286
  version_type=osf
3287
  need_lib_prefix=no
3288
  need_version=no
3289
  soname_spec='${libname}${release}${shared_ext}$major'
3290
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3291
  shlibpath_var=LD_LIBRARY_PATH
3292
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3293
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3294
  ;;
3295
3296
rdos*)
3297
  dynamic_linker=no
3298
  ;;
3299
3300
solaris*)
3301
  version_type=linux
3302
  need_lib_prefix=no
3303
  need_version=no
3304
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3305
  soname_spec='${libname}${release}${shared_ext}$major'
3306
  shlibpath_var=LD_LIBRARY_PATH
3307
  shlibpath_overrides_runpath=yes
3308
  hardcode_into_libs=yes
3309
  # ldd complains unless libraries are executable
3310
  postinstall_cmds='chmod +x $lib'
3311
  ;;
3312
3313
sunos4*)
3314
  version_type=sunos
3315
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3316
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3317
  shlibpath_var=LD_LIBRARY_PATH
3318
  shlibpath_overrides_runpath=yes
3319
  if test "$with_gnu_ld" = yes; then
3320
    need_lib_prefix=no
3321
  fi
3322
  need_version=yes
3323
  ;;
3324
3325
sysv4 | sysv4.3*)
3326
  version_type=linux
3327
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3328
  soname_spec='${libname}${release}${shared_ext}$major'
3329
  shlibpath_var=LD_LIBRARY_PATH
3330
  case $host_vendor in
3331
    sni)
3332
      shlibpath_overrides_runpath=no
3333
      need_lib_prefix=no
3334
      runpath_var=LD_RUN_PATH
3335
      ;;
3336
    siemens)
3337
      need_lib_prefix=no
3338
      ;;
3339
    motorola)
3340
      need_lib_prefix=no
3341
      need_version=no
3342
      shlibpath_overrides_runpath=no
3343
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3344
      ;;
3345
  esac
3346
  ;;
3347
3348
sysv4*MP*)
3349
  if test -d /usr/nec ;then
3350
    version_type=linux
3351
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3352
    soname_spec='$libname${shared_ext}.$major'
3353
    shlibpath_var=LD_LIBRARY_PATH
3354
  fi
3355
  ;;
3356
3357
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3358
  version_type=freebsd-elf
3359
  need_lib_prefix=no
3360
  need_version=no
3361
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3362
  soname_spec='${libname}${release}${shared_ext}$major'
3363
  shlibpath_var=LD_LIBRARY_PATH
3364
  shlibpath_overrides_runpath=yes
3365
  hardcode_into_libs=yes
3366
  if test "$with_gnu_ld" = yes; then
3367
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3368
  else
3369
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3370
    case $host_os in
3371
      sco3.2v5*)
3372
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3373
	;;
3374
    esac
3375
  fi
3376
  sys_lib_dlsearch_path_spec='/usr/lib'
3377
  ;;
3378
3379
tpf*)
3380
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3381
  version_type=linux
3382
  need_lib_prefix=no
3383
  need_version=no
3384
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3385
  shlibpath_var=LD_LIBRARY_PATH
3386
  shlibpath_overrides_runpath=no
3387
  hardcode_into_libs=yes
3388
  ;;
3389
3390
uts4*)
3391
  version_type=linux
3392
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3393
  soname_spec='${libname}${release}${shared_ext}$major'
3394
  shlibpath_var=LD_LIBRARY_PATH
3395
  ;;
3396
3397
*)
3398
  dynamic_linker=no
3399
  ;;
3400
esac
3401
AC_MSG_RESULT([$dynamic_linker])
3402
test "$dynamic_linker" = no && can_build_shared=no
3403
3404
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3405
if test "$GCC" = yes; then
3406
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3407
fi
3408
3409
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3410
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3411
fi
3412
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3413
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3414
fi
3415
3416
_LT_DECL([], [variables_saved_for_relink], [1],
3417
    [Variables whose values should be saved in libtool wrapper scripts and
3418
    restored at link time])
3419
_LT_DECL([], [need_lib_prefix], [0],
3420
    [Do we need the "lib" prefix for modules?])
3421
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3422
_LT_DECL([], [version_type], [0], [Library versioning type])
3423
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3424
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3425
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3426
    [Is shlibpath searched before the hard-coded library search path?])
3427
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3428
_LT_DECL([], [library_names_spec], [1],
3429
    [[List of archive names.  First name is the real one, the rest are links.
3430
    The last name is the one that the linker finds with -lNAME]])
3431
_LT_DECL([], [soname_spec], [1],
3432
    [[The coded name of the library, if different from the real name]])
3433
_LT_DECL([], [postinstall_cmds], [2],
3434
    [Command to use after installation of a shared archive])
3435
_LT_DECL([], [postuninstall_cmds], [2],
3436
    [Command to use after uninstallation of a shared archive])
3437
_LT_DECL([], [finish_cmds], [2],
3438
    [Commands used to finish a libtool library installation in a directory])
3439
_LT_DECL([], [finish_eval], [1],
3440
    [[As "finish_cmds", except a single script fragment to be evaled but
3441
    not shown]])
3442
_LT_DECL([], [hardcode_into_libs], [0],
3443
    [Whether we should hardcode library paths into libraries])
3444
_LT_DECL([], [sys_lib_search_path_spec], [2],
3445
    [Compile-time system search path for libraries])
3446
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3447
    [Run-time system search path for libraries])
3448
])# _LT_SYS_DYNAMIC_LINKER
3449
3450
3451
# _LT_PATH_TOOL_PREFIX(TOOL)
3452
# --------------------------
3453
# find a file program which can recognize shared library
3454
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3455
[m4_require([_LT_DECL_EGREP])dnl
3456
AC_MSG_CHECKING([for $1])
3457
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3458
[case $MAGIC_CMD in
3459
[[\\/*] |  ?:[\\/]*])
3460
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3461
  ;;
3462
*)
3463
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3464
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3465
dnl $ac_dummy forces splitting on constant user-supplied paths.
3466
dnl POSIX.2 word splitting is done only on the output of word expansions,
3467
dnl not every word.  This closes a longstanding sh security hole.
3468
  ac_dummy="m4_if([$2], , $PATH, [$2])"
3469
  for ac_dir in $ac_dummy; do
3470
    IFS="$lt_save_ifs"
3471
    test -z "$ac_dir" && ac_dir=.
3472
    if test -f $ac_dir/$1; then
3473
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3474
      if test -n "$file_magic_test_file"; then
3475
	case $deplibs_check_method in
3476
	"file_magic "*)
3477
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3478
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3479
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3480
	    $EGREP "$file_magic_regex" > /dev/null; then
3481
	    :
3482
	  else
3483
	    cat <<_LT_EOF 1>&2
3484
3485
*** Warning: the command libtool uses to detect shared libraries,
3486
*** $file_magic_cmd, produces output that libtool cannot recognize.
3487
*** The result is that libtool may fail to recognize shared libraries
3488
*** as such.  This will affect the creation of libtool libraries that
3489
*** depend on shared libraries, but programs linked with such libtool
3490
*** libraries will work regardless of this problem.  Nevertheless, you
3491
*** may want to report the problem to your system manager and/or to
3492
*** bug-libtool@gnu.org
3493
3494
_LT_EOF
3495
	  fi ;;
3496
	esac
3497
      fi
3498
      break
3499
    fi
3500
  done
3501
  IFS="$lt_save_ifs"
3502
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3503
  ;;
3504
esac])
3505
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3506
if test -n "$MAGIC_CMD"; then
3507
  AC_MSG_RESULT($MAGIC_CMD)
3508
else
3509
  AC_MSG_RESULT(no)
3510
fi
3511
_LT_DECL([], [MAGIC_CMD], [0],
3512
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3513
])# _LT_PATH_TOOL_PREFIX
3514
3515
# Old name:
3516
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3517
dnl aclocal-1.4 backwards compatibility:
3518
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3519
3520
3521
# _LT_PATH_MAGIC
3522
# --------------
3523
# find a file program which can recognize a shared library
3524
m4_defun([_LT_PATH_MAGIC],
3525
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3526
if test -z "$lt_cv_path_MAGIC_CMD"; then
3527
  if test -n "$ac_tool_prefix"; then
3528
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3529
  else
3530
    MAGIC_CMD=:
3531
  fi
3532
fi
3533
])# _LT_PATH_MAGIC
3534
3535
3536
# LT_PATH_LD
3537
# ----------
3538
# find the pathname to the GNU or non-GNU linker
3539
AC_DEFUN([LT_PATH_LD],
3540
[AC_REQUIRE([AC_PROG_CC])dnl
3541
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3542
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3543
m4_require([_LT_DECL_SED])dnl
3544
m4_require([_LT_DECL_EGREP])dnl
3545
3546
AC_ARG_WITH([gnu-ld],
3547
    [AS_HELP_STRING([--with-gnu-ld],
3548
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3549
    [test "$withval" = no || with_gnu_ld=yes],
3550
    [with_gnu_ld=no])dnl
3551
3552
ac_prog=ld
3553
if test "$GCC" = yes; then
3554
  # Check if gcc -print-prog-name=ld gives a path.
3555
  AC_MSG_CHECKING([for ld used by $CC])
3556
  case $host in
3557
  *-*-mingw*)
3558
    # gcc leaves a trailing carriage return which upsets mingw
3559
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3560
  *)
3561
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3562
  esac
3563
  case $ac_prog in
3564
    # Accept absolute paths.
3565
    [[\\/]]* | ?:[[\\/]]*)
3566
      re_direlt='/[[^/]][[^/]]*/\.\./'
3567
      # Canonicalize the pathname of ld
3568
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3569
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3570
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3571
      done
3572
      test -z "$LD" && LD="$ac_prog"
3573
      ;;
3574
  "")
3575
    # If it fails, then pretend we aren't using GCC.
3576
    ac_prog=ld
3577
    ;;
3578
  *)
3579
    # If it is relative, then search for the first ld in PATH.
3580
    with_gnu_ld=unknown
3581
    ;;
3582
  esac
3583
elif test "$with_gnu_ld" = yes; then
3584
  AC_MSG_CHECKING([for GNU ld])
3585
else
3586
  AC_MSG_CHECKING([for non-GNU ld])
3587
fi
3588
AC_CACHE_VAL(lt_cv_path_LD,
3589
[if test -z "$LD"; then
3590
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3591
  for ac_dir in $PATH; do
3592
    IFS="$lt_save_ifs"
3593
    test -z "$ac_dir" && ac_dir=.
3594
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3595
      lt_cv_path_LD="$ac_dir/$ac_prog"
3596
      # Check to see if the program is GNU ld.  I'd rather use --version,
3597
      # but apparently some variants of GNU ld only accept -v.
3598
      # Break only if it was the GNU/non-GNU ld that we prefer.
3599
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3600
      *GNU* | *'with BFD'*)
3601
	test "$with_gnu_ld" != no && break
3602
	;;
3603
      *)
3604
	test "$with_gnu_ld" != yes && break
3605
	;;
3606
      esac
3607
    fi
3608
  done
3609
  IFS="$lt_save_ifs"
3610
else
3611
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3612
fi])
3613
LD="$lt_cv_path_LD"
3614
if test -n "$LD"; then
3615
  AC_MSG_RESULT($LD)
3616
else
3617
  AC_MSG_RESULT(no)
3618
fi
3619
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3620
_LT_PATH_LD_GNU
3621
AC_SUBST([LD])
3622
3623
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3624
])# LT_PATH_LD
3625
3626
# Old names:
3627
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3628
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3629
dnl aclocal-1.4 backwards compatibility:
3630
dnl AC_DEFUN([AM_PROG_LD], [])
3631
dnl AC_DEFUN([AC_PROG_LD], [])
3632
3633
3634
# _LT_PATH_LD_GNU
3635
#- --------------
3636
m4_defun([_LT_PATH_LD_GNU],
3637
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3638
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3639
case `$LD -v 2>&1 </dev/null` in
3640
*GNU* | *'with BFD'*)
3641
  lt_cv_prog_gnu_ld=yes
3642
  ;;
3643
*)
3644
  lt_cv_prog_gnu_ld=no
3645
  ;;
3646
esac])
3647
with_gnu_ld=$lt_cv_prog_gnu_ld
3648
])# _LT_PATH_LD_GNU
3649
3650
3651
# _LT_CMD_RELOAD
3652
# --------------
3653
# find reload flag for linker
3654
#   -- PORTME Some linkers may need a different reload flag.
3655
m4_defun([_LT_CMD_RELOAD],
3656
[AC_CACHE_CHECK([for $LD option to reload object files],
3657
  lt_cv_ld_reload_flag,
3658
  [lt_cv_ld_reload_flag='-r'])
3659
reload_flag=$lt_cv_ld_reload_flag
3660
case $reload_flag in
3661
"" | " "*) ;;
3662
*) reload_flag=" $reload_flag" ;;
3663
esac
3664
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3665
case $host_os in
3666
  darwin*)
3667
    if test "$GCC" = yes; then
3668
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3669
    else
3670
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3671
    fi
3672
    ;;
3673
esac
3674
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3675
_LT_DECL([], [reload_cmds], [2])dnl
3676
])# _LT_CMD_RELOAD
3677
3678
3679
# _LT_CHECK_MAGIC_METHOD
3680
# ----------------------
3681
# how to check for library dependencies
3682
#  -- PORTME fill in with the dynamic library characteristics
3683
m4_defun([_LT_CHECK_MAGIC_METHOD],
3684
[m4_require([_LT_DECL_EGREP])
3685
m4_require([_LT_DECL_OBJDUMP])
3686
AC_CACHE_CHECK([how to recognize dependent libraries],
3687
lt_cv_deplibs_check_method,
3688
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3689
lt_cv_file_magic_test_file=
3690
lt_cv_deplibs_check_method='unknown'
3691
# Need to set the preceding variable on all platforms that support
3692
# interlibrary dependencies.
3693
# 'none' -- dependencies not supported.
3694
# `unknown' -- same as none, but documents that we really don't know.
3695
# 'pass_all' -- all dependencies passed with no checks.
3696
# 'test_compile' -- check by making test program.
3697
# 'file_magic [[regex]]' -- check by looking for files in library path
3698
# which responds to the $file_magic_cmd with a given extended regex.
3699
# If you have `file' or equivalent on your system and you're not sure
3700
# whether `pass_all' will *always* work, you probably want this one.
3701
3702
case $host_os in
3703
aix[[4-9]]*)
3704
  lt_cv_deplibs_check_method=pass_all
3705
  ;;
3706
3707
beos*)
3708
  lt_cv_deplibs_check_method=pass_all
3709
  ;;
3710
3711
bsdi[[45]]*)
3712
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3713
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3714
  lt_cv_file_magic_test_file=/shlib/libc.so
3715
  ;;
3716
3717
cygwin*)
3718
  # func_win32_libid is a shell function defined in ltmain.sh
3719
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3720
  lt_cv_file_magic_cmd='func_win32_libid'
3721
  ;;
3722
3723
mingw* | pw32*)
3724
  # Base MSYS/MinGW do not provide the 'file' command needed by
3725
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3726
  # unless we find 'file', for example because we are cross-compiling.
3727
  if ( file / ) >/dev/null 2>&1; then
3728
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3729
    lt_cv_file_magic_cmd='func_win32_libid'
3730
  else
3731
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3732
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3733
  fi
3734
  ;;
3735
3736
cegcc)
3737
  # use the weaker test based on 'objdump'. See mingw*.
3738
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3739
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3740
  ;;
3741
3742
darwin* | rhapsody*)
3743
  lt_cv_deplibs_check_method=pass_all
3744
  ;;
3745
3746
freebsd* | dragonfly*)
3747
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3748
    case $host_cpu in
3749
    i*86 )
3750
      # Not sure whether the presence of OpenBSD here was a mistake.
3751
      # Let's accept both of them until this is cleared up.
3752
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3753
      lt_cv_file_magic_cmd=/usr/bin/file
3754
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3755
      ;;
3756
    esac
3757
  else
3758
    lt_cv_deplibs_check_method=pass_all
3759
  fi
3760
  ;;
3761
3762
gnu*)
3763
  lt_cv_deplibs_check_method=pass_all
3764
  ;;
3765
3766
hpux10.20* | hpux11*)
3767
  lt_cv_file_magic_cmd=/usr/bin/file
3768
  case $host_cpu in
3769
  ia64*)
3770
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3771
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3772
    ;;
3773
  hppa*64*)
3774
    [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]']
3775
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3776
    ;;
3777
  *)
3778
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3779
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3780
    ;;
3781
  esac
3782
  ;;
3783
3784
interix[[3-9]]*)
3785
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3786
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3787
  ;;
3788
3789
irix5* | irix6* | nonstopux*)
3790
  case $LD in
3791
  *-32|*"-32 ") libmagic=32-bit;;
3792
  *-n32|*"-n32 ") libmagic=N32;;
3793
  *-64|*"-64 ") libmagic=64-bit;;
3794
  *) libmagic=never-match;;
3795
  esac
3796
  lt_cv_deplibs_check_method=pass_all
3797
  ;;
3798
3799
# This must be Linux ELF.
3800
linux* | k*bsd*-gnu)
3801
  lt_cv_deplibs_check_method=pass_all
3802
  ;;
3803
3804
netbsd*)
3805
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3806
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3807
  else
3808
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3809
  fi
3810
  ;;
3811
3812
newos6*)
3813
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3814
  lt_cv_file_magic_cmd=/usr/bin/file
3815
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3816
  ;;
3817
3818
*nto* | *qnx*)
3819
  lt_cv_deplibs_check_method=pass_all
3820
  ;;
3821
3822
openbsd*)
3823
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3824
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3825
  else
3826
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3827
  fi
3828
  ;;
3829
3830
osf3* | osf4* | osf5*)
3831
  lt_cv_deplibs_check_method=pass_all
3832
  ;;
3833
3834
rdos*)
3835
  lt_cv_deplibs_check_method=pass_all
3836
  ;;
3837
3838
solaris*)
3839
  lt_cv_deplibs_check_method=pass_all
3840
  ;;
3841
3842
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3843
  lt_cv_deplibs_check_method=pass_all
3844
  ;;
3845
3846
sysv4 | sysv4.3*)
3847
  case $host_vendor in
3848
  motorola)
3849
    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]]'
3850
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3851
    ;;
3852
  ncr)
3853
    lt_cv_deplibs_check_method=pass_all
3854
    ;;
3855
  sequent)
3856
    lt_cv_file_magic_cmd='/bin/file'
3857
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3858
    ;;
3859
  sni)
3860
    lt_cv_file_magic_cmd='/bin/file'
3861
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3862
    lt_cv_file_magic_test_file=/lib/libc.so
3863
    ;;
3864
  siemens)
3865
    lt_cv_deplibs_check_method=pass_all
3866
    ;;
3867
  pc)
3868
    lt_cv_deplibs_check_method=pass_all
3869
    ;;
3870
  esac
3871
  ;;
3872
3873
tpf*)
3874
  lt_cv_deplibs_check_method=pass_all
3875
  ;;
3876
esac
3877
])
3878
file_magic_cmd=$lt_cv_file_magic_cmd
3879
deplibs_check_method=$lt_cv_deplibs_check_method
3880
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3881
3882
_LT_DECL([], [deplibs_check_method], [1],
3883
    [Method to check whether dependent libraries are shared objects])
3884
_LT_DECL([], [file_magic_cmd], [1],
3885
    [Command to use when deplibs_check_method == "file_magic"])
3886
])# _LT_CHECK_MAGIC_METHOD
3887
3888
3889
# LT_PATH_NM
3890
# ----------
3891
# find the pathname to a BSD- or MS-compatible name lister
3892
AC_DEFUN([LT_PATH_NM],
3893
[AC_REQUIRE([AC_PROG_CC])dnl
3894
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3895
[if test -n "$NM"; then
3896
  # Let the user override the test.
3897
  lt_cv_path_NM="$NM"
3898
else
3899
  lt_nm_to_check="${ac_tool_prefix}nm"
3900
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3901
    lt_nm_to_check="$lt_nm_to_check nm"
3902
  fi
3903
  for lt_tmp_nm in $lt_nm_to_check; do
3904
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3905
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3906
      IFS="$lt_save_ifs"
3907
      test -z "$ac_dir" && ac_dir=.
3908
      tmp_nm="$ac_dir/$lt_tmp_nm"
3909
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3910
	# Check to see if the nm accepts a BSD-compat flag.
3911
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3912
	#   nm: unknown option "B" ignored
3913
	# Tru64's nm complains that /dev/null is an invalid object file
3914
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3915
	*/dev/null* | *'Invalid file or object type'*)
3916
	  lt_cv_path_NM="$tmp_nm -B"
3917
	  break
3918
	  ;;
3919
	*)
3920
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3921
	  */dev/null*)
3922
	    lt_cv_path_NM="$tmp_nm -p"
3923
	    break
3924
	    ;;
3925
	  *)
3926
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3927
	    continue # so that we can try to find one that supports BSD flags
3928
	    ;;
3929
	  esac
3930
	  ;;
3931
	esac
3932
      fi
3933
    done
3934
    IFS="$lt_save_ifs"
3935
  done
3936
  : ${lt_cv_path_NM=no}
3937
fi])
3938
if test "$lt_cv_path_NM" != "no"; then
3939
  NM="$lt_cv_path_NM"
3940
else
3941
  # Didn't find any BSD compatible name lister, look for dumpbin.
3942
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3943
  AC_SUBST([DUMPBIN])
3944
  if test "$DUMPBIN" != ":"; then
3945
    NM="$DUMPBIN"
3946
  fi
3947
fi
3948
test -z "$NM" && NM=nm
3949
AC_SUBST([NM])
3950
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3951
3952
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3953
  [lt_cv_nm_interface="BSD nm"
3954
  echo "int some_variable = 0;" > conftest.$ac_ext
3955
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3956
  (eval "$ac_compile" 2>conftest.err)
3957
  cat conftest.err >&AS_MESSAGE_LOG_FD
3958
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3959
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3960
  cat conftest.err >&AS_MESSAGE_LOG_FD
3961
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3962
  cat conftest.out >&AS_MESSAGE_LOG_FD
3963
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3964
    lt_cv_nm_interface="MS dumpbin"
3965
  fi
3966
  rm -f conftest*])
3967
])# LT_PATH_NM
3968
3969
# Old names:
3970
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3971
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3972
dnl aclocal-1.4 backwards compatibility:
3973
dnl AC_DEFUN([AM_PROG_NM], [])
3974
dnl AC_DEFUN([AC_PROG_NM], [])
3975
3976
3977
# LT_LIB_M
3978
# --------
3979
# check for math library
3980
AC_DEFUN([LT_LIB_M],
3981
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3982
LIBM=
3983
case $host in
3984
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3985
  # These system don't have libm, or don't need it
3986
  ;;
3987
*-ncr-sysv4.3*)
3988
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3989
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3990
  ;;
3991
*)
3992
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3993
  ;;
3994
esac
3995
AC_SUBST([LIBM])
3996
])# LT_LIB_M
3997
3998
# Old name:
3999
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4000
dnl aclocal-1.4 backwards compatibility:
4001
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4002
4003
4004
# _LT_COMPILER_NO_RTTI([TAGNAME])
4005
# -------------------------------
4006
m4_defun([_LT_COMPILER_NO_RTTI],
4007
[m4_require([_LT_TAG_COMPILER])dnl
4008
4009
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4010
4011
if test "$GCC" = yes; then
4012
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4013
4014
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4015
    lt_cv_prog_compiler_rtti_exceptions,
4016
    [-fno-rtti -fno-exceptions], [],
4017
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4018
fi
4019
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4020
	[Compiler flag to turn off builtin functions])
4021
])# _LT_COMPILER_NO_RTTI
4022
4023
4024
# _LT_CMD_GLOBAL_SYMBOLS
4025
# ----------------------
4026
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4027
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4028
AC_REQUIRE([AC_PROG_CC])dnl
4029
AC_REQUIRE([LT_PATH_NM])dnl
4030
AC_REQUIRE([LT_PATH_LD])dnl
4031
m4_require([_LT_DECL_SED])dnl
4032
m4_require([_LT_DECL_EGREP])dnl
4033
m4_require([_LT_TAG_COMPILER])dnl
4034
4035
# Check for command to grab the raw symbol name followed by C symbol from nm.
4036
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4037
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4038
[
4039
# These are sane defaults that work on at least a few old systems.
4040
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4041
4042
# Character class describing NM global symbol codes.
4043
symcode='[[BCDEGRST]]'
4044
4045
# Regexp to match symbols that can be accessed directly from C.
4046
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4047
4048
# Define system-specific variables.
4049
case $host_os in
4050
aix*)
4051
  symcode='[[BCDT]]'
4052
  ;;
4053
cygwin* | mingw* | pw32* | cegcc*)
4054
  symcode='[[ABCDGISTW]]'
4055
  ;;
4056
hpux*)
4057
  if test "$host_cpu" = ia64; then
4058
    symcode='[[ABCDEGRST]]'
4059
  fi
4060
  ;;
4061
irix* | nonstopux*)
4062
  symcode='[[BCDEGRST]]'
4063
  ;;
4064
osf*)
4065
  symcode='[[BCDEGQRST]]'
4066
  ;;
4067
solaris*)
4068
  symcode='[[BDRT]]'
4069
  ;;
4070
sco3.2v5*)
4071
  symcode='[[DT]]'
4072
  ;;
4073
sysv4.2uw2*)
4074
  symcode='[[DT]]'
4075
  ;;
4076
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4077
  symcode='[[ABDT]]'
4078
  ;;
4079
sysv4)
4080
  symcode='[[DFNSTU]]'
4081
  ;;
4082
esac
4083
4084
# If we're using GNU nm, then use its standard symbol codes.
4085
case `$NM -V 2>&1` in
4086
*GNU* | *'with BFD'*)
4087
  symcode='[[ABCDGIRSTW]]' ;;
4088
esac
4089
4090
# Transform an extracted symbol line into a proper C declaration.
4091
# Some systems (esp. on ia64) link data and code symbols differently,
4092
# so use this general approach.
4093
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4094
4095
# Transform an extracted symbol line into symbol name and symbol address
4096
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4097
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4098
4099
# Handle CRLF in mingw tool chain
4100
opt_cr=
4101
case $build_os in
4102
mingw*)
4103
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4104
  ;;
4105
esac
4106
4107
# Try without a prefix underscore, then with it.
4108
for ac_symprfx in "" "_"; do
4109
4110
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4111
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4112
4113
  # Write the raw and C identifiers.
4114
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4115
    # Fake it for dumpbin and say T for any non-static function
4116
    # and D for any global variable.
4117
    # Also find C++ and __fastcall symbols from MSVC++,
4118
    # which start with @ or ?.
4119
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4120
"     {last_section=section; section=\$ 3};"\
4121
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4122
"     \$ 0!~/External *\|/{next};"\
4123
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4124
"     {if(hide[section]) next};"\
4125
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4126
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4127
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4128
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4129
"     ' prfx=^$ac_symprfx]"
4130
  else
4131
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4132
  fi
4133
4134
  # Check to see that the pipe works correctly.
4135
  pipe_works=no
4136
4137
  rm -f conftest*
4138
  cat > conftest.$ac_ext <<_LT_EOF
4139
#ifdef __cplusplus
4140
extern "C" {
4141
#endif
4142
char nm_test_var;
4143
void nm_test_func(void);
4144
void nm_test_func(void){}
4145
#ifdef __cplusplus
4146
}
4147
#endif
4148
int main(){nm_test_var='a';nm_test_func();return(0);}
4149
_LT_EOF
4150
4151
  if AC_TRY_EVAL(ac_compile); then
4152
    # Now try to grab the symbols.
4153
    nlist=conftest.nm
4154
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4155
      # Try sorting and uniquifying the output.
4156
      if sort "$nlist" | uniq > "$nlist"T; then
4157
	mv -f "$nlist"T "$nlist"
4158
      else
4159
	rm -f "$nlist"T
4160
      fi
4161
4162
      # Make sure that we snagged all the symbols we need.
4163
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4164
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4165
	  cat <<_LT_EOF > conftest.$ac_ext
4166
#ifdef __cplusplus
4167
extern "C" {
4168
#endif
4169
4170
_LT_EOF
4171
	  # Now generate the symbol file.
4172
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4173
4174
	  cat <<_LT_EOF >> conftest.$ac_ext
4175
4176
/* The mapping between symbol names and symbols.  */
4177
const struct {
4178
  const char *name;
4179
  void       *address;
4180
}
4181
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4182
{
4183
  { "@PROGRAM@", (void *) 0 },
4184
_LT_EOF
4185
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4186
	  cat <<\_LT_EOF >> conftest.$ac_ext
4187
  {0, (void *) 0}
4188
};
4189
4190
/* This works around a problem in FreeBSD linker */
4191
#ifdef FREEBSD_WORKAROUND
4192
static const void *lt_preloaded_setup() {
4193
  return lt__PROGRAM__LTX_preloaded_symbols;
4194
}
4195
#endif
4196
4197
#ifdef __cplusplus
4198
}
4199
#endif
4200
_LT_EOF
4201
	  # Now try linking the two files.
4202
	  mv conftest.$ac_objext conftstm.$ac_objext
4203
	  lt_save_LIBS="$LIBS"
4204
	  lt_save_CFLAGS="$CFLAGS"
4205
	  LIBS="conftstm.$ac_objext"
4206
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4207
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4208
	    pipe_works=yes
4209
	  fi
4210
	  LIBS="$lt_save_LIBS"
4211
	  CFLAGS="$lt_save_CFLAGS"
4212
	else
4213
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4214
	fi
4215
      else
4216
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4217
      fi
4218
    else
4219
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4220
    fi
4221
  else
4222
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4223
    cat conftest.$ac_ext >&5
4224
  fi
4225
  rm -rf conftest* conftst*
4226
4227
  # Do not use the global_symbol_pipe unless it works.
4228
  if test "$pipe_works" = yes; then
4229
    break
4230
  else
4231
    lt_cv_sys_global_symbol_pipe=
4232
  fi
4233
done
4234
])
4235
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4236
  lt_cv_sys_global_symbol_to_cdecl=
4237
fi
4238
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4239
  AC_MSG_RESULT(failed)
4240
else
4241
  AC_MSG_RESULT(ok)
4242
fi
4243
4244
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4245
    [Take the output of nm and produce a listing of raw symbols and C names])
4246
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4247
    [Transform the output of nm in a proper C declaration])
4248
_LT_DECL([global_symbol_to_c_name_address],
4249
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4250
    [Transform the output of nm in a C name address pair])
4251
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4252
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4253
    [Transform the output of nm in a C name address pair when lib prefix is needed])
4254
]) # _LT_CMD_GLOBAL_SYMBOLS
4255
4256
4257
# _LT_COMPILER_PIC([TAGNAME])
4258
# ---------------------------
4259
m4_defun([_LT_COMPILER_PIC],
4260
[m4_require([_LT_TAG_COMPILER])dnl
4261
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4262
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4263
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4264
4265
AC_MSG_CHECKING([for $compiler option to produce PIC])
4266
m4_if([$1], [CXX], [
4267
  # C++ specific cases for pic, static, wl, etc.
4268
  if test "$GXX" = yes; then
4269
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4270
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4271
4272
    case $host_os in
4273
    aix*)
4274
      # All AIX code is PIC.
4275
      if test "$host_cpu" = ia64; then
4276
	# AIX 5 now supports IA64 processor
4277
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4278
      fi
4279
      ;;
4280
4281
    amigaos*)
4282
      case $host_cpu in
4283
      powerpc)
4284
            # see comment about AmigaOS4 .so support
4285
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4286
        ;;
4287
      m68k)
4288
            # FIXME: we need at least 68020 code to build shared libraries, but
4289
            # adding the `-m68020' flag to GCC prevents building anything better,
4290
            # like `-m68040'.
4291
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4292
        ;;
4293
      esac
4294
      ;;
4295
4296
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4297
      # PIC is the default for these OSes.
4298
      ;;
4299
    mingw* | cygwin* | os2* | pw32* | cegcc*)
4300
      # This hack is so that the source file can tell whether it is being
4301
      # built for inclusion in a dll (and should export symbols for example).
4302
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4303
      # (--disable-auto-import) libraries
4304
      m4_if([$1], [GCJ], [],
4305
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4306
      ;;
4307
    darwin* | rhapsody*)
4308
      # PIC is the default on this platform
4309
      # Common symbols not allowed in MH_DYLIB files
4310
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4311
      ;;
4312
    *djgpp*)
4313
      # DJGPP does not support shared libraries at all
4314
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4315
      ;;
4316
    interix[[3-9]]*)
4317
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4318
      # Instead, we relocate shared libraries at runtime.
4319
      ;;
4320
    sysv4*MP*)
4321
      if test -d /usr/nec; then
4322
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4323
      fi
4324
      ;;
4325
    hpux*)
4326
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4327
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4328
      # sets the default TLS model and affects inlining.
4329
      case $host_cpu in
4330
      hppa*64*)
4331
	;;
4332
      *)
4333
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4334
	;;
4335
      esac
4336
      ;;
4337
    *qnx* | *nto*)
4338
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4339
      # it will coredump.
4340
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4341
      ;;
4342
    *)
4343
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4344
      ;;
4345
    esac
4346
  else
4347
    case $host_os in
4348
      aix[[4-9]]*)
4349
	# All AIX code is PIC.
4350
	if test "$host_cpu" = ia64; then
4351
	  # AIX 5 now supports IA64 processor
4352
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4353
	else
4354
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4355
	fi
4356
	;;
4357
      chorus*)
4358
	case $cc_basename in
4359
	cxch68*)
4360
	  # Green Hills C++ Compiler
4361
	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4362
	  ;;
4363
	esac
4364
	;;
4365
      dgux*)
4366
	case $cc_basename in
4367
	  ec++*)
4368
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4369
	    ;;
4370
	  ghcx*)
4371
	    # Green Hills C++ Compiler
4372
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4373
	    ;;
4374
	  *)
4375
	    ;;
4376
	esac
4377
	;;
4378
      freebsd* | dragonfly*)
4379
	# FreeBSD uses GNU C++
4380
	;;
4381
      hpux9* | hpux10* | hpux11*)
4382
	case $cc_basename in
4383
	  CC*)
4384
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4385
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4386
	    if test "$host_cpu" != ia64; then
4387
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4388
	    fi
4389
	    ;;
4390
	  aCC*)
4391
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4392
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4393
	    case $host_cpu in
4394
	    hppa*64*|ia64*)
4395
	      # +Z the default
4396
	      ;;
4397
	    *)
4398
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4399
	      ;;
4400
	    esac
4401
	    ;;
4402
	  *)
4403
	    ;;
4404
	esac
4405
	;;
4406
      interix*)
4407
	# This is c89, which is MS Visual C++ (no shared libs)
4408
	# Anyone wants to do a port?
4409
	;;
4410
      irix5* | irix6* | nonstopux*)
4411
	case $cc_basename in
4412
	  CC*)
4413
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4414
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4415
	    # CC pic flag -KPIC is the default.
4416
	    ;;
4417
	  *)
4418
	    ;;
4419
	esac
4420
	;;
4421
      linux* | k*bsd*-gnu)
4422
	case $cc_basename in
4423
	  KCC*)
4424
	    # KAI C++ Compiler
4425
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4426
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4427
	    ;;
4428
	  ecpc* )
4429
	    # old Intel C++ for x86_64 which still supported -KPIC.
4430
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4431
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4432
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4433
	    ;;
4434
	  icpc* )
4435
	    # Intel C++, used to be incompatible with GCC.
4436
	    # ICC 10 doesn't accept -KPIC any more.
4437
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4438
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4439
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4440
	    ;;
4441
	  pgCC* | pgcpp*)
4442
	    # Portland Group C++ compiler
4443
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4444
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4445
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4446
	    ;;
4447
	  cxx*)
4448
	    # Compaq C++
4449
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4450
	    # Linux and Compaq Tru64 Unix objects are PIC.
4451
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4452
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4453
	    ;;
4454
	  xlc* | xlC*)
4455
	    # IBM XL 8.0 on PPC
4456
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4457
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4458
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4459
	    ;;
4460
	  *)
4461
	    case `$CC -V 2>&1 | sed 5q` in
4462
	    *Sun\ C*)
4463
	      # Sun C++ 5.9
4464
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4465
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4466
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4467
	      ;;
4468
	    esac
4469
	    ;;
4470
	esac
4471
	;;
4472
      lynxos*)
4473
	;;
4474
      m88k*)
4475
	;;
4476
      mvs*)
4477
	case $cc_basename in
4478
	  cxx*)
4479
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4480
	    ;;
4481
	  *)
4482
	    ;;
4483
	esac
4484
	;;
4485
      netbsd*)
4486
	;;
4487
      *qnx* | *nto*)
4488
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4489
        # it will coredump.
4490
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4491
        ;;
4492
      osf3* | osf4* | osf5*)
4493
	case $cc_basename in
4494
	  KCC*)
4495
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4496
	    ;;
4497
	  RCC*)
4498
	    # Rational C++ 2.4.1
4499
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4500
	    ;;
4501
	  cxx*)
4502
	    # Digital/Compaq C++
4503
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4504
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4505
	    # Linux and Compaq Tru64 Unix objects are PIC.
4506
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4507
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4508
	    ;;
4509
	  *)
4510
	    ;;
4511
	esac
4512
	;;
4513
      psos*)
4514
	;;
4515
      solaris*)
4516
	case $cc_basename in
4517
	  CC*)
4518
	    # Sun C++ 4.2, 5.x and Centerline C++
4519
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4520
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4521
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4522
	    ;;
4523
	  gcx*)
4524
	    # Green Hills C++ Compiler
4525
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4526
	    ;;
4527
	  *)
4528
	    ;;
4529
	esac
4530
	;;
4531
      sunos4*)
4532
	case $cc_basename in
4533
	  CC*)
4534
	    # Sun C++ 4.x
4535
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4536
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4537
	    ;;
4538
	  lcc*)
4539
	    # Lucid
4540
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4541
	    ;;
4542
	  *)
4543
	    ;;
4544
	esac
4545
	;;
4546
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4547
	case $cc_basename in
4548
	  CC*)
4549
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4551
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4552
	    ;;
4553
	esac
4554
	;;
4555
      tandem*)
4556
	case $cc_basename in
4557
	  NCC*)
4558
	    # NonStop-UX NCC 3.20
4559
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4560
	    ;;
4561
	  *)
4562
	    ;;
4563
	esac
4564
	;;
4565
      vxworks*)
4566
	;;
4567
      *)
4568
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4569
	;;
4570
    esac
4571
  fi
4572
],
4573
[
4574
  if test "$GCC" = yes; then
4575
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4576
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4577
4578
    case $host_os in
4579
      aix*)
4580
      # All AIX code is PIC.
4581
      if test "$host_cpu" = ia64; then
4582
	# AIX 5 now supports IA64 processor
4583
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4584
      fi
4585
      ;;
4586
4587
    amigaos*)
4588
      case $host_cpu in
4589
      powerpc)
4590
            # see comment about AmigaOS4 .so support
4591
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4592
        ;;
4593
      m68k)
4594
            # FIXME: we need at least 68020 code to build shared libraries, but
4595
            # adding the `-m68020' flag to GCC prevents building anything better,
4596
            # like `-m68040'.
4597
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4598
        ;;
4599
      esac
4600
      ;;
4601
4602
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4603
      # PIC is the default for these OSes.
4604
      ;;
4605
4606
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4607
      # This hack is so that the source file can tell whether it is being
4608
      # built for inclusion in a dll (and should export symbols for example).
4609
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4610
      # (--disable-auto-import) libraries
4611
      m4_if([$1], [GCJ], [],
4612
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4613
      ;;
4614
4615
    darwin* | rhapsody*)
4616
      # PIC is the default on this platform
4617
      # Common symbols not allowed in MH_DYLIB files
4618
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4619
      ;;
4620
4621
    hpux*)
4622
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4623
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4624
      # sets the default TLS model and affects inlining.
4625
      case $host_cpu in
4626
      hppa*64*)
4627
	# +Z the default
4628
	;;
4629
      *)
4630
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4631
	;;
4632
      esac
4633
      ;;
4634
4635
    interix[[3-9]]*)
4636
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4637
      # Instead, we relocate shared libraries at runtime.
4638
      ;;
4639
4640
    msdosdjgpp*)
4641
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4642
      # on systems that don't support them.
4643
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4644
      enable_shared=no
4645
      ;;
4646
4647
    *nto* | *qnx*)
4648
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4649
      # it will coredump.
4650
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4651
      ;;
4652
4653
    sysv4*MP*)
4654
      if test -d /usr/nec; then
4655
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4656
      fi
4657
      ;;
4658
4659
    *)
4660
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4661
      ;;
4662
    esac
4663
  else
4664
    # PORTME Check for flag to pass linker flags through the system compiler.
4665
    case $host_os in
4666
    aix*)
4667
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4668
      if test "$host_cpu" = ia64; then
4669
	# AIX 5 now supports IA64 processor
4670
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4671
      else
4672
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4673
      fi
4674
      ;;
4675
4676
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4677
      # This hack is so that the source file can tell whether it is being
4678
      # built for inclusion in a dll (and should export symbols for example).
4679
      m4_if([$1], [GCJ], [],
4680
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4681
      ;;
4682
4683
    hpux9* | hpux10* | hpux11*)
4684
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4685
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4686
      # not for PA HP-UX.
4687
      case $host_cpu in
4688
      hppa*64*|ia64*)
4689
	# +Z the default
4690
	;;
4691
      *)
4692
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4693
	;;
4694
      esac
4695
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4696
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4697
      ;;
4698
4699
    irix5* | irix6* | nonstopux*)
4700
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4701
      # PIC (with -KPIC) is the default.
4702
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4703
      ;;
4704
4705
    linux* | k*bsd*-gnu)
4706
      case $cc_basename in
4707
      # old Intel for x86_64 which still supported -KPIC.
4708
      ecc*)
4709
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4710
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4711
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4712
        ;;
4713
      # icc used to be incompatible with GCC.
4714
      # ICC 10 doesn't accept -KPIC any more.
4715
      icc* | ifort*)
4716
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4717
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4718
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4719
        ;;
4720
      # Lahey Fortran 8.1.
4721
      lf95*)
4722
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4723
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4724
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4725
	;;
4726
      pgcc* | pgf77* | pgf90* | pgf95*)
4727
        # Portland Group compilers (*not* the Pentium gcc compiler,
4728
	# which looks to be a dead project)
4729
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4731
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4732
        ;;
4733
      ccc*)
4734
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735
        # All Alpha code is PIC.
4736
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4737
        ;;
4738
      xl*)
4739
	# IBM XL C 8.0/Fortran 10.1 on PPC
4740
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4741
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4742
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4743
	;;
4744
      *)
4745
	case `$CC -V 2>&1 | sed 5q` in
4746
	*Sun\ C*)
4747
	  # Sun C 5.9
4748
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4749
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4750
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4751
	  ;;
4752
	*Sun\ F*)
4753
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4754
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4755
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4756
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4757
	  ;;
4758
	esac
4759
	;;
4760
      esac
4761
      ;;
4762
4763
    newsos6)
4764
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4765
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4766
      ;;
4767
4768
    *nto* | *qnx*)
4769
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4770
      # it will coredump.
4771
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4772
      ;;
4773
4774
    osf3* | osf4* | osf5*)
4775
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776
      # All OSF/1 code is PIC.
4777
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4778
      ;;
4779
4780
    rdos*)
4781
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4782
      ;;
4783
4784
    solaris*)
4785
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4786
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4787
      case $cc_basename in
4788
      f77* | f90* | f95*)
4789
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4790
      *)
4791
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4792
      esac
4793
      ;;
4794
4795
    sunos4*)
4796
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4797
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4798
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4799
      ;;
4800
4801
    sysv4 | sysv4.2uw2* | sysv4.3*)
4802
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4803
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4804
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4805
      ;;
4806
4807
    sysv4*MP*)
4808
      if test -d /usr/nec ;then
4809
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4810
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4811
      fi
4812
      ;;
4813
4814
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4815
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4816
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4817
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4818
      ;;
4819
4820
    unicos*)
4821
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4822
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4823
      ;;
4824
4825
    uts4*)
4826
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4827
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4828
      ;;
4829
4830
    *)
4831
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4832
      ;;
4833
    esac
4834
  fi
4835
])
4836
case $host_os in
4837
  # For platforms which do not support PIC, -DPIC is meaningless:
4838
  *djgpp*)
4839
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4840
    ;;
4841
  *)
4842
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4843
    ;;
4844
esac
4845
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4846
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4847
	[How to pass a linker flag through the compiler])
4848
4849
#
4850
# Check to make sure the PIC flag actually works.
4851
#
4852
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4853
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4854
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4855
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4856
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4857
     "" | " "*) ;;
4858
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4859
     esac],
4860
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4861
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4862
fi
4863
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4864
	[Additional compiler flags for building library objects])
4865
4866
#
4867
# Check to make sure the static flag actually works.
4868
#
4869
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4870
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4871
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4872
  $lt_tmp_static_flag,
4873
  [],
4874
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4875
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4876
	[Compiler flag to prevent dynamic linking])
4877
])# _LT_COMPILER_PIC
4878
4879
4880
# _LT_LINKER_SHLIBS([TAGNAME])
4881
# ----------------------------
4882
# See if the linker supports building shared libraries.
4883
m4_defun([_LT_LINKER_SHLIBS],
4884
[AC_REQUIRE([LT_PATH_LD])dnl
4885
AC_REQUIRE([LT_PATH_NM])dnl
4886
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4887
m4_require([_LT_DECL_EGREP])dnl
4888
m4_require([_LT_DECL_SED])dnl
4889
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4890
m4_require([_LT_TAG_COMPILER])dnl
4891
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4892
m4_if([$1], [CXX], [
4893
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4894
  case $host_os in
4895
  aix[[4-9]]*)
4896
    # If we're using GNU nm, then we don't want the "-C" option.
4897
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4898
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4899
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4900
    else
4901
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4902
    fi
4903
    ;;
4904
  pw32*)
4905
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4906
  ;;
4907
  cygwin* | mingw* | cegcc*)
4908
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4909
  ;;
4910
  *)
4911
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4912
  ;;
4913
  esac
4914
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4915
], [
4916
  runpath_var=
4917
  _LT_TAGVAR(allow_undefined_flag, $1)=
4918
  _LT_TAGVAR(always_export_symbols, $1)=no
4919
  _LT_TAGVAR(archive_cmds, $1)=
4920
  _LT_TAGVAR(archive_expsym_cmds, $1)=
4921
  _LT_TAGVAR(compiler_needs_object, $1)=no
4922
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4923
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4924
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4925
  _LT_TAGVAR(hardcode_automatic, $1)=no
4926
  _LT_TAGVAR(hardcode_direct, $1)=no
4927
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4928
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4929
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4930
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4931
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4932
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4933
  _LT_TAGVAR(inherit_rpath, $1)=no
4934
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4935
  _LT_TAGVAR(module_cmds, $1)=
4936
  _LT_TAGVAR(module_expsym_cmds, $1)=
4937
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4938
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4939
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4940
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4941
  # include_expsyms should be a list of space-separated symbols to be *always*
4942
  # included in the symbol list
4943
  _LT_TAGVAR(include_expsyms, $1)=
4944
  # exclude_expsyms can be an extended regexp of symbols to exclude
4945
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4946
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4947
  # as well as any symbol that contains `d'.
4948
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4949
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4950
  # platforms (ab)use it in PIC code, but their linkers get confused if
4951
  # the symbol is explicitly referenced.  Since portable code cannot
4952
  # rely on this symbol name, it's probably fine to never include it in
4953
  # preloaded symbol tables.
4954
  # Exclude shared library initialization/finalization symbols.
4955
dnl Note also adjust exclude_expsyms for C++ above.
4956
  extract_expsyms_cmds=
4957
4958
  case $host_os in
4959
  cygwin* | mingw* | pw32* | cegcc*)
4960
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4961
    # When not using gcc, we currently assume that we are using
4962
    # Microsoft Visual C++.
4963
    if test "$GCC" != yes; then
4964
      with_gnu_ld=no
4965
    fi
4966
    ;;
4967
  interix*)
4968
    # we just hope/assume this is gcc and not c89 (= MSVC++)
4969
    with_gnu_ld=yes
4970
    ;;
4971
  openbsd*)
4972
    with_gnu_ld=no
4973
    ;;
4974
  esac
4975
4976
  _LT_TAGVAR(ld_shlibs, $1)=yes
4977
  if test "$with_gnu_ld" = yes; then
4978
    # If archive_cmds runs LD, not CC, wlarc should be empty
4979
    wlarc='${wl}'
4980
4981
    # Set some defaults for GNU ld with shared library support. These
4982
    # are reset later if shared libraries are not supported. Putting them
4983
    # here allows them to be overridden if necessary.
4984
    runpath_var=LD_RUN_PATH
4985
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4986
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4987
    # ancient GNU ld didn't support --whole-archive et. al.
4988
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4989
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4990
    else
4991
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4992
    fi
4993
    supports_anon_versioning=no
4994
    case `$LD -v 2>&1` in
4995
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4996
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4997
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4998
      *\ 2.11.*) ;; # other 2.11 versions
4999
      *) supports_anon_versioning=yes ;;
5000
    esac
5001
5002
    # See if GNU ld supports shared libraries.
5003
    case $host_os in
5004
    aix[[3-9]]*)
5005
      # On AIX/PPC, the GNU linker is very broken
5006
      if test "$host_cpu" != ia64; then
5007
	_LT_TAGVAR(ld_shlibs, $1)=no
5008
	cat <<_LT_EOF 1>&2
5009
5010
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5011
*** to be unable to reliably create shared libraries on AIX.
5012
*** Therefore, libtool is disabling shared libraries support.  If you
5013
*** really care for shared libraries, you may want to modify your PATH
5014
*** so that a non-GNU linker is found, and then restart.
5015
5016
_LT_EOF
5017
      fi
5018
      ;;
5019
5020
    amigaos*)
5021
      case $host_cpu in
5022
      powerpc)
5023
            # see comment about AmigaOS4 .so support
5024
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5025
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5026
        ;;
5027
      m68k)
5028
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5029
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5030
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5031
        ;;
5032
      esac
5033
      ;;
5034
5035
    beos*)
5036
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5037
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5038
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5039
	# support --undefined.  This deserves some investigation.  FIXME
5040
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5041
      else
5042
	_LT_TAGVAR(ld_shlibs, $1)=no
5043
      fi
5044
      ;;
5045
5046
    cygwin* | mingw* | pw32* | cegcc*)
5047
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5048
      # as there is no search path for DLLs.
5049
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5050
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5051
      _LT_TAGVAR(always_export_symbols, $1)=no
5052
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5053
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5054
5055
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5056
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5057
	# If the export-symbols file already is a .def file (1st line
5058
	# is EXPORTS), use it as is; otherwise, prepend...
5059
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5060
	  cp $export_symbols $output_objdir/$soname.def;
5061
	else
5062
	  echo EXPORTS > $output_objdir/$soname.def;
5063
	  cat $export_symbols >> $output_objdir/$soname.def;
5064
	fi~
5065
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5066
      else
5067
	_LT_TAGVAR(ld_shlibs, $1)=no
5068
      fi
5069
      ;;
5070
5071
    interix[[3-9]]*)
5072
      _LT_TAGVAR(hardcode_direct, $1)=no
5073
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5074
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5075
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5076
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5077
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5078
      # default) and relocated if they conflict, which is a slow very memory
5079
      # consuming and fragmenting process.  To avoid this, we pick a random,
5080
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5081
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5082
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5083
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5084
      ;;
5085
5086
    gnu* | linux* | tpf* | k*bsd*-gnu)
5087
      tmp_diet=no
5088
      if test "$host_os" = linux-dietlibc; then
5089
	case $cc_basename in
5090
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5091
	esac
5092
      fi
5093
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5094
	 && test "$tmp_diet" = no
5095
      then
5096
	tmp_addflag=
5097
	tmp_sharedflag='-shared'
5098
	case $cc_basename,$host_cpu in
5099
        pgcc*)				# Portland Group C compiler
5100
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5101
	  tmp_addflag=' $pic_flag'
5102
	  ;;
5103
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5104
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5105
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5106
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5107
	  tmp_addflag=' -i_dynamic' ;;
5108
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5109
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5110
	ifc* | ifort*)			# Intel Fortran compiler
5111
	  tmp_addflag=' -nofor_main' ;;
5112
	lf95*)				# Lahey Fortran 8.1
5113
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5114
	  tmp_sharedflag='--shared' ;;
5115
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5116
	  tmp_sharedflag='-qmkshrobj'
5117
	  tmp_addflag= ;;
5118
	esac
5119
	case `$CC -V 2>&1 | sed 5q` in
5120
	*Sun\ C*)			# Sun C 5.9
5121
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5122
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5123
	  tmp_sharedflag='-G' ;;
5124
	*Sun\ F*)			# Sun Fortran 8.3
5125
	  tmp_sharedflag='-G' ;;
5126
	esac
5127
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5128
5129
        if test "x$supports_anon_versioning" = xyes; then
5130
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5131
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5132
	    echo "local: *; };" >> $output_objdir/$libname.ver~
5133
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5134
        fi
5135
5136
	case $cc_basename in
5137
	xlf*)
5138
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5139
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5140
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5141
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5142
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5143
	  if test "x$supports_anon_versioning" = xyes; then
5144
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5145
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5146
	      echo "local: *; };" >> $output_objdir/$libname.ver~
5147
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5148
	  fi
5149
	  ;;
5150
	esac
5151
      else
5152
        _LT_TAGVAR(ld_shlibs, $1)=no
5153
      fi
5154
      ;;
5155
5156
    netbsd*)
5157
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5158
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5159
	wlarc=
5160
      else
5161
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5162
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5163
      fi
5164
      ;;
5165
5166
    solaris*)
5167
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5168
	_LT_TAGVAR(ld_shlibs, $1)=no
5169
	cat <<_LT_EOF 1>&2
5170
5171
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5172
*** create shared libraries on Solaris systems.  Therefore, libtool
5173
*** is disabling shared libraries support.  We urge you to upgrade GNU
5174
*** binutils to release 2.9.1 or newer.  Another option is to modify
5175
*** your PATH or compiler configuration so that the native linker is
5176
*** used, and then restart.
5177
5178
_LT_EOF
5179
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5180
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5181
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5182
      else
5183
	_LT_TAGVAR(ld_shlibs, $1)=no
5184
      fi
5185
      ;;
5186
5187
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5188
      case `$LD -v 2>&1` in
5189
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5190
	_LT_TAGVAR(ld_shlibs, $1)=no
5191
	cat <<_LT_EOF 1>&2
5192
5193
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5194
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5195
*** is disabling shared libraries support.  We urge you to upgrade GNU
5196
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5197
*** your PATH or compiler configuration so that the native linker is
5198
*** used, and then restart.
5199
5200
_LT_EOF
5201
	;;
5202
	*)
5203
	  # For security reasons, it is highly recommended that you always
5204
	  # use absolute paths for naming shared libraries, and exclude the
5205
	  # DT_RUNPATH tag from executables and libraries.  But doing so
5206
	  # requires that you compile everything twice, which is a pain.
5207
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5208
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5209
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5210
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5211
	  else
5212
	    _LT_TAGVAR(ld_shlibs, $1)=no
5213
	  fi
5214
	;;
5215
      esac
5216
      ;;
5217
5218
    sunos4*)
5219
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5220
      wlarc=
5221
      _LT_TAGVAR(hardcode_direct, $1)=yes
5222
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5223
      ;;
5224
5225
    *)
5226
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5227
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5228
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5229
      else
5230
	_LT_TAGVAR(ld_shlibs, $1)=no
5231
      fi
5232
      ;;
5233
    esac
5234
5235
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5236
      runpath_var=
5237
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5238
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5239
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5240
    fi
5241
  else
5242
    # PORTME fill in a description of your system's linker (not GNU ld)
5243
    case $host_os in
5244
    aix3*)
5245
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5246
      _LT_TAGVAR(always_export_symbols, $1)=yes
5247
      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5248
      # Note: this linker hardcodes the directories in LIBPATH if there
5249
      # are no directories specified by -L.
5250
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5251
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5252
	# Neither direct hardcoding nor static linking is supported with a
5253
	# broken collect2.
5254
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5255
      fi
5256
      ;;
5257
5258
    aix[[4-9]]*)
5259
      if test "$host_cpu" = ia64; then
5260
	# On IA64, the linker does run time linking by default, so we don't
5261
	# have to do anything special.
5262
	aix_use_runtimelinking=no
5263
	exp_sym_flag='-Bexport'
5264
	no_entry_flag=""
5265
      else
5266
	# If we're using GNU nm, then we don't want the "-C" option.
5267
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5268
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5269
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5270
	else
5271
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5272
	fi
5273
	aix_use_runtimelinking=no
5274
5275
	# Test if we are trying to use run time linking or normal
5276
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5277
	# need to do runtime linking.
5278
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5279
	  for ld_flag in $LDFLAGS; do
5280
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5281
	    aix_use_runtimelinking=yes
5282
	    break
5283
	  fi
5284
	  done
5285
	  ;;
5286
	esac
5287
5288
	exp_sym_flag='-bexport'
5289
	no_entry_flag='-bnoentry'
5290
      fi
5291
5292
      # When large executables or shared objects are built, AIX ld can
5293
      # have problems creating the table of contents.  If linking a library
5294
      # or program results in "error TOC overflow" add -mminimal-toc to
5295
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5296
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5297
5298
      _LT_TAGVAR(archive_cmds, $1)=''
5299
      _LT_TAGVAR(hardcode_direct, $1)=yes
5300
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5301
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5302
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5303
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5304
5305
      if test "$GCC" = yes; then
5306
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5307
	# We only want to do this on AIX 4.2 and lower, the check
5308
	# below for broken collect2 doesn't work under 4.3+
5309
	  collect2name=`${CC} -print-prog-name=collect2`
5310
	  if test -f "$collect2name" &&
5311
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5312
	  then
5313
	  # We have reworked collect2
5314
	  :
5315
	  else
5316
	  # We have old collect2
5317
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5318
	  # It fails to find uninstalled libraries when the uninstalled
5319
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5320
	  # to unsupported forces relinking
5321
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5322
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5323
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5324
	  fi
5325
	  ;;
5326
	esac
5327
	shared_flag='-shared'
5328
	if test "$aix_use_runtimelinking" = yes; then
5329
	  shared_flag="$shared_flag "'${wl}-G'
5330
	fi
5331
      else
5332
	# not using gcc
5333
	if test "$host_cpu" = ia64; then
5334
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5335
	# chokes on -Wl,-G. The following line is correct:
5336
	  shared_flag='-G'
5337
	else
5338
	  if test "$aix_use_runtimelinking" = yes; then
5339
	    shared_flag='${wl}-G'
5340
	  else
5341
	    shared_flag='${wl}-bM:SRE'
5342
	  fi
5343
	fi
5344
      fi
5345
5346
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5347
      # It seems that -bexpall does not export symbols beginning with
5348
      # underscore (_), so it is better to generate a list of symbols to export.
5349
      _LT_TAGVAR(always_export_symbols, $1)=yes
5350
      if test "$aix_use_runtimelinking" = yes; then
5351
	# Warning - without using the other runtime loading flags (-brtl),
5352
	# -berok will link without error, but may produce a broken library.
5353
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5354
        # Determine the default libpath from the value encoded in an
5355
        # empty executable.
5356
        _LT_SYS_MODULE_PATH_AIX
5357
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5358
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5359
      else
5360
	if test "$host_cpu" = ia64; then
5361
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5362
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5363
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5364
	else
5365
	 # Determine the default libpath from the value encoded in an
5366
	 # empty executable.
5367
	 _LT_SYS_MODULE_PATH_AIX
5368
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5369
	  # Warning - without using the other run time loading flags,
5370
	  # -berok will link without error, but may produce a broken library.
5371
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5372
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5373
	  # Exported symbols can be pulled into shared objects from archives
5374
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5375
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5376
	  # This is similar to how AIX traditionally builds its shared libraries.
5377
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5378
	fi
5379
      fi
5380
      ;;
5381
5382
    amigaos*)
5383
      case $host_cpu in
5384
      powerpc)
5385
            # see comment about AmigaOS4 .so support
5386
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5387
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5388
        ;;
5389
      m68k)
5390
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5391
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5392
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5393
        ;;
5394
      esac
5395
      ;;
5396
5397
    bsdi[[45]]*)
5398
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5399
      ;;
5400
5401
    cygwin* | mingw* | pw32* | cegcc*)
5402
      # When not using gcc, we currently assume that we are using
5403
      # Microsoft Visual C++.
5404
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5405
      # no search path for DLLs.
5406
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5407
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5408
      # Tell ltmain to make .lib files, not .a files.
5409
      libext=lib
5410
      # Tell ltmain to make .dll files, not .so files.
5411
      shrext_cmds=".dll"
5412
      # FIXME: Setting linknames here is a bad hack.
5413
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5414
      # The linker will automatically build a .lib file if we build a DLL.
5415
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5416
      # FIXME: Should let the user specify the lib program.
5417
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5418
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5419
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5420
      ;;
5421
5422
    darwin* | rhapsody*)
5423
      _LT_DARWIN_LINKER_FEATURES($1)
5424
      ;;
5425
5426
    dgux*)
5427
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5428
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5429
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5430
      ;;
5431
5432
    freebsd1*)
5433
      _LT_TAGVAR(ld_shlibs, $1)=no
5434
      ;;
5435
5436
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5437
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5438
    # does not break anything, and helps significantly (at the cost of a little
5439
    # extra space).
5440
    freebsd2.2*)
5441
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5442
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5443
      _LT_TAGVAR(hardcode_direct, $1)=yes
5444
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5445
      ;;
5446
5447
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5448
    freebsd2*)
5449
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5450
      _LT_TAGVAR(hardcode_direct, $1)=yes
5451
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5452
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5453
      ;;
5454
5455
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5456
    freebsd* | dragonfly*)
5457
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5458
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5459
      _LT_TAGVAR(hardcode_direct, $1)=yes
5460
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5461
      ;;
5462
5463
    hpux9*)
5464
      if test "$GCC" = yes; then
5465
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5466
      else
5467
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5468
      fi
5469
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5470
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5471
      _LT_TAGVAR(hardcode_direct, $1)=yes
5472
5473
      # hardcode_minus_L: Not really in the search PATH,
5474
      # but as the default location of the library.
5475
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5476
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5477
      ;;
5478
5479
    hpux10*)
5480
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5481
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5482
      else
5483
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5484
      fi
5485
      if test "$with_gnu_ld" = no; then
5486
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5487
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5488
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5489
	_LT_TAGVAR(hardcode_direct, $1)=yes
5490
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5491
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5492
	# hardcode_minus_L: Not really in the search PATH,
5493
	# but as the default location of the library.
5494
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5495
      fi
5496
      ;;
5497
5498
    hpux11*)
5499
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5500
	case $host_cpu in
5501
	hppa*64*)
5502
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5503
	  ;;
5504
	ia64*)
5505
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5506
	  ;;
5507
	*)
5508
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5509
	  ;;
5510
	esac
5511
      else
5512
	case $host_cpu in
5513
	hppa*64*)
5514
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5515
	  ;;
5516
	ia64*)
5517
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5518
	  ;;
5519
	*)
5520
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5521
	  ;;
5522
	esac
5523
      fi
5524
      if test "$with_gnu_ld" = no; then
5525
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5526
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5527
5528
	case $host_cpu in
5529
	hppa*64*|ia64*)
5530
	  _LT_TAGVAR(hardcode_direct, $1)=no
5531
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5532
	  ;;
5533
	*)
5534
	  _LT_TAGVAR(hardcode_direct, $1)=yes
5535
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5536
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5537
5538
	  # hardcode_minus_L: Not really in the search PATH,
5539
	  # but as the default location of the library.
5540
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5541
	  ;;
5542
	esac
5543
      fi
5544
      ;;
5545
5546
    irix5* | irix6* | nonstopux*)
5547
      if test "$GCC" = yes; then
5548
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5549
	# Try to use the -exported_symbol ld option, if it does not
5550
	# work, assume that -exports_file does not work either and
5551
	# implicitly export all symbols.
5552
        save_LDFLAGS="$LDFLAGS"
5553
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5554
        AC_LINK_IFELSE(int foo(void) {},
5555
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5556
        )
5557
        LDFLAGS="$save_LDFLAGS"
5558
      else
5559
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5560
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5561
      fi
5562
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5563
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5564
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5565
      _LT_TAGVAR(inherit_rpath, $1)=yes
5566
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5567
      ;;
5568
5569
    netbsd*)
5570
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5571
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5572
      else
5573
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5574
      fi
5575
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5576
      _LT_TAGVAR(hardcode_direct, $1)=yes
5577
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5578
      ;;
5579
5580
    newsos6)
5581
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5582
      _LT_TAGVAR(hardcode_direct, $1)=yes
5583
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5584
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5585
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5586
      ;;
5587
5588
    *nto* | *qnx*)
5589
      ;;
5590
5591
    openbsd*)
5592
      if test -f /usr/libexec/ld.so; then
5593
	_LT_TAGVAR(hardcode_direct, $1)=yes
5594
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5595
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5596
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5597
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5598
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5599
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5600
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5601
	else
5602
	  case $host_os in
5603
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5604
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5605
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5606
	     ;;
5607
	   *)
5608
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5609
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5610
	     ;;
5611
	  esac
5612
	fi
5613
      else
5614
	_LT_TAGVAR(ld_shlibs, $1)=no
5615
      fi
5616
      ;;
5617
5618
    os2*)
5619
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5620
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5621
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5622
      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5623
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5624
      ;;
5625
5626
    osf3*)
5627
      if test "$GCC" = yes; then
5628
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5629
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5630
      else
5631
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5632
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5633
      fi
5634
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5635
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5636
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5637
      ;;
5638
5639
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5640
      if test "$GCC" = yes; then
5641
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5642
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5643
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5644
      else
5645
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5646
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5647
	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5648
	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5649
5650
	# Both c and cxx compiler support -rpath directly
5651
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5652
      fi
5653
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5654
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5655
      ;;
5656
5657
    solaris*)
5658
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5659
      if test "$GCC" = yes; then
5660
	wlarc='${wl}'
5661
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5662
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5663
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5664
      else
5665
	case `$CC -V 2>&1` in
5666
	*"Compilers 5.0"*)
5667
	  wlarc=''
5668
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5669
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5670
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5671
	  ;;
5672
	*)
5673
	  wlarc='${wl}'
5674
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5675
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5676
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5677
	  ;;
5678
	esac
5679
      fi
5680
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5681
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5682
      case $host_os in
5683
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5684
      *)
5685
	# The compiler driver will combine and reorder linker options,
5686
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5687
	# but is careful enough not to reorder.
5688
	# Supported since Solaris 2.6 (maybe 2.5.1?)
5689
	if test "$GCC" = yes; then
5690
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5691
	else
5692
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5693
	fi
5694
	;;
5695
      esac
5696
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5697
      ;;
5698
5699
    sunos4*)
5700
      if test "x$host_vendor" = xsequent; then
5701
	# Use $CC to link under sequent, because it throws in some extra .o
5702
	# files that make .init and .fini sections work.
5703
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5704
      else
5705
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5706
      fi
5707
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5708
      _LT_TAGVAR(hardcode_direct, $1)=yes
5709
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5710
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5711
      ;;
5712
5713
    sysv4)
5714
      case $host_vendor in
5715
	sni)
5716
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5717
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5718
	;;
5719
	siemens)
5720
	  ## LD is ld it makes a PLAMLIB
5721
	  ## CC just makes a GrossModule.
5722
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5723
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5724
	  _LT_TAGVAR(hardcode_direct, $1)=no
5725
        ;;
5726
	motorola)
5727
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5728
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5729
	;;
5730
      esac
5731
      runpath_var='LD_RUN_PATH'
5732
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5733
      ;;
5734
5735
    sysv4.3*)
5736
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5737
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5738
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5739
      ;;
5740
5741
    sysv4*MP*)
5742
      if test -d /usr/nec; then
5743
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5744
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5745
	runpath_var=LD_RUN_PATH
5746
	hardcode_runpath_var=yes
5747
	_LT_TAGVAR(ld_shlibs, $1)=yes
5748
      fi
5749
      ;;
5750
5751
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5752
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5753
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5754
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5755
      runpath_var='LD_RUN_PATH'
5756
5757
      if test "$GCC" = yes; then
5758
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5759
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5760
      else
5761
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5762
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5763
      fi
5764
      ;;
5765
5766
    sysv5* | sco3.2v5* | sco5v6*)
5767
      # Note: We can NOT use -z defs as we might desire, because we do not
5768
      # link with -lc, and that would cause any symbols used from libc to
5769
      # always be unresolved, which means just about no library would
5770
      # ever link correctly.  If we're not using GNU ld we use -z text
5771
      # though, which does catch some bad symbols but isn't as heavy-handed
5772
      # as -z defs.
5773
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5774
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5775
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5776
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5777
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5778
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5779
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5780
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5781
      runpath_var='LD_RUN_PATH'
5782
5783
      if test "$GCC" = yes; then
5784
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5785
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5786
      else
5787
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5788
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5789
      fi
5790
      ;;
5791
5792
    uts4*)
5793
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5794
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5795
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5796
      ;;
5797
5798
    *)
5799
      _LT_TAGVAR(ld_shlibs, $1)=no
5800
      ;;
5801
    esac
5802
5803
    if test x$host_vendor = xsni; then
5804
      case $host in
5805
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5806
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5807
	;;
5808
      esac
5809
    fi
5810
  fi
5811
])
5812
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5813
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5814
5815
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5816
5817
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5818
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5819
_LT_DECL([], [extract_expsyms_cmds], [2],
5820
    [The commands to extract the exported symbol list from a shared archive])
5821
5822
#
5823
# Do we need to explicitly link libc?
5824
#
5825
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5826
x|xyes)
5827
  # Assume -lc should be added
5828
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5829
5830
  if test "$enable_shared" = yes && test "$GCC" = yes; then
5831
    case $_LT_TAGVAR(archive_cmds, $1) in
5832
    *'~'*)
5833
      # FIXME: we may have to deal with multi-command sequences.
5834
      ;;
5835
    '$CC '*)
5836
      # Test whether the compiler implicitly links with -lc since on some
5837
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5838
      # to ld, don't add -lc before -lgcc.
5839
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5840
      $RM conftest*
5841
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5842
5843
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5844
        soname=conftest
5845
        lib=conftest
5846
        libobjs=conftest.$ac_objext
5847
        deplibs=
5848
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5849
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5850
        compiler_flags=-v
5851
        linker_flags=-v
5852
        verstring=
5853
        output_objdir=.
5854
        libname=conftest
5855
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5856
        _LT_TAGVAR(allow_undefined_flag, $1)=
5857
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5858
        then
5859
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5860
        else
5861
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5862
        fi
5863
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5864
      else
5865
        cat conftest.err 1>&5
5866
      fi
5867
      $RM conftest*
5868
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5869
      ;;
5870
    esac
5871
  fi
5872
  ;;
5873
esac
5874
5875
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5876
    [Whether or not to add -lc for building shared libraries])
5877
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5878
    [enable_shared_with_static_runtimes], [0],
5879
    [Whether or not to disallow shared libs when runtime libs are static])
5880
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5881
    [Compiler flag to allow reflexive dlopens])
5882
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5883
    [Compiler flag to generate shared objects directly from archives])
5884
_LT_TAGDECL([], [compiler_needs_object], [1],
5885
    [Whether the compiler copes with passing no objects directly])
5886
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5887
    [Create an old-style archive from a shared archive])
5888
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5889
    [Create a temporary old-style archive to link instead of a shared archive])
5890
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5891
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5892
_LT_TAGDECL([], [module_cmds], [2],
5893
    [Commands used to build a loadable module if different from building
5894
    a shared archive.])
5895
_LT_TAGDECL([], [module_expsym_cmds], [2])
5896
_LT_TAGDECL([], [with_gnu_ld], [1],
5897
    [Whether we are building with GNU ld or not])
5898
_LT_TAGDECL([], [allow_undefined_flag], [1],
5899
    [Flag that allows shared libraries with undefined symbols to be built])
5900
_LT_TAGDECL([], [no_undefined_flag], [1],
5901
    [Flag that enforces no undefined symbols])
5902
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5903
    [Flag to hardcode $libdir into a binary during linking.
5904
    This must work even if $libdir does not exist])
5905
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5906
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5907
    during linking.  This must work even if $libdir does not exist]])
5908
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5909
    [Whether we need a single "-rpath" flag with a separated argument])
5910
_LT_TAGDECL([], [hardcode_direct], [0],
5911
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5912
    DIR into the resulting binary])
5913
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5914
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5915
    DIR into the resulting binary and the resulting library dependency is
5916
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5917
    library is relocated])
5918
_LT_TAGDECL([], [hardcode_minus_L], [0],
5919
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5920
    into the resulting binary])
5921
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5922
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5923
    into the resulting binary])
5924
_LT_TAGDECL([], [hardcode_automatic], [0],
5925
    [Set to "yes" if building a shared library automatically hardcodes DIR
5926
    into the library and all subsequent libraries and executables linked
5927
    against it])
5928
_LT_TAGDECL([], [inherit_rpath], [0],
5929
    [Set to yes if linker adds runtime paths of dependent libraries
5930
    to runtime path list])
5931
_LT_TAGDECL([], [link_all_deplibs], [0],
5932
    [Whether libtool must link a program against all its dependency libraries])
5933
_LT_TAGDECL([], [fix_srcfile_path], [1],
5934
    [Fix the shell variable $srcfile for the compiler])
5935
_LT_TAGDECL([], [always_export_symbols], [0],
5936
    [Set to "yes" if exported symbols are required])
5937
_LT_TAGDECL([], [export_symbols_cmds], [2],
5938
    [The commands to list exported symbols])
5939
_LT_TAGDECL([], [exclude_expsyms], [1],
5940
    [Symbols that should not be listed in the preloaded symbols])
5941
_LT_TAGDECL([], [include_expsyms], [1],
5942
    [Symbols that must always be exported])
5943
_LT_TAGDECL([], [prelink_cmds], [2],
5944
    [Commands necessary for linking programs (against libraries) with templates])
5945
_LT_TAGDECL([], [file_list_spec], [1],
5946
    [Specify filename containing input files])
5947
dnl FIXME: Not yet implemented
5948
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5949
dnl    [Compiler flag to generate thread safe objects])
5950
])# _LT_LINKER_SHLIBS
5951
5952
5953
# _LT_LANG_C_CONFIG([TAG])
5954
# ------------------------
5955
# Ensure that the configuration variables for a C compiler are suitably
5956
# defined.  These variables are subsequently used by _LT_CONFIG to write
5957
# the compiler configuration to `libtool'.
5958
m4_defun([_LT_LANG_C_CONFIG],
5959
[m4_require([_LT_DECL_EGREP])dnl
5960
lt_save_CC="$CC"
5961
AC_LANG_PUSH(C)
5962
5963
# Source file extension for C test sources.
5964
ac_ext=c
5965
5966
# Object file extension for compiled C test sources.
5967
objext=o
5968
_LT_TAGVAR(objext, $1)=$objext
5969
5970
# Code to be used in simple compile tests
5971
lt_simple_compile_test_code="int some_variable = 0;"
5972
5973
# Code to be used in simple link tests
5974
lt_simple_link_test_code='int main(){return(0);}'
5975
5976
_LT_TAG_COMPILER
5977
# Save the default compiler, since it gets overwritten when the other
5978
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5979
compiler_DEFAULT=$CC
5980
5981
# save warnings/boilerplate of simple test code
5982
_LT_COMPILER_BOILERPLATE
5983
_LT_LINKER_BOILERPLATE
5984
5985
if test -n "$compiler"; then
5986
  _LT_COMPILER_NO_RTTI($1)
5987
  _LT_COMPILER_PIC($1)
5988
  _LT_COMPILER_C_O($1)
5989
  _LT_COMPILER_FILE_LOCKS($1)
5990
  _LT_LINKER_SHLIBS($1)
5991
  _LT_SYS_DYNAMIC_LINKER($1)
5992
  _LT_LINKER_HARDCODE_LIBPATH($1)
5993
  LT_SYS_DLOPEN_SELF
5994
  _LT_CMD_STRIPLIB
5995
5996
  # Report which library types will actually be built
5997
  AC_MSG_CHECKING([if libtool supports shared libraries])
5998
  AC_MSG_RESULT([$can_build_shared])
5999
6000
  AC_MSG_CHECKING([whether to build shared libraries])
6001
  test "$can_build_shared" = "no" && enable_shared=no
6002
6003
  # On AIX, shared libraries and static libraries use the same namespace, and
6004
  # are all built from PIC.
6005
  case $host_os in
6006
  aix3*)
6007
    test "$enable_shared" = yes && enable_static=no
6008
    if test -n "$RANLIB"; then
6009
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6010
      postinstall_cmds='$RANLIB $lib'
6011
    fi
6012
    ;;
6013
6014
  aix[[4-9]]*)
6015
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6016
      test "$enable_shared" = yes && enable_static=no
6017
    fi
6018
    ;;
6019
  esac
6020
  AC_MSG_RESULT([$enable_shared])
6021
6022
  AC_MSG_CHECKING([whether to build static libraries])
6023
  # Make sure either enable_shared or enable_static is yes.
6024
  test "$enable_shared" = yes || enable_static=yes
6025
  AC_MSG_RESULT([$enable_static])
6026
6027
  _LT_CONFIG($1)
6028
fi
6029
AC_LANG_POP
6030
CC="$lt_save_CC"
6031
])# _LT_LANG_C_CONFIG
6032
6033
6034
# _LT_PROG_CXX
6035
# ------------
6036
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6037
# compiler, we have our own version here.
6038
m4_defun([_LT_PROG_CXX],
6039
[
6040
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6041
AC_PROG_CXX
6042
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6043
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6044
    (test "X$CXX" != "Xg++"))) ; then
6045
  AC_PROG_CXXCPP
6046
else
6047
  _lt_caught_CXX_error=yes
6048
fi
6049
popdef([AC_MSG_ERROR])
6050
])# _LT_PROG_CXX
6051
6052
dnl aclocal-1.4 backwards compatibility:
6053
dnl AC_DEFUN([_LT_PROG_CXX], [])
6054
6055
6056
# _LT_LANG_CXX_CONFIG([TAG])
6057
# --------------------------
6058
# Ensure that the configuration variables for a C++ compiler are suitably
6059
# defined.  These variables are subsequently used by _LT_CONFIG to write
6060
# the compiler configuration to `libtool'.
6061
m4_defun([_LT_LANG_CXX_CONFIG],
6062
[AC_REQUIRE([_LT_PROG_CXX])dnl
6063
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6064
m4_require([_LT_DECL_EGREP])dnl
6065
6066
AC_LANG_PUSH(C++)
6067
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6068
_LT_TAGVAR(allow_undefined_flag, $1)=
6069
_LT_TAGVAR(always_export_symbols, $1)=no
6070
_LT_TAGVAR(archive_expsym_cmds, $1)=
6071
_LT_TAGVAR(compiler_needs_object, $1)=no
6072
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6073
_LT_TAGVAR(hardcode_direct, $1)=no
6074
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6075
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6076
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6077
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6078
_LT_TAGVAR(hardcode_minus_L, $1)=no
6079
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6080
_LT_TAGVAR(hardcode_automatic, $1)=no
6081
_LT_TAGVAR(inherit_rpath, $1)=no
6082
_LT_TAGVAR(module_cmds, $1)=
6083
_LT_TAGVAR(module_expsym_cmds, $1)=
6084
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6085
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6086
_LT_TAGVAR(no_undefined_flag, $1)=
6087
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6088
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6089
6090
# Source file extension for C++ test sources.
6091
ac_ext=cpp
6092
6093
# Object file extension for compiled C++ test sources.
6094
objext=o
6095
_LT_TAGVAR(objext, $1)=$objext
6096
6097
# No sense in running all these tests if we already determined that
6098
# the CXX compiler isn't working.  Some variables (like enable_shared)
6099
# are currently assumed to apply to all compilers on this platform,
6100
# and will be corrupted by setting them based on a non-working compiler.
6101
if test "$_lt_caught_CXX_error" != yes; then
6102
  # Code to be used in simple compile tests
6103
  lt_simple_compile_test_code="int some_variable = 0;"
6104
6105
  # Code to be used in simple link tests
6106
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6107
6108
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6109
  _LT_TAG_COMPILER
6110
6111
  # save warnings/boilerplate of simple test code
6112
  _LT_COMPILER_BOILERPLATE
6113
  _LT_LINKER_BOILERPLATE
6114
6115
  # Allow CC to be a program name with arguments.
6116
  lt_save_CC=$CC
6117
  lt_save_LD=$LD
6118
  lt_save_GCC=$GCC
6119
  GCC=$GXX
6120
  lt_save_with_gnu_ld=$with_gnu_ld
6121
  lt_save_path_LD=$lt_cv_path_LD
6122
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6123
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6124
  else
6125
    $as_unset lt_cv_prog_gnu_ld
6126
  fi
6127
  if test -n "${lt_cv_path_LDCXX+set}"; then
6128
    lt_cv_path_LD=$lt_cv_path_LDCXX
6129
  else
6130
    $as_unset lt_cv_path_LD
6131
  fi
6132
  test -z "${LDCXX+set}" || LD=$LDCXX
6133
  CC=${CXX-"c++"}
6134
  compiler=$CC
6135
  _LT_TAGVAR(compiler, $1)=$CC
6136
  _LT_CC_BASENAME([$compiler])
6137
6138
  if test -n "$compiler"; then
6139
    # We don't want -fno-exception when compiling C++ code, so set the
6140
    # no_builtin_flag separately
6141
    if test "$GXX" = yes; then
6142
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6143
    else
6144
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6145
    fi
6146
6147
    if test "$GXX" = yes; then
6148
      # Set up default GNU C++ configuration
6149
6150
      LT_PATH_LD
6151
6152
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6153
      # archiving commands below assume that GNU ld is being used.
6154
      if test "$with_gnu_ld" = yes; then
6155
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6156
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6157
6158
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6159
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6160
6161
        # If archive_cmds runs LD, not CC, wlarc should be empty
6162
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6163
        #     investigate it a little bit more. (MM)
6164
        wlarc='${wl}'
6165
6166
        # ancient GNU ld didn't support --whole-archive et. al.
6167
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6168
	  $GREP 'no-whole-archive' > /dev/null; then
6169
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6170
        else
6171
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6172
        fi
6173
      else
6174
        with_gnu_ld=no
6175
        wlarc=
6176
6177
        # A generic and very simple default shared library creation
6178
        # command for GNU C++ for the case where it uses the native
6179
        # linker, instead of GNU ld.  If possible, this setting should
6180
        # overridden to take advantage of the native linker features on
6181
        # the platform it is being used on.
6182
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6183
      fi
6184
6185
      # Commands to make compiler produce verbose output that lists
6186
      # what "hidden" libraries, object files and flags are used when
6187
      # linking a shared library.
6188
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6189
6190
    else
6191
      GXX=no
6192
      with_gnu_ld=no
6193
      wlarc=
6194
    fi
6195
6196
    # PORTME: fill in a description of your system's C++ link characteristics
6197
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6198
    _LT_TAGVAR(ld_shlibs, $1)=yes
6199
    case $host_os in
6200
      aix3*)
6201
        # FIXME: insert proper C++ library support
6202
        _LT_TAGVAR(ld_shlibs, $1)=no
6203
        ;;
6204
      aix[[4-9]]*)
6205
        if test "$host_cpu" = ia64; then
6206
          # On IA64, the linker does run time linking by default, so we don't
6207
          # have to do anything special.
6208
          aix_use_runtimelinking=no
6209
          exp_sym_flag='-Bexport'
6210
          no_entry_flag=""
6211
        else
6212
          aix_use_runtimelinking=no
6213
6214
          # Test if we are trying to use run time linking or normal
6215
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6216
          # need to do runtime linking.
6217
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6218
	    for ld_flag in $LDFLAGS; do
6219
	      case $ld_flag in
6220
	      *-brtl*)
6221
	        aix_use_runtimelinking=yes
6222
	        break
6223
	        ;;
6224
	      esac
6225
	    done
6226
	    ;;
6227
          esac
6228
6229
          exp_sym_flag='-bexport'
6230
          no_entry_flag='-bnoentry'
6231
        fi
6232
6233
        # When large executables or shared objects are built, AIX ld can
6234
        # have problems creating the table of contents.  If linking a library
6235
        # or program results in "error TOC overflow" add -mminimal-toc to
6236
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6237
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6238
6239
        _LT_TAGVAR(archive_cmds, $1)=''
6240
        _LT_TAGVAR(hardcode_direct, $1)=yes
6241
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6242
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6243
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6244
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6245
6246
        if test "$GXX" = yes; then
6247
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6248
          # We only want to do this on AIX 4.2 and lower, the check
6249
          # below for broken collect2 doesn't work under 4.3+
6250
	  collect2name=`${CC} -print-prog-name=collect2`
6251
	  if test -f "$collect2name" &&
6252
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6253
	  then
6254
	    # We have reworked collect2
6255
	    :
6256
	  else
6257
	    # We have old collect2
6258
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6259
	    # It fails to find uninstalled libraries when the uninstalled
6260
	    # path is not listed in the libpath.  Setting hardcode_minus_L
6261
	    # to unsupported forces relinking
6262
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6263
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6264
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6265
	  fi
6266
          esac
6267
          shared_flag='-shared'
6268
	  if test "$aix_use_runtimelinking" = yes; then
6269
	    shared_flag="$shared_flag "'${wl}-G'
6270
	  fi
6271
        else
6272
          # not using gcc
6273
          if test "$host_cpu" = ia64; then
6274
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6275
	  # chokes on -Wl,-G. The following line is correct:
6276
	  shared_flag='-G'
6277
          else
6278
	    if test "$aix_use_runtimelinking" = yes; then
6279
	      shared_flag='${wl}-G'
6280
	    else
6281
	      shared_flag='${wl}-bM:SRE'
6282
	    fi
6283
          fi
6284
        fi
6285
6286
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6287
        # It seems that -bexpall does not export symbols beginning with
6288
        # underscore (_), so it is better to generate a list of symbols to
6289
	# export.
6290
        _LT_TAGVAR(always_export_symbols, $1)=yes
6291
        if test "$aix_use_runtimelinking" = yes; then
6292
          # Warning - without using the other runtime loading flags (-brtl),
6293
          # -berok will link without error, but may produce a broken library.
6294
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6295
          # Determine the default libpath from the value encoded in an empty
6296
          # executable.
6297
          _LT_SYS_MODULE_PATH_AIX
6298
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6299
6300
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6301
        else
6302
          if test "$host_cpu" = ia64; then
6303
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6304
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6305
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6306
          else
6307
	    # Determine the default libpath from the value encoded in an
6308
	    # empty executable.
6309
	    _LT_SYS_MODULE_PATH_AIX
6310
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6311
	    # Warning - without using the other run time loading flags,
6312
	    # -berok will link without error, but may produce a broken library.
6313
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6314
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6315
	    # Exported symbols can be pulled into shared objects from archives
6316
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6317
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6318
	    # This is similar to how AIX traditionally builds its shared
6319
	    # libraries.
6320
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6321
          fi
6322
        fi
6323
        ;;
6324
6325
      beos*)
6326
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6327
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6328
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6329
	  # support --undefined.  This deserves some investigation.  FIXME
6330
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6331
	else
6332
	  _LT_TAGVAR(ld_shlibs, $1)=no
6333
	fi
6334
	;;
6335
6336
      chorus*)
6337
        case $cc_basename in
6338
          *)
6339
	  # FIXME: insert proper C++ library support
6340
	  _LT_TAGVAR(ld_shlibs, $1)=no
6341
	  ;;
6342
        esac
6343
        ;;
6344
6345
      cygwin* | mingw* | pw32* | cegcc*)
6346
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6347
        # as there is no search path for DLLs.
6348
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6349
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6350
        _LT_TAGVAR(always_export_symbols, $1)=no
6351
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6352
6353
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6354
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6355
          # If the export-symbols file already is a .def file (1st line
6356
          # is EXPORTS), use it as is; otherwise, prepend...
6357
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6358
	    cp $export_symbols $output_objdir/$soname.def;
6359
          else
6360
	    echo EXPORTS > $output_objdir/$soname.def;
6361
	    cat $export_symbols >> $output_objdir/$soname.def;
6362
          fi~
6363
          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6364
        else
6365
          _LT_TAGVAR(ld_shlibs, $1)=no
6366
        fi
6367
        ;;
6368
      darwin* | rhapsody*)
6369
        _LT_DARWIN_LINKER_FEATURES($1)
6370
	;;
6371
6372
      dgux*)
6373
        case $cc_basename in
6374
          ec++*)
6375
	    # FIXME: insert proper C++ library support
6376
	    _LT_TAGVAR(ld_shlibs, $1)=no
6377
	    ;;
6378
          ghcx*)
6379
	    # Green Hills C++ Compiler
6380
	    # FIXME: insert proper C++ library support
6381
	    _LT_TAGVAR(ld_shlibs, $1)=no
6382
	    ;;
6383
          *)
6384
	    # FIXME: insert proper C++ library support
6385
	    _LT_TAGVAR(ld_shlibs, $1)=no
6386
	    ;;
6387
        esac
6388
        ;;
6389
6390
      freebsd[[12]]*)
6391
        # C++ shared libraries reported to be fairly broken before
6392
	# switch to ELF
6393
        _LT_TAGVAR(ld_shlibs, $1)=no
6394
        ;;
6395
6396
      freebsd-elf*)
6397
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6398
        ;;
6399
6400
      freebsd* | dragonfly*)
6401
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6402
        # conventions
6403
        _LT_TAGVAR(ld_shlibs, $1)=yes
6404
        ;;
6405
6406
      gnu*)
6407
        ;;
6408
6409
      hpux9*)
6410
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6411
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6412
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6413
        _LT_TAGVAR(hardcode_direct, $1)=yes
6414
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6415
				             # but as the default
6416
				             # location of the library.
6417
6418
        case $cc_basename in
6419
          CC*)
6420
            # FIXME: insert proper C++ library support
6421
            _LT_TAGVAR(ld_shlibs, $1)=no
6422
            ;;
6423
          aCC*)
6424
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6425
            # Commands to make compiler produce verbose output that lists
6426
            # what "hidden" libraries, object files and flags are used when
6427
            # linking a shared library.
6428
            #
6429
            # There doesn't appear to be a way to prevent this compiler from
6430
            # explicitly linking system object files so we need to strip them
6431
            # from the output so that they don't get included in the library
6432
            # dependencies.
6433
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6434
            ;;
6435
          *)
6436
            if test "$GXX" = yes; then
6437
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6438
            else
6439
              # FIXME: insert proper C++ library support
6440
              _LT_TAGVAR(ld_shlibs, $1)=no
6441
            fi
6442
            ;;
6443
        esac
6444
        ;;
6445
6446
      hpux10*|hpux11*)
6447
        if test $with_gnu_ld = no; then
6448
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6449
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6450
6451
          case $host_cpu in
6452
            hppa*64*|ia64*)
6453
              ;;
6454
            *)
6455
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6456
              ;;
6457
          esac
6458
        fi
6459
        case $host_cpu in
6460
          hppa*64*|ia64*)
6461
            _LT_TAGVAR(hardcode_direct, $1)=no
6462
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6463
            ;;
6464
          *)
6465
            _LT_TAGVAR(hardcode_direct, $1)=yes
6466
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6467
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6468
					         # but as the default
6469
					         # location of the library.
6470
            ;;
6471
        esac
6472
6473
        case $cc_basename in
6474
          CC*)
6475
	    # FIXME: insert proper C++ library support
6476
	    _LT_TAGVAR(ld_shlibs, $1)=no
6477
	    ;;
6478
          aCC*)
6479
	    case $host_cpu in
6480
	      hppa*64*)
6481
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6482
	        ;;
6483
	      ia64*)
6484
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6485
	        ;;
6486
	      *)
6487
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6488
	        ;;
6489
	    esac
6490
	    # Commands to make compiler produce verbose output that lists
6491
	    # what "hidden" libraries, object files and flags are used when
6492
	    # linking a shared library.
6493
	    #
6494
	    # There doesn't appear to be a way to prevent this compiler from
6495
	    # explicitly linking system object files so we need to strip them
6496
	    # from the output so that they don't get included in the library
6497
	    # dependencies.
6498
	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6499
	    ;;
6500
          *)
6501
	    if test "$GXX" = yes; then
6502
	      if test $with_gnu_ld = no; then
6503
	        case $host_cpu in
6504
	          hppa*64*)
6505
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6506
	            ;;
6507
	          ia64*)
6508
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6509
	            ;;
6510
	          *)
6511
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6512
	            ;;
6513
	        esac
6514
	      fi
6515
	    else
6516
	      # FIXME: insert proper C++ library support
6517
	      _LT_TAGVAR(ld_shlibs, $1)=no
6518
	    fi
6519
	    ;;
6520
        esac
6521
        ;;
6522
6523
      interix[[3-9]]*)
6524
	_LT_TAGVAR(hardcode_direct, $1)=no
6525
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6526
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6527
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6528
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6529
	# Instead, shared libraries are loaded at an image base (0x10000000 by
6530
	# default) and relocated if they conflict, which is a slow very memory
6531
	# consuming and fragmenting process.  To avoid this, we pick a random,
6532
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6533
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6534
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6535
	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6536
	;;
6537
      irix5* | irix6*)
6538
        case $cc_basename in
6539
          CC*)
6540
	    # SGI C++
6541
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6542
6543
	    # Archives containing C++ object files must be created using
6544
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6545
	    # necessary to make sure instantiated templates are included
6546
	    # in the archive.
6547
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6548
	    ;;
6549
          *)
6550
	    if test "$GXX" = yes; then
6551
	      if test "$with_gnu_ld" = no; then
6552
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6553
	      else
6554
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6555
	      fi
6556
	    fi
6557
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6558
	    ;;
6559
        esac
6560
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6561
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6562
        _LT_TAGVAR(inherit_rpath, $1)=yes
6563
        ;;
6564
6565
      linux* | k*bsd*-gnu)
6566
        case $cc_basename in
6567
          KCC*)
6568
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6569
6570
	    # KCC will only create a shared library if the output file
6571
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6572
	    # to its proper name (with version) after linking.
6573
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6574
	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6575
	    # Commands to make compiler produce verbose output that lists
6576
	    # what "hidden" libraries, object files and flags are used when
6577
	    # linking a shared library.
6578
	    #
6579
	    # There doesn't appear to be a way to prevent this compiler from
6580
	    # explicitly linking system object files so we need to strip them
6581
	    # from the output so that they don't get included in the library
6582
	    # dependencies.
6583
	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6584
6585
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6586
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6587
6588
	    # Archives containing C++ object files must be created using
6589
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6590
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6591
	    ;;
6592
	  icpc* | ecpc* )
6593
	    # Intel C++
6594
	    with_gnu_ld=yes
6595
	    # version 8.0 and above of icpc choke on multiply defined symbols
6596
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6597
	    # earlier do not add the objects themselves.
6598
	    case `$CC -V 2>&1` in
6599
	      *"Version 7."*)
6600
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6601
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6602
		;;
6603
	      *)  # Version 8.0 or newer
6604
	        tmp_idyn=
6605
	        case $host_cpu in
6606
		  ia64*) tmp_idyn=' -i_dynamic';;
6607
		esac
6608
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6609
		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6610
		;;
6611
	    esac
6612
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6613
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6614
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6615
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6616
	    ;;
6617
          pgCC* | pgcpp*)
6618
            # Portland Group C++ compiler
6619
	    case `$CC -V` in
6620
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6621
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6622
		rm -rf $tpldir~
6623
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6624
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6625
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6626
		rm -rf $tpldir~
6627
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6628
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6629
		$RANLIB $oldlib'
6630
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6631
		rm -rf $tpldir~
6632
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6633
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6634
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6635
		rm -rf $tpldir~
6636
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6637
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6638
	      ;;
6639
	    *) # Version 6 will use weak symbols
6640
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6641
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6642
	      ;;
6643
	    esac
6644
6645
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6646
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6647
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6648
            ;;
6649
	  cxx*)
6650
	    # Compaq C++
6651
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6652
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6653
6654
	    runpath_var=LD_RUN_PATH
6655
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6656
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6657
6658
	    # Commands to make compiler produce verbose output that lists
6659
	    # what "hidden" libraries, object files and flags are used when
6660
	    # linking a shared library.
6661
	    #
6662
	    # There doesn't appear to be a way to prevent this compiler from
6663
	    # explicitly linking system object files so we need to strip them
6664
	    # from the output so that they don't get included in the library
6665
	    # dependencies.
6666
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6667
	    ;;
6668
	  xl*)
6669
	    # IBM XL 8.0 on PPC, with GNU ld
6670
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6671
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6672
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6673
	    if test "x$supports_anon_versioning" = xyes; then
6674
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6675
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6676
		echo "local: *; };" >> $output_objdir/$libname.ver~
6677
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6678
	    fi
6679
	    ;;
6680
	  *)
6681
	    case `$CC -V 2>&1 | sed 5q` in
6682
	    *Sun\ C*)
6683
	      # Sun C++ 5.9
6684
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6685
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6686
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6687
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6688
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6689
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6690
6691
	      # Not sure whether something based on
6692
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6693
	      # would be better.
6694
	      output_verbose_link_cmd='echo'
6695
6696
	      # Archives containing C++ object files must be created using
6697
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6698
	      # necessary to make sure instantiated templates are included
6699
	      # in the archive.
6700
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6701
	      ;;
6702
	    esac
6703
	    ;;
6704
	esac
6705
	;;
6706
6707
      lynxos*)
6708
        # FIXME: insert proper C++ library support
6709
	_LT_TAGVAR(ld_shlibs, $1)=no
6710
	;;
6711
6712
      m88k*)
6713
        # FIXME: insert proper C++ library support
6714
        _LT_TAGVAR(ld_shlibs, $1)=no
6715
	;;
6716
6717
      mvs*)
6718
        case $cc_basename in
6719
          cxx*)
6720
	    # FIXME: insert proper C++ library support
6721
	    _LT_TAGVAR(ld_shlibs, $1)=no
6722
	    ;;
6723
	  *)
6724
	    # FIXME: insert proper C++ library support
6725
	    _LT_TAGVAR(ld_shlibs, $1)=no
6726
	    ;;
6727
	esac
6728
	;;
6729
6730
      netbsd*)
6731
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6732
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6733
	  wlarc=
6734
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6735
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6736
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6737
	fi
6738
	# Workaround some broken pre-1.5 toolchains
6739
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6740
	;;
6741
6742
      *nto* | *qnx*)
6743
        _LT_TAGVAR(ld_shlibs, $1)=yes
6744
	;;
6745
6746
      openbsd2*)
6747
        # C++ shared libraries are fairly broken
6748
	_LT_TAGVAR(ld_shlibs, $1)=no
6749
	;;
6750
6751
      openbsd*)
6752
	if test -f /usr/libexec/ld.so; then
6753
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6754
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6755
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6756
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6757
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6758
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6759
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6760
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6761
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6762
	  fi
6763
	  output_verbose_link_cmd=echo
6764
	else
6765
	  _LT_TAGVAR(ld_shlibs, $1)=no
6766
	fi
6767
	;;
6768
6769
      osf3* | osf4* | osf5*)
6770
        case $cc_basename in
6771
          KCC*)
6772
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6773
6774
	    # KCC will only create a shared library if the output file
6775
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6776
	    # to its proper name (with version) after linking.
6777
	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6778
6779
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6780
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6781
6782
	    # Archives containing C++ object files must be created using
6783
	    # the KAI C++ compiler.
6784
	    case $host in
6785
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6786
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6787
	    esac
6788
	    ;;
6789
          RCC*)
6790
	    # Rational C++ 2.4.1
6791
	    # FIXME: insert proper C++ library support
6792
	    _LT_TAGVAR(ld_shlibs, $1)=no
6793
	    ;;
6794
          cxx*)
6795
	    case $host in
6796
	      osf3*)
6797
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6798
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6799
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6800
		;;
6801
	      *)
6802
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6803
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6804
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6805
	          echo "-hidden">> $lib.exp~
6806
	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6807
	          $RM $lib.exp'
6808
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6809
		;;
6810
	    esac
6811
6812
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6813
6814
	    # Commands to make compiler produce verbose output that lists
6815
	    # what "hidden" libraries, object files and flags are used when
6816
	    # linking a shared library.
6817
	    #
6818
	    # There doesn't appear to be a way to prevent this compiler from
6819
	    # explicitly linking system object files so we need to strip them
6820
	    # from the output so that they don't get included in the library
6821
	    # dependencies.
6822
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6823
	    ;;
6824
	  *)
6825
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6826
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6827
	      case $host in
6828
	        osf3*)
6829
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6830
		  ;;
6831
	        *)
6832
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6833
		  ;;
6834
	      esac
6835
6836
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6837
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6838
6839
	      # Commands to make compiler produce verbose output that lists
6840
	      # what "hidden" libraries, object files and flags are used when
6841
	      # linking a shared library.
6842
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6843
6844
	    else
6845
	      # FIXME: insert proper C++ library support
6846
	      _LT_TAGVAR(ld_shlibs, $1)=no
6847
	    fi
6848
	    ;;
6849
        esac
6850
        ;;
6851
6852
      psos*)
6853
        # FIXME: insert proper C++ library support
6854
        _LT_TAGVAR(ld_shlibs, $1)=no
6855
        ;;
6856
6857
      sunos4*)
6858
        case $cc_basename in
6859
          CC*)
6860
	    # Sun C++ 4.x
6861
	    # FIXME: insert proper C++ library support
6862
	    _LT_TAGVAR(ld_shlibs, $1)=no
6863
	    ;;
6864
          lcc*)
6865
	    # Lucid
6866
	    # FIXME: insert proper C++ library support
6867
	    _LT_TAGVAR(ld_shlibs, $1)=no
6868
	    ;;
6869
          *)
6870
	    # FIXME: insert proper C++ library support
6871
	    _LT_TAGVAR(ld_shlibs, $1)=no
6872
	    ;;
6873
        esac
6874
        ;;
6875
6876
      solaris*)
6877
        case $cc_basename in
6878
          CC*)
6879
	    # Sun C++ 4.2, 5.x and Centerline C++
6880
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6881
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6882
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6883
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6884
	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6885
6886
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6887
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6888
	    case $host_os in
6889
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6890
	      *)
6891
		# The compiler driver will combine and reorder linker options,
6892
		# but understands `-z linker_flag'.
6893
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6894
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6895
	        ;;
6896
	    esac
6897
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6898
6899
	    output_verbose_link_cmd='echo'
6900
6901
	    # Archives containing C++ object files must be created using
6902
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6903
	    # necessary to make sure instantiated templates are included
6904
	    # in the archive.
6905
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6906
	    ;;
6907
          gcx*)
6908
	    # Green Hills C++ Compiler
6909
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6910
6911
	    # The C++ compiler must be used to create the archive.
6912
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6913
	    ;;
6914
          *)
6915
	    # GNU C++ compiler with Solaris linker
6916
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6917
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6918
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6919
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6920
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6921
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6922
6923
	        # Commands to make compiler produce verbose output that lists
6924
	        # what "hidden" libraries, object files and flags are used when
6925
	        # linking a shared library.
6926
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6927
	      else
6928
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6929
	        # platform.
6930
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6931
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6932
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6933
6934
	        # Commands to make compiler produce verbose output that lists
6935
	        # what "hidden" libraries, object files and flags are used when
6936
	        # linking a shared library.
6937
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6938
	      fi
6939
6940
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6941
	      case $host_os in
6942
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6943
		*)
6944
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6945
		  ;;
6946
	      esac
6947
	    fi
6948
	    ;;
6949
        esac
6950
        ;;
6951
6952
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6953
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6954
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6955
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6956
      runpath_var='LD_RUN_PATH'
6957
6958
      case $cc_basename in
6959
        CC*)
6960
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6961
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6962
	  ;;
6963
	*)
6964
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6965
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6966
	  ;;
6967
      esac
6968
      ;;
6969
6970
      sysv5* | sco3.2v5* | sco5v6*)
6971
	# Note: We can NOT use -z defs as we might desire, because we do not
6972
	# link with -lc, and that would cause any symbols used from libc to
6973
	# always be unresolved, which means just about no library would
6974
	# ever link correctly.  If we're not using GNU ld we use -z text
6975
	# though, which does catch some bad symbols but isn't as heavy-handed
6976
	# as -z defs.
6977
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6978
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6979
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6980
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6981
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6982
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6983
	_LT_TAGVAR(link_all_deplibs, $1)=yes
6984
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6985
	runpath_var='LD_RUN_PATH'
6986
6987
	case $cc_basename in
6988
          CC*)
6989
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6990
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6991
	    ;;
6992
	  *)
6993
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6994
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6995
	    ;;
6996
	esac
6997
      ;;
6998
6999
      tandem*)
7000
        case $cc_basename in
7001
          NCC*)
7002
	    # NonStop-UX NCC 3.20
7003
	    # FIXME: insert proper C++ library support
7004
	    _LT_TAGVAR(ld_shlibs, $1)=no
7005
	    ;;
7006
          *)
7007
	    # FIXME: insert proper C++ library support
7008
	    _LT_TAGVAR(ld_shlibs, $1)=no
7009
	    ;;
7010
        esac
7011
        ;;
7012
7013
      vxworks*)
7014
        # FIXME: insert proper C++ library support
7015
        _LT_TAGVAR(ld_shlibs, $1)=no
7016
        ;;
7017
7018
      *)
7019
        # FIXME: insert proper C++ library support
7020
        _LT_TAGVAR(ld_shlibs, $1)=no
7021
        ;;
7022
    esac
7023
7024
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7025
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7026
7027
    _LT_TAGVAR(GCC, $1)="$GXX"
7028
    _LT_TAGVAR(LD, $1)="$LD"
7029
7030
    ## CAVEAT EMPTOR:
7031
    ## There is no encapsulation within the following macros, do not change
7032
    ## the running order or otherwise move them around unless you know exactly
7033
    ## what you are doing...
7034
    _LT_SYS_HIDDEN_LIBDEPS($1)
7035
    _LT_COMPILER_PIC($1)
7036
    _LT_COMPILER_C_O($1)
7037
    _LT_COMPILER_FILE_LOCKS($1)
7038
    _LT_LINKER_SHLIBS($1)
7039
    _LT_SYS_DYNAMIC_LINKER($1)
7040
    _LT_LINKER_HARDCODE_LIBPATH($1)
7041
7042
    _LT_CONFIG($1)
7043
  fi # test -n "$compiler"
7044
7045
  CC=$lt_save_CC
7046
  LDCXX=$LD
7047
  LD=$lt_save_LD
7048
  GCC=$lt_save_GCC
7049
  with_gnu_ld=$lt_save_with_gnu_ld
7050
  lt_cv_path_LDCXX=$lt_cv_path_LD
7051
  lt_cv_path_LD=$lt_save_path_LD
7052
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7053
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7054
fi # test "$_lt_caught_CXX_error" != yes
7055
7056
AC_LANG_POP
7057
])# _LT_LANG_CXX_CONFIG
7058
7059
7060
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7061
# ---------------------------------
7062
# Figure out "hidden" library dependencies from verbose
7063
# compiler output when linking a shared library.
7064
# Parse the compiler output and extract the necessary
7065
# objects, libraries and library flags.
7066
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7067
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7068
# Dependencies to place before and after the object being linked:
7069
_LT_TAGVAR(predep_objects, $1)=
7070
_LT_TAGVAR(postdep_objects, $1)=
7071
_LT_TAGVAR(predeps, $1)=
7072
_LT_TAGVAR(postdeps, $1)=
7073
_LT_TAGVAR(compiler_lib_search_path, $1)=
7074
7075
dnl we can't use the lt_simple_compile_test_code here,
7076
dnl because it contains code intended for an executable,
7077
dnl not a library.  It's possible we should let each
7078
dnl tag define a new lt_????_link_test_code variable,
7079
dnl but it's only used here...
7080
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7081
int a;
7082
void foo (void) { a = 0; }
7083
_LT_EOF
7084
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7085
class Foo
7086
{
7087
public:
7088
  Foo (void) { a = 0; }
7089
private:
7090
  int a;
7091
};
7092
_LT_EOF
7093
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7094
      subroutine foo
7095
      implicit none
7096
      integer*4 a
7097
      a=0
7098
      return
7099
      end
7100
_LT_EOF
7101
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7102
      subroutine foo
7103
      implicit none
7104
      integer a
7105
      a=0
7106
      return
7107
      end
7108
_LT_EOF
7109
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7110
public class foo {
7111
  private int a;
7112
  public void bar (void) {
7113
    a = 0;
7114
  }
7115
};
7116
_LT_EOF
7117
])
7118
dnl Parse the compiler output and extract the necessary
7119
dnl objects, libraries and library flags.
7120
if AC_TRY_EVAL(ac_compile); then
7121
  # Parse the compiler output and extract the necessary
7122
  # objects, libraries and library flags.
7123
7124
  # Sentinel used to keep track of whether or not we are before
7125
  # the conftest object file.
7126
  pre_test_object_deps_done=no
7127
7128
  for p in `eval "$output_verbose_link_cmd"`; do
7129
    case $p in
7130
7131
    -L* | -R* | -l*)
7132
       # Some compilers place space between "-{L,R}" and the path.
7133
       # Remove the space.
7134
       if test $p = "-L" ||
7135
          test $p = "-R"; then
7136
	 prev=$p
7137
	 continue
7138
       else
7139
	 prev=
7140
       fi
7141
7142
       if test "$pre_test_object_deps_done" = no; then
7143
	 case $p in
7144
	 -L* | -R*)
7145
	   # Internal compiler library paths should come after those
7146
	   # provided the user.  The postdeps already come after the
7147
	   # user supplied libs so there is no need to process them.
7148
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7149
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7150
	   else
7151
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7152
	   fi
7153
	   ;;
7154
	 # The "-l" case would never come before the object being
7155
	 # linked, so don't bother handling this case.
7156
	 esac
7157
       else
7158
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7159
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7160
	 else
7161
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7162
	 fi
7163
       fi
7164
       ;;
7165
7166
    *.$objext)
7167
       # This assumes that the test object file only shows up
7168
       # once in the compiler output.
7169
       if test "$p" = "conftest.$objext"; then
7170
	 pre_test_object_deps_done=yes
7171
	 continue
7172
       fi
7173
7174
       if test "$pre_test_object_deps_done" = no; then
7175
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7176
	   _LT_TAGVAR(predep_objects, $1)="$p"
7177
	 else
7178
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7179
	 fi
7180
       else
7181
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7182
	   _LT_TAGVAR(postdep_objects, $1)="$p"
7183
	 else
7184
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7185
	 fi
7186
       fi
7187
       ;;
7188
7189
    *) ;; # Ignore the rest.
7190
7191
    esac
7192
  done
7193
7194
  # Clean up.
7195
  rm -f a.out a.exe
7196
else
7197
  echo "libtool.m4: error: problem compiling $1 test program"
7198
fi
7199
7200
$RM -f confest.$objext
7201
7202
# PORTME: override above test on systems where it is broken
7203
m4_if([$1], [CXX],
7204
[case $host_os in
7205
interix[[3-9]]*)
7206
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7207
  # hack all around it, let's just trust "g++" to DTRT.
7208
  _LT_TAGVAR(predep_objects,$1)=
7209
  _LT_TAGVAR(postdep_objects,$1)=
7210
  _LT_TAGVAR(postdeps,$1)=
7211
  ;;
7212
7213
linux*)
7214
  case `$CC -V 2>&1 | sed 5q` in
7215
  *Sun\ C*)
7216
    # Sun C++ 5.9
7217
7218
    # The more standards-conforming stlport4 library is
7219
    # incompatible with the Cstd library. Avoid specifying
7220
    # it if it's in CXXFLAGS. Ignore libCrun as
7221
    # -library=stlport4 depends on it.
7222
    case " $CXX $CXXFLAGS " in
7223
    *" -library=stlport4 "*)
7224
      solaris_use_stlport4=yes
7225
      ;;
7226
    esac
7227
7228
    if test "$solaris_use_stlport4" != yes; then
7229
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7230
    fi
7231
    ;;
7232
  esac
7233
  ;;
7234
7235
solaris*)
7236
  case $cc_basename in
7237
  CC*)
7238
    # The more standards-conforming stlport4 library is
7239
    # incompatible with the Cstd library. Avoid specifying
7240
    # it if it's in CXXFLAGS. Ignore libCrun as
7241
    # -library=stlport4 depends on it.
7242
    case " $CXX $CXXFLAGS " in
7243
    *" -library=stlport4 "*)
7244
      solaris_use_stlport4=yes
7245
      ;;
7246
    esac
7247
7248
    # Adding this requires a known-good setup of shared libraries for
7249
    # Sun compiler versions before 5.6, else PIC objects from an old
7250
    # archive will be linked into the output, leading to subtle bugs.
7251
    if test "$solaris_use_stlport4" != yes; then
7252
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7253
    fi
7254
    ;;
7255
  esac
7256
  ;;
7257
esac
7258
])
7259
7260
case " $_LT_TAGVAR(postdeps, $1) " in
7261
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7262
esac
7263
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7264
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7265
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7266
fi
7267
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7268
    [The directories searched by this compiler when creating a shared library])
7269
_LT_TAGDECL([], [predep_objects], [1],
7270
    [Dependencies to place before and after the objects being linked to
7271
    create a shared library])
7272
_LT_TAGDECL([], [postdep_objects], [1])
7273
_LT_TAGDECL([], [predeps], [1])
7274
_LT_TAGDECL([], [postdeps], [1])
7275
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7276
    [The library search path used internally by the compiler when linking
7277
    a shared library])
7278
])# _LT_SYS_HIDDEN_LIBDEPS
7279
7280
7281
# _LT_PROG_F77
7282
# ------------
7283
# Since AC_PROG_F77 is broken, in that it returns the empty string
7284
# if there is no fortran compiler, we have our own version here.
7285
m4_defun([_LT_PROG_F77],
7286
[
7287
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7288
AC_PROG_F77
7289
if test -z "$F77" || test "X$F77" = "Xno"; then
7290
  _lt_disable_F77=yes
7291
fi
7292
popdef([AC_MSG_ERROR])
7293
])# _LT_PROG_F77
7294
7295
dnl aclocal-1.4 backwards compatibility:
7296
dnl AC_DEFUN([_LT_PROG_F77], [])
7297
7298
7299
# _LT_LANG_F77_CONFIG([TAG])
7300
# --------------------------
7301
# Ensure that the configuration variables for a Fortran 77 compiler are
7302
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7303
# to write the compiler configuration to `libtool'.
7304
m4_defun([_LT_LANG_F77_CONFIG],
7305
[AC_REQUIRE([_LT_PROG_F77])dnl
7306
AC_LANG_PUSH(Fortran 77)
7307
7308
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7309
_LT_TAGVAR(allow_undefined_flag, $1)=
7310
_LT_TAGVAR(always_export_symbols, $1)=no
7311
_LT_TAGVAR(archive_expsym_cmds, $1)=
7312
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7313
_LT_TAGVAR(hardcode_direct, $1)=no
7314
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7315
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7316
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7317
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7318
_LT_TAGVAR(hardcode_minus_L, $1)=no
7319
_LT_TAGVAR(hardcode_automatic, $1)=no
7320
_LT_TAGVAR(inherit_rpath, $1)=no
7321
_LT_TAGVAR(module_cmds, $1)=
7322
_LT_TAGVAR(module_expsym_cmds, $1)=
7323
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7324
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7325
_LT_TAGVAR(no_undefined_flag, $1)=
7326
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7327
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7328
7329
# Source file extension for f77 test sources.
7330
ac_ext=f
7331
7332
# Object file extension for compiled f77 test sources.
7333
objext=o
7334
_LT_TAGVAR(objext, $1)=$objext
7335
7336
# No sense in running all these tests if we already determined that
7337
# the F77 compiler isn't working.  Some variables (like enable_shared)
7338
# are currently assumed to apply to all compilers on this platform,
7339
# and will be corrupted by setting them based on a non-working compiler.
7340
if test "$_lt_disable_F77" != yes; then
7341
  # Code to be used in simple compile tests
7342
  lt_simple_compile_test_code="\
7343
      subroutine t
7344
      return
7345
      end
7346
"
7347
7348
  # Code to be used in simple link tests
7349
  lt_simple_link_test_code="\
7350
      program t
7351
      end
7352
"
7353
7354
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7355
  _LT_TAG_COMPILER
7356
7357
  # save warnings/boilerplate of simple test code
7358
  _LT_COMPILER_BOILERPLATE
7359
  _LT_LINKER_BOILERPLATE
7360
7361
  # Allow CC to be a program name with arguments.
7362
  lt_save_CC="$CC"
7363
  lt_save_GCC=$GCC
7364
  CC=${F77-"f77"}
7365
  compiler=$CC
7366
  _LT_TAGVAR(compiler, $1)=$CC
7367
  _LT_CC_BASENAME([$compiler])
7368
  GCC=$G77
7369
  if test -n "$compiler"; then
7370
    AC_MSG_CHECKING([if libtool supports shared libraries])
7371
    AC_MSG_RESULT([$can_build_shared])
7372
7373
    AC_MSG_CHECKING([whether to build shared libraries])
7374
    test "$can_build_shared" = "no" && enable_shared=no
7375
7376
    # On AIX, shared libraries and static libraries use the same namespace, and
7377
    # are all built from PIC.
7378
    case $host_os in
7379
      aix3*)
7380
        test "$enable_shared" = yes && enable_static=no
7381
        if test -n "$RANLIB"; then
7382
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7383
          postinstall_cmds='$RANLIB $lib'
7384
        fi
7385
        ;;
7386
      aix[[4-9]]*)
7387
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7388
	  test "$enable_shared" = yes && enable_static=no
7389
	fi
7390
        ;;
7391
    esac
7392
    AC_MSG_RESULT([$enable_shared])
7393
7394
    AC_MSG_CHECKING([whether to build static libraries])
7395
    # Make sure either enable_shared or enable_static is yes.
7396
    test "$enable_shared" = yes || enable_static=yes
7397
    AC_MSG_RESULT([$enable_static])
7398
7399
    _LT_TAGVAR(GCC, $1)="$G77"
7400
    _LT_TAGVAR(LD, $1)="$LD"
7401
7402
    ## CAVEAT EMPTOR:
7403
    ## There is no encapsulation within the following macros, do not change
7404
    ## the running order or otherwise move them around unless you know exactly
7405
    ## what you are doing...
7406
    _LT_COMPILER_PIC($1)
7407
    _LT_COMPILER_C_O($1)
7408
    _LT_COMPILER_FILE_LOCKS($1)
7409
    _LT_LINKER_SHLIBS($1)
7410
    _LT_SYS_DYNAMIC_LINKER($1)
7411
    _LT_LINKER_HARDCODE_LIBPATH($1)
7412
7413
    _LT_CONFIG($1)
7414
  fi # test -n "$compiler"
7415
7416
  GCC=$lt_save_GCC
7417
  CC="$lt_save_CC"
7418
fi # test "$_lt_disable_F77" != yes
7419
7420
AC_LANG_POP
7421
])# _LT_LANG_F77_CONFIG
7422
7423
7424
# _LT_PROG_FC
7425
# -----------
7426
# Since AC_PROG_FC is broken, in that it returns the empty string
7427
# if there is no fortran compiler, we have our own version here.
7428
m4_defun([_LT_PROG_FC],
7429
[
7430
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7431
AC_PROG_FC
7432
if test -z "$FC" || test "X$FC" = "Xno"; then
7433
  _lt_disable_FC=yes
7434
fi
7435
popdef([AC_MSG_ERROR])
7436
])# _LT_PROG_FC
7437
7438
dnl aclocal-1.4 backwards compatibility:
7439
dnl AC_DEFUN([_LT_PROG_FC], [])
7440
7441
7442
# _LT_LANG_FC_CONFIG([TAG])
7443
# -------------------------
7444
# Ensure that the configuration variables for a Fortran compiler are
7445
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7446
# to write the compiler configuration to `libtool'.
7447
m4_defun([_LT_LANG_FC_CONFIG],
7448
[AC_REQUIRE([_LT_PROG_FC])dnl
7449
AC_LANG_PUSH(Fortran)
7450
7451
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7452
_LT_TAGVAR(allow_undefined_flag, $1)=
7453
_LT_TAGVAR(always_export_symbols, $1)=no
7454
_LT_TAGVAR(archive_expsym_cmds, $1)=
7455
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7456
_LT_TAGVAR(hardcode_direct, $1)=no
7457
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7458
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7459
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7460
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7461
_LT_TAGVAR(hardcode_minus_L, $1)=no
7462
_LT_TAGVAR(hardcode_automatic, $1)=no
7463
_LT_TAGVAR(inherit_rpath, $1)=no
7464
_LT_TAGVAR(module_cmds, $1)=
7465
_LT_TAGVAR(module_expsym_cmds, $1)=
7466
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7467
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7468
_LT_TAGVAR(no_undefined_flag, $1)=
7469
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7470
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7471
7472
# Source file extension for fc test sources.
7473
ac_ext=${ac_fc_srcext-f}
7474
7475
# Object file extension for compiled fc test sources.
7476
objext=o
7477
_LT_TAGVAR(objext, $1)=$objext
7478
7479
# No sense in running all these tests if we already determined that
7480
# the FC compiler isn't working.  Some variables (like enable_shared)
7481
# are currently assumed to apply to all compilers on this platform,
7482
# and will be corrupted by setting them based on a non-working compiler.
7483
if test "$_lt_disable_FC" != yes; then
7484
  # Code to be used in simple compile tests
7485
  lt_simple_compile_test_code="\
7486
      subroutine t
7487
      return
7488
      end
7489
"
7490
7491
  # Code to be used in simple link tests
7492
  lt_simple_link_test_code="\
7493
      program t
7494
      end
7495
"
7496
7497
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7498
  _LT_TAG_COMPILER
7499
7500
  # save warnings/boilerplate of simple test code
7501
  _LT_COMPILER_BOILERPLATE
7502
  _LT_LINKER_BOILERPLATE
7503
7504
  # Allow CC to be a program name with arguments.
7505
  lt_save_CC="$CC"
7506
  lt_save_GCC=$GCC
7507
  CC=${FC-"f95"}
7508
  compiler=$CC
7509
  GCC=$ac_cv_fc_compiler_gnu
7510
7511
  _LT_TAGVAR(compiler, $1)=$CC
7512
  _LT_CC_BASENAME([$compiler])
7513
7514
  if test -n "$compiler"; then
7515
    AC_MSG_CHECKING([if libtool supports shared libraries])
7516
    AC_MSG_RESULT([$can_build_shared])
7517
7518
    AC_MSG_CHECKING([whether to build shared libraries])
7519
    test "$can_build_shared" = "no" && enable_shared=no
7520
7521
    # On AIX, shared libraries and static libraries use the same namespace, and
7522
    # are all built from PIC.
7523
    case $host_os in
7524
      aix3*)
7525
        test "$enable_shared" = yes && enable_static=no
7526
        if test -n "$RANLIB"; then
7527
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7528
          postinstall_cmds='$RANLIB $lib'
7529
        fi
7530
        ;;
7531
      aix[[4-9]]*)
7532
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7533
	  test "$enable_shared" = yes && enable_static=no
7534
	fi
7535
        ;;
7536
    esac
7537
    AC_MSG_RESULT([$enable_shared])
7538
7539
    AC_MSG_CHECKING([whether to build static libraries])
7540
    # Make sure either enable_shared or enable_static is yes.
7541
    test "$enable_shared" = yes || enable_static=yes
7542
    AC_MSG_RESULT([$enable_static])
7543
7544
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7545
    _LT_TAGVAR(LD, $1)="$LD"
7546
7547
    ## CAVEAT EMPTOR:
7548
    ## There is no encapsulation within the following macros, do not change
7549
    ## the running order or otherwise move them around unless you know exactly
7550
    ## what you are doing...
7551
    _LT_SYS_HIDDEN_LIBDEPS($1)
7552
    _LT_COMPILER_PIC($1)
7553
    _LT_COMPILER_C_O($1)
7554
    _LT_COMPILER_FILE_LOCKS($1)
7555
    _LT_LINKER_SHLIBS($1)
7556
    _LT_SYS_DYNAMIC_LINKER($1)
7557
    _LT_LINKER_HARDCODE_LIBPATH($1)
7558
7559
    _LT_CONFIG($1)
7560
  fi # test -n "$compiler"
7561
7562
  GCC=$lt_save_GCC
7563
  CC="$lt_save_CC"
7564
fi # test "$_lt_disable_FC" != yes
7565
7566
AC_LANG_POP
7567
])# _LT_LANG_FC_CONFIG
7568
7569
7570
# _LT_LANG_GCJ_CONFIG([TAG])
7571
# --------------------------
7572
# Ensure that the configuration variables for the GNU Java Compiler compiler
7573
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7574
# to write the compiler configuration to `libtool'.
7575
m4_defun([_LT_LANG_GCJ_CONFIG],
7576
[AC_REQUIRE([LT_PROG_GCJ])dnl
7577
AC_LANG_SAVE
7578
7579
# Source file extension for Java test sources.
7580
ac_ext=java
7581
7582
# Object file extension for compiled Java test sources.
7583
objext=o
7584
_LT_TAGVAR(objext, $1)=$objext
7585
7586
# Code to be used in simple compile tests
7587
lt_simple_compile_test_code="class foo {}"
7588
7589
# Code to be used in simple link tests
7590
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7591
7592
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7593
_LT_TAG_COMPILER
7594
7595
# save warnings/boilerplate of simple test code
7596
_LT_COMPILER_BOILERPLATE
7597
_LT_LINKER_BOILERPLATE
7598
7599
# Allow CC to be a program name with arguments.
7600
lt_save_CC="$CC"
7601
lt_save_GCC=$GCC
7602
GCC=yes
7603
CC=${GCJ-"gcj"}
7604
compiler=$CC
7605
_LT_TAGVAR(compiler, $1)=$CC
7606
_LT_TAGVAR(LD, $1)="$LD"
7607
_LT_CC_BASENAME([$compiler])
7608
7609
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7610
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7611
7612
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7613
7614
if test -n "$compiler"; then
7615
  _LT_COMPILER_NO_RTTI($1)
7616
  _LT_COMPILER_PIC($1)
7617
  _LT_COMPILER_C_O($1)
7618
  _LT_COMPILER_FILE_LOCKS($1)
7619
  _LT_LINKER_SHLIBS($1)
7620
  _LT_LINKER_HARDCODE_LIBPATH($1)
7621
7622
  _LT_CONFIG($1)
7623
fi
7624
7625
AC_LANG_RESTORE
7626
7627
GCC=$lt_save_GCC
7628
CC="$lt_save_CC"
7629
])# _LT_LANG_GCJ_CONFIG
7630
7631
7632
# _LT_LANG_RC_CONFIG([TAG])
7633
# -------------------------
7634
# Ensure that the configuration variables for the Windows resource compiler
7635
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7636
# to write the compiler configuration to `libtool'.
7637
m4_defun([_LT_LANG_RC_CONFIG],
7638
[AC_REQUIRE([LT_PROG_RC])dnl
7639
AC_LANG_SAVE
7640
7641
# Source file extension for RC test sources.
7642
ac_ext=rc
7643
7644
# Object file extension for compiled RC test sources.
7645
objext=o
7646
_LT_TAGVAR(objext, $1)=$objext
7647
7648
# Code to be used in simple compile tests
7649
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7650
7651
# Code to be used in simple link tests
7652
lt_simple_link_test_code="$lt_simple_compile_test_code"
7653
7654
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7655
_LT_TAG_COMPILER
7656
7657
# save warnings/boilerplate of simple test code
7658
_LT_COMPILER_BOILERPLATE
7659
_LT_LINKER_BOILERPLATE
7660
7661
# Allow CC to be a program name with arguments.
7662
lt_save_CC="$CC"
7663
lt_save_GCC=$GCC
7664
GCC=
7665
CC=${RC-"windres"}
7666
compiler=$CC
7667
_LT_TAGVAR(compiler, $1)=$CC
7668
_LT_CC_BASENAME([$compiler])
7669
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7670
7671
if test -n "$compiler"; then
7672
  :
7673
  _LT_CONFIG($1)
7674
fi
7675
7676
GCC=$lt_save_GCC
7677
AC_LANG_RESTORE
7678
CC="$lt_save_CC"
7679
])# _LT_LANG_RC_CONFIG
7680
7681
7682
# LT_PROG_GCJ
7683
# -----------
7684
AC_DEFUN([LT_PROG_GCJ],
7685
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7686
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7687
    [AC_CHECK_TOOL(GCJ, gcj,)
7688
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7689
      AC_SUBST(GCJFLAGS)])])[]dnl
7690
])
7691
7692
# Old name:
7693
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7694
dnl aclocal-1.4 backwards compatibility:
7695
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7696
7697
7698
# LT_PROG_RC
7699
# ----------
7700
AC_DEFUN([LT_PROG_RC],
7701
[AC_CHECK_TOOL(RC, windres,)
7702
])
7703
7704
# Old name:
7705
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7706
dnl aclocal-1.4 backwards compatibility:
7707
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7708
7709
7710
# _LT_DECL_EGREP
7711
# --------------
7712
# If we don't have a new enough Autoconf to choose the best grep
7713
# available, choose the one first in the user's PATH.
7714
m4_defun([_LT_DECL_EGREP],
7715
[AC_REQUIRE([AC_PROG_EGREP])dnl
7716
AC_REQUIRE([AC_PROG_FGREP])dnl
7717
test -z "$GREP" && GREP=grep
7718
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7719
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7720
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7721
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7722
AC_SUBST([GREP])
7723
])
7724
7725
7726
# _LT_DECL_OBJDUMP
7727
# --------------
7728
# If we don't have a new enough Autoconf to choose the best objdump
7729
# available, choose the one first in the user's PATH.
7730
m4_defun([_LT_DECL_OBJDUMP],
7731
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7732
test -z "$OBJDUMP" && OBJDUMP=objdump
7733
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7734
AC_SUBST([OBJDUMP])
7735
])
7736
7737
7738
# _LT_DECL_SED
7739
# ------------
7740
# Check for a fully-functional sed program, that truncates
7741
# as few characters as possible.  Prefer GNU sed if found.
7742
m4_defun([_LT_DECL_SED],
7743
[AC_PROG_SED
7744
test -z "$SED" && SED=sed
7745
Xsed="$SED -e 1s/^X//"
7746
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7747
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7748
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7749
])# _LT_DECL_SED
7750
7751
m4_ifndef([AC_PROG_SED], [
7752
# NOTE: This macro has been submitted for inclusion into   #
7753
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7754
#  a released version of Autoconf we should remove this    #
7755
#  macro and use it instead.                               #
7756
7757
m4_defun([AC_PROG_SED],
7758
[AC_MSG_CHECKING([for a sed that does not truncate output])
7759
AC_CACHE_VAL(lt_cv_path_SED,
7760
[# Loop through the user's path and test for sed and gsed.
7761
# Then use that list of sed's as ones to test for truncation.
7762
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7763
for as_dir in $PATH
7764
do
7765
  IFS=$as_save_IFS
7766
  test -z "$as_dir" && as_dir=.
7767
  for lt_ac_prog in sed gsed; do
7768
    for ac_exec_ext in '' $ac_executable_extensions; do
7769
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7770
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7771
      fi
7772
    done
7773
  done
7774
done
7775
IFS=$as_save_IFS
7776
lt_ac_max=0
7777
lt_ac_count=0
7778
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7779
# along with /bin/sed that truncates output.
7780
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7781
  test ! -f $lt_ac_sed && continue
7782
  cat /dev/null > conftest.in
7783
  lt_ac_count=0
7784
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7785
  # Check for GNU sed and select it if it is found.
7786
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7787
    lt_cv_path_SED=$lt_ac_sed
7788
    break
7789
  fi
7790
  while true; do
7791
    cat conftest.in conftest.in >conftest.tmp
7792
    mv conftest.tmp conftest.in
7793
    cp conftest.in conftest.nl
7794
    echo >>conftest.nl
7795
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7796
    cmp -s conftest.out conftest.nl || break
7797
    # 10000 chars as input seems more than enough
7798
    test $lt_ac_count -gt 10 && break
7799
    lt_ac_count=`expr $lt_ac_count + 1`
7800
    if test $lt_ac_count -gt $lt_ac_max; then
7801
      lt_ac_max=$lt_ac_count
7802
      lt_cv_path_SED=$lt_ac_sed
7803
    fi
7804
  done
7805
done
7806
])
7807
SED=$lt_cv_path_SED
7808
AC_SUBST([SED])
7809
AC_MSG_RESULT([$SED])
7810
])#AC_PROG_SED
7811
])#m4_ifndef
7812
7813
# Old name:
7814
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7815
dnl aclocal-1.4 backwards compatibility:
7816
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7817
7818
7819
# _LT_CHECK_SHELL_FEATURES
7820
# ------------------------
7821
# Find out whether the shell is Bourne or XSI compatible,
7822
# or has some other useful features.
7823
m4_defun([_LT_CHECK_SHELL_FEATURES],
7824
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7825
# Try some XSI features
7826
xsi_shell=no
7827
( _lt_dummy="a/b/c"
7828
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7829
      = c,a/b,, \
7830
    && eval 'test $(( 1 + 1 )) -eq 2 \
7831
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7832
  && xsi_shell=yes
7833
AC_MSG_RESULT([$xsi_shell])
7834
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7835
7836
AC_MSG_CHECKING([whether the shell understands "+="])
7837
lt_shell_append=no
7838
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7839
    >/dev/null 2>&1 \
7840
  && lt_shell_append=yes
7841
AC_MSG_RESULT([$lt_shell_append])
7842
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7843
7844
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7845
  lt_unset=unset
7846
else
7847
  lt_unset=false
7848
fi
7849
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7850
7851
# test EBCDIC or ASCII
7852
case `echo X|tr X '\101'` in
7853
 A) # ASCII based system
7854
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7855
  lt_SP2NL='tr \040 \012'
7856
  lt_NL2SP='tr \015\012 \040\040'
7857
  ;;
7858
 *) # EBCDIC based system
7859
  lt_SP2NL='tr \100 \n'
7860
  lt_NL2SP='tr \r\n \100\100'
7861
  ;;
7862
esac
7863
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7864
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7865
])# _LT_CHECK_SHELL_FEATURES
7866
7867
7868
# _LT_PROG_XSI_SHELLFNS
7869
# ---------------------
7870
# Bourne and XSI compatible variants of some useful shell functions.
7871
m4_defun([_LT_PROG_XSI_SHELLFNS],
7872
[case $xsi_shell in
7873
  yes)
7874
    cat << \_LT_EOF >> "$cfgfile"
7875
7876
# func_dirname file append nondir_replacement
7877
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7878
# otherwise set result to NONDIR_REPLACEMENT.
7879
func_dirname ()
7880
{
7881
  case ${1} in
7882
    */*) func_dirname_result="${1%/*}${2}" ;;
7883
    *  ) func_dirname_result="${3}" ;;
7884
  esac
7885
}
7886
7887
# func_basename file
7888
func_basename ()
7889
{
7890
  func_basename_result="${1##*/}"
7891
}
7892
7893
# func_dirname_and_basename file append nondir_replacement
7894
# perform func_basename and func_dirname in a single function
7895
# call:
7896
#   dirname:  Compute the dirname of FILE.  If nonempty,
7897
#             add APPEND to the result, otherwise set result
7898
#             to NONDIR_REPLACEMENT.
7899
#             value returned in "$func_dirname_result"
7900
#   basename: Compute filename of FILE.
7901
#             value retuned in "$func_basename_result"
7902
# Implementation must be kept synchronized with func_dirname
7903
# and func_basename. For efficiency, we do not delegate to
7904
# those functions but instead duplicate the functionality here.
7905
func_dirname_and_basename ()
7906
{
7907
  case ${1} in
7908
    */*) func_dirname_result="${1%/*}${2}" ;;
7909
    *  ) func_dirname_result="${3}" ;;
7910
  esac
7911
  func_basename_result="${1##*/}"
7912
}
7913
7914
# func_stripname prefix suffix name
7915
# strip PREFIX and SUFFIX off of NAME.
7916
# PREFIX and SUFFIX must not contain globbing or regex special
7917
# characters, hashes, percent signs, but SUFFIX may contain a leading
7918
# dot (in which case that matches only a dot).
7919
func_stripname ()
7920
{
7921
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7922
  # positional parameters, so assign one to ordinary parameter first.
7923
  func_stripname_result=${3}
7924
  func_stripname_result=${func_stripname_result#"${1}"}
7925
  func_stripname_result=${func_stripname_result%"${2}"}
7926
}
7927
7928
# func_opt_split
7929
func_opt_split ()
7930
{
7931
  func_opt_split_opt=${1%%=*}
7932
  func_opt_split_arg=${1#*=}
7933
}
7934
7935
# func_lo2o object
7936
func_lo2o ()
7937
{
7938
  case ${1} in
7939
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7940
    *)    func_lo2o_result=${1} ;;
7941
  esac
7942
}
7943
7944
# func_xform libobj-or-source
7945
func_xform ()
7946
{
7947
  func_xform_result=${1%.*}.lo
7948
}
7949
7950
# func_arith arithmetic-term...
7951
func_arith ()
7952
{
7953
  func_arith_result=$(( $[*] ))
7954
}
7955
7956
# func_len string
7957
# STRING may not start with a hyphen.
7958
func_len ()
7959
{
7960
  func_len_result=${#1}
7961
}
7962
7963
_LT_EOF
7964
    ;;
7965
  *) # Bourne compatible functions.
7966
    cat << \_LT_EOF >> "$cfgfile"
7967
7968
# func_dirname file append nondir_replacement
7969
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7970
# otherwise set result to NONDIR_REPLACEMENT.
7971
func_dirname ()
7972
{
7973
  # Extract subdirectory from the argument.
7974
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7975
  if test "X$func_dirname_result" = "X${1}"; then
7976
    func_dirname_result="${3}"
7977
  else
7978
    func_dirname_result="$func_dirname_result${2}"
7979
  fi
7980
}
7981
7982
# func_basename file
7983
func_basename ()
7984
{
7985
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7986
}
7987
7988
dnl func_dirname_and_basename
7989
dnl A portable version of this function is already defined in general.m4sh
7990
dnl so there is no need for it here.
7991
7992
# func_stripname prefix suffix name
7993
# strip PREFIX and SUFFIX off of NAME.
7994
# PREFIX and SUFFIX must not contain globbing or regex special
7995
# characters, hashes, percent signs, but SUFFIX may contain a leading
7996
# dot (in which case that matches only a dot).
7997
# func_strip_suffix prefix name
7998
func_stripname ()
7999
{
8000
  case ${2} in
8001
    .*) func_stripname_result=`$ECHO "X${3}" \
8002
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8003
    *)  func_stripname_result=`$ECHO "X${3}" \
8004
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8005
  esac
8006
}
8007
8008
# sed scripts:
8009
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8010
my_sed_long_arg='1s/^-[[^=]]*=//'
8011
8012
# func_opt_split
8013
func_opt_split ()
8014
{
8015
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8016
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8017
}
8018
8019
# func_lo2o object
8020
func_lo2o ()
8021
{
8022
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8023
}
8024
8025
# func_xform libobj-or-source
8026
func_xform ()
8027
{
8028
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8029
}
8030
8031
# func_arith arithmetic-term...
8032
func_arith ()
8033
{
8034
  func_arith_result=`expr "$[@]"`
8035
}
8036
8037
# func_len string
8038
# STRING may not start with a hyphen.
8039
func_len ()
8040
{
8041
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8042
}
8043
8044
_LT_EOF
8045
esac
8046
8047
case $lt_shell_append in
8048
  yes)
8049
    cat << \_LT_EOF >> "$cfgfile"
8050
8051
# func_append var value
8052
# Append VALUE to the end of shell variable VAR.
8053
func_append ()
8054
{
8055
  eval "$[1]+=\$[2]"
8056
}
8057
_LT_EOF
8058
    ;;
8059
  *)
8060
    cat << \_LT_EOF >> "$cfgfile"
8061
8062
# func_append var value
8063
# Append VALUE to the end of shell variable VAR.
8064
func_append ()
8065
{
8066
  eval "$[1]=\$$[1]\$[2]"
8067
}
8068
8069
_LT_EOF
8070
    ;;
8071
  esac
8072
])
8073
8074
# Helper functions for option handling.                    -*- Autoconf -*-
8075
#
8076
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8077
#   Written by Gary V. Vaughan, 2004
8078
#
8079
# This file is free software; the Free Software Foundation gives
8080
# unlimited permission to copy and/or distribute it, with or without
8081
# modifications, as long as this notice is preserved.
8082
8083
# serial 6 ltoptions.m4
8084
8085
# This is to help aclocal find these macros, as it can't see m4_define.
8086
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8087
8088
8089
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8090
# ------------------------------------------
8091
m4_define([_LT_MANGLE_OPTION],
8092
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8093
8094
8095
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8096
# ---------------------------------------
8097
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8098
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8099
# saved as a flag.
8100
m4_define([_LT_SET_OPTION],
8101
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8102
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8103
        _LT_MANGLE_DEFUN([$1], [$2]),
8104
    [m4_warning([Unknown $1 option `$2'])])[]dnl
8105
])
8106
8107
8108
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8109
# ------------------------------------------------------------
8110
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8111
m4_define([_LT_IF_OPTION],
8112
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8113
8114
8115
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8116
# -------------------------------------------------------
8117
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8118
# are set.
8119
m4_define([_LT_UNLESS_OPTIONS],
8120
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8121
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8122
		      [m4_define([$0_found])])])[]dnl
8123
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8124
])[]dnl
8125
])
8126
8127
8128
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8129
# ----------------------------------------
8130
# OPTION-LIST is a space-separated list of Libtool options associated
8131
# with MACRO-NAME.  If any OPTION has a matching handler declared with
8132
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8133
# the unknown option and exit.
8134
m4_defun([_LT_SET_OPTIONS],
8135
[# Set options
8136
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8137
    [_LT_SET_OPTION([$1], _LT_Option)])
8138
8139
m4_if([$1],[LT_INIT],[
8140
  dnl
8141
  dnl Simply set some default values (i.e off) if boolean options were not
8142
  dnl specified:
8143
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8144
  ])
8145
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8146
  ])
8147
  dnl
8148
  dnl If no reference was made to various pairs of opposing options, then
8149
  dnl we run the default mode handler for the pair.  For example, if neither
8150
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8151
  dnl archives by default:
8152
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8153
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8154
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8155
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8156
  		   [_LT_ENABLE_FAST_INSTALL])
8157
  ])
8158
])# _LT_SET_OPTIONS
8159
8160
8161
8162
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8163
# -----------------------------------------
8164
m4_define([_LT_MANGLE_DEFUN],
8165
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8166
8167
8168
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8169
# -----------------------------------------------
8170
m4_define([LT_OPTION_DEFINE],
8171
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8172
])# LT_OPTION_DEFINE
8173
8174
8175
# dlopen
8176
# ------
8177
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8178
])
8179
8180
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8181
[_LT_SET_OPTION([LT_INIT], [dlopen])
8182
AC_DIAGNOSE([obsolete],
8183
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8184
put the `dlopen' option into LT_INIT's first parameter.])
8185
])
8186
8187
dnl aclocal-1.4 backwards compatibility:
8188
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8189
8190
8191
# win32-dll
8192
# ---------
8193
# Declare package support for building win32 dll's.
8194
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8195
[enable_win32_dll=yes
8196
8197
case $host in
8198
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8199
  AC_CHECK_TOOL(AS, as, false)
8200
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8201
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8202
  ;;
8203
esac
8204
8205
test -z "$AS" && AS=as
8206
_LT_DECL([], [AS],      [0], [Assembler program])dnl
8207
8208
test -z "$DLLTOOL" && DLLTOOL=dlltool
8209
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8210
8211
test -z "$OBJDUMP" && OBJDUMP=objdump
8212
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8213
])# win32-dll
8214
8215
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8216
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8217
_LT_SET_OPTION([LT_INIT], [win32-dll])
8218
AC_DIAGNOSE([obsolete],
8219
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8220
put the `win32-dll' option into LT_INIT's first parameter.])
8221
])
8222
8223
dnl aclocal-1.4 backwards compatibility:
8224
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8225
8226
8227
# _LT_ENABLE_SHARED([DEFAULT])
8228
# ----------------------------
8229
# implement the --enable-shared flag, and supports the `shared' and
8230
# `disable-shared' LT_INIT options.
8231
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8232
m4_define([_LT_ENABLE_SHARED],
8233
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8234
AC_ARG_ENABLE([shared],
8235
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8236
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8237
    [p=${PACKAGE-default}
8238
    case $enableval in
8239
    yes) enable_shared=yes ;;
8240
    no) enable_shared=no ;;
8241
    *)
8242
      enable_shared=no
8243
      # Look at the argument we got.  We use all the common list separators.
8244
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8245
      for pkg in $enableval; do
8246
	IFS="$lt_save_ifs"
8247
	if test "X$pkg" = "X$p"; then
8248
	  enable_shared=yes
8249
	fi
8250
      done
8251
      IFS="$lt_save_ifs"
8252
      ;;
8253
    esac],
8254
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8255
8256
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8257
	[Whether or not to build shared libraries])
8258
])# _LT_ENABLE_SHARED
8259
8260
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8261
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8262
8263
# Old names:
8264
AC_DEFUN([AC_ENABLE_SHARED],
8265
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8266
])
8267
8268
AC_DEFUN([AC_DISABLE_SHARED],
8269
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8270
])
8271
8272
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8273
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8274
8275
dnl aclocal-1.4 backwards compatibility:
8276
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8277
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8278
8279
8280
8281
# _LT_ENABLE_STATIC([DEFAULT])
8282
# ----------------------------
8283
# implement the --enable-static flag, and support the `static' and
8284
# `disable-static' LT_INIT options.
8285
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8286
m4_define([_LT_ENABLE_STATIC],
8287
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8288
AC_ARG_ENABLE([static],
8289
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8290
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8291
    [p=${PACKAGE-default}
8292
    case $enableval in
8293
    yes) enable_static=yes ;;
8294
    no) enable_static=no ;;
8295
    *)
8296
     enable_static=no
8297
      # Look at the argument we got.  We use all the common list separators.
8298
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8299
      for pkg in $enableval; do
8300
	IFS="$lt_save_ifs"
8301
	if test "X$pkg" = "X$p"; then
8302
	  enable_static=yes
8303
	fi
8304
      done
8305
      IFS="$lt_save_ifs"
8306
      ;;
8307
    esac],
8308
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8309
8310
    _LT_DECL([build_old_libs], [enable_static], [0],
8311
	[Whether or not to build static libraries])
8312
])# _LT_ENABLE_STATIC
8313
8314
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8315
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8316
8317
# Old names:
8318
AC_DEFUN([AC_ENABLE_STATIC],
8319
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8320
])
8321
8322
AC_DEFUN([AC_DISABLE_STATIC],
8323
[_LT_SET_OPTION([LT_INIT], [disable-static])
8324
])
8325
8326
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8327
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8328
8329
dnl aclocal-1.4 backwards compatibility:
8330
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8331
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8332
8333
8334
8335
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8336
# ----------------------------------
8337
# implement the --enable-fast-install flag, and support the `fast-install'
8338
# and `disable-fast-install' LT_INIT options.
8339
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8340
m4_define([_LT_ENABLE_FAST_INSTALL],
8341
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8342
AC_ARG_ENABLE([fast-install],
8343
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8344
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8345
    [p=${PACKAGE-default}
8346
    case $enableval in
8347
    yes) enable_fast_install=yes ;;
8348
    no) enable_fast_install=no ;;
8349
    *)
8350
      enable_fast_install=no
8351
      # Look at the argument we got.  We use all the common list separators.
8352
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8353
      for pkg in $enableval; do
8354
	IFS="$lt_save_ifs"
8355
	if test "X$pkg" = "X$p"; then
8356
	  enable_fast_install=yes
8357
	fi
8358
      done
8359
      IFS="$lt_save_ifs"
8360
      ;;
8361
    esac],
8362
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8363
8364
_LT_DECL([fast_install], [enable_fast_install], [0],
8365
	 [Whether or not to optimize for fast installation])dnl
8366
])# _LT_ENABLE_FAST_INSTALL
8367
8368
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8369
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8370
8371
# Old names:
8372
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8373
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8374
AC_DIAGNOSE([obsolete],
8375
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8376
the `fast-install' option into LT_INIT's first parameter.])
8377
])
8378
8379
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8380
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8381
AC_DIAGNOSE([obsolete],
8382
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8383
the `disable-fast-install' option into LT_INIT's first parameter.])
8384
])
8385
8386
dnl aclocal-1.4 backwards compatibility:
8387
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8388
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8389
8390
8391
# _LT_WITH_PIC([MODE])
8392
# --------------------
8393
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8394
# LT_INIT options.
8395
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8396
m4_define([_LT_WITH_PIC],
8397
[AC_ARG_WITH([pic],
8398
    [AS_HELP_STRING([--with-pic],
8399
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8400
    [pic_mode="$withval"],
8401
    [pic_mode=default])
8402
8403
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8404
8405
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8406
])# _LT_WITH_PIC
8407
8408
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8409
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8410
8411
# Old name:
8412
AU_DEFUN([AC_LIBTOOL_PICMODE],
8413
[_LT_SET_OPTION([LT_INIT], [pic-only])
8414
AC_DIAGNOSE([obsolete],
8415
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8416
put the `pic-only' option into LT_INIT's first parameter.])
8417
])
8418
8419
dnl aclocal-1.4 backwards compatibility:
8420
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8421
8422
8423
m4_define([_LTDL_MODE], [])
8424
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8425
		 [m4_define([_LTDL_MODE], [nonrecursive])])
8426
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8427
		 [m4_define([_LTDL_MODE], [recursive])])
8428
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8429
		 [m4_define([_LTDL_MODE], [subproject])])
8430
8431
m4_define([_LTDL_TYPE], [])
8432
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8433
		 [m4_define([_LTDL_TYPE], [installable])])
8434
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8435
		 [m4_define([_LTDL_TYPE], [convenience])])
8436
8437
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8438
#
8439
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8440
# Written by Gary V. Vaughan, 2004
8441
#
8442
# This file is free software; the Free Software Foundation gives
8443
# unlimited permission to copy and/or distribute it, with or without
8444
# modifications, as long as this notice is preserved.
8445
8446
# serial 6 ltsugar.m4
8447
8448
# This is to help aclocal find these macros, as it can't see m4_define.
8449
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8450
8451
8452
# lt_join(SEP, ARG1, [ARG2...])
8453
# -----------------------------
8454
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8455
# associated separator.
8456
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8457
# versions in m4sugar had bugs.
8458
m4_define([lt_join],
8459
[m4_if([$#], [1], [],
8460
       [$#], [2], [[$2]],
8461
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8462
m4_define([_lt_join],
8463
[m4_if([$#$2], [2], [],
8464
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8465
8466
8467
# lt_car(LIST)
8468
# lt_cdr(LIST)
8469
# ------------
8470
# Manipulate m4 lists.
8471
# These macros are necessary as long as will still need to support
8472
# Autoconf-2.59 which quotes differently.
8473
m4_define([lt_car], [[$1]])
8474
m4_define([lt_cdr],
8475
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8476
       [$#], 1, [],
8477
       [m4_dquote(m4_shift($@))])])
8478
m4_define([lt_unquote], $1)
8479
8480
8481
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8482
# ------------------------------------------
8483
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8484
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8485
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8486
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8487
# than defined and empty).
8488
#
8489
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8490
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8491
m4_define([lt_append],
8492
[m4_define([$1],
8493
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8494
8495
8496
8497
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8498
# ----------------------------------------------------------
8499
# Produce a SEP delimited list of all paired combinations of elements of
8500
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8501
# has the form PREFIXmINFIXSUFFIXn.
8502
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8503
m4_define([lt_combine],
8504
[m4_if(m4_eval([$# > 3]), [1],
8505
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8506
[[m4_foreach([_Lt_prefix], [$2],
8507
	     [m4_foreach([_Lt_suffix],
8508
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8509
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8510
8511
8512
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8513
# -----------------------------------------------------------------------
8514
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8515
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8516
m4_define([lt_if_append_uniq],
8517
[m4_ifdef([$1],
8518
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8519
		 [lt_append([$1], [$2], [$3])$4],
8520
		 [$5])],
8521
	  [lt_append([$1], [$2], [$3])$4])])
8522
8523
8524
# lt_dict_add(DICT, KEY, VALUE)
8525
# -----------------------------
8526
m4_define([lt_dict_add],
8527
[m4_define([$1($2)], [$3])])
8528
8529
8530
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8531
# --------------------------------------------
8532
m4_define([lt_dict_add_subkey],
8533
[m4_define([$1($2:$3)], [$4])])
8534
8535
8536
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8537
# ----------------------------------
8538
m4_define([lt_dict_fetch],
8539
[m4_ifval([$3],
8540
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8541
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8542
8543
8544
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8545
# -----------------------------------------------------------------
8546
m4_define([lt_if_dict_fetch],
8547
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8548
	[$5],
8549
    [$6])])
8550
8551
8552
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8553
# --------------------------------------------------------------
8554
m4_define([lt_dict_filter],
8555
[m4_if([$5], [], [],
8556
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8557
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8558
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8559
])
8560
8561
# ltversion.m4 -- version numbers			-*- Autoconf -*-
8562
#
8563
#   Copyright (C) 2004 Free Software Foundation, Inc.
8564
#   Written by Scott James Remnant, 2004
8565
#
8566
# This file is free software; the Free Software Foundation gives
8567
# unlimited permission to copy and/or distribute it, with or without
8568
# modifications, as long as this notice is preserved.
8569
8570
# Generated from ltversion.in.
8571
8572
# serial 3017 ltversion.m4
8573
# This file is part of GNU Libtool
8574
8575
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8576
m4_define([LT_PACKAGE_REVISION], [1.3017])
8577
8578
AC_DEFUN([LTVERSION_VERSION],
8579
[macro_version='2.2.6b'
8580
macro_revision='1.3017'
8581
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8582
_LT_DECL(, macro_revision, 0)
8583
])
8584
8585
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8586
#
8587
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8588
#   Written by Scott James Remnant, 2004.
8589
#
8590
# This file is free software; the Free Software Foundation gives
8591
# unlimited permission to copy and/or distribute it, with or without
8592
# modifications, as long as this notice is preserved.
8593
8594
# serial 4 lt~obsolete.m4
8595
8596
# These exist entirely to fool aclocal when bootstrapping libtool.
8597
#
8598
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8599
# which have later been changed to m4_define as they aren't part of the
8600
# exported API, or moved to Autoconf or Automake where they belong.
8601
#
8602
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8603
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8604
# using a macro with the same name in our local m4/libtool.m4 it'll
8605
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8606
# and doesn't know about Autoconf macros at all.)
8607
#
8608
# So we provide this file, which has a silly filename so it's always
8609
# included after everything else.  This provides aclocal with the
8610
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8611
# because those macros already exist, or will be overwritten later.
8612
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8613
#
8614
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8615
# Yes, that means every name once taken will need to remain here until
8616
# we give up compatibility with versions before 1.7, at which point
8617
# we need to keep only those names which we still refer to.
8618
8619
# This is to help aclocal find these macros, as it can't see m4_define.
8620
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8621
8622
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8623
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8624
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8625
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8626
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8627
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8628
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8629
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8630
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8631
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8632
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8633
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8634
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8635
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8636
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8637
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8638
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8639
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8640
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8641
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8642
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8643
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8644
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8645
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8646
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8647
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8648
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8649
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8650
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8651
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8652
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8653
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8654
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8655
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8656
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8657
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8658
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8659
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8660
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8661
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8662
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8663
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8664
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8665
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8666
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8667
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8668
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8669
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8670
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8671
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8672
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8673
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8674
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8675
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8676
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8677
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8678
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8679
# serial 1 (pkg-config-0.24)
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8680
# 
8681
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8682
#
8683
# This program is free software; you can redistribute it and/or modify
8684
# it under the terms of the GNU General Public License as published by
8685
# the Free Software Foundation; either version 2 of the License, or
8686
# (at your option) any later version.
8687
#
8688
# This program is distributed in the hope that it will be useful, but
8689
# WITHOUT ANY WARRANTY; without even the implied warranty of
8690
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8691
# General Public License for more details.
8692
#
8693
# You should have received a copy of the GNU General Public License
8694
# along with this program; if not, write to the Free Software
8695
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8696
#
8697
# As a special exception to the GNU General Public License, if you
8698
# distribute this file as part of a program that contains a
8699
# configuration script generated by Autoconf, you may include it under
8700
# the same distribution terms that you use for the rest of that program.
8701
8702
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8703
# ----------------------------------
8704
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8705
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8706
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8707
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
8708
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
8709
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
8710
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8711
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8712
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8713
fi
8714
if test -n "$PKG_CONFIG"; then
8715
	_pkg_min_version=m4_default([$1], [0.9.0])
8716
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8717
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8718
		AC_MSG_RESULT([yes])
8719
	else
8720
		AC_MSG_RESULT([no])
8721
		PKG_CONFIG=""
8722
	fi
8723
fi[]dnl
8724
])# PKG_PROG_PKG_CONFIG
8725
8726
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8727
#
8728
# Check to see whether a particular set of modules exists.  Similar
8729
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8730
#
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8731
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8732
# only at the first occurence in configure.ac, so if the first place
8733
# it's called might be skipped (such as if it is within an "if", you
8734
# have to call PKG_CHECK_EXISTS manually
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8735
# --------------------------------------------------------------
8736
AC_DEFUN([PKG_CHECK_EXISTS],
8737
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8738
if test -n "$PKG_CONFIG" && \
8739
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8740
  m4_default([$2], [:])
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8741
m4_ifvaln([$3], [else
8742
  $3])dnl
8743
fi])
8744
8745
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8746
# ---------------------------------------------
8747
m4_define([_PKG_CONFIG],
1.2.2 by Sebastian Dröge
Import upstream version 2.12.8
8748
[if test -n "$$1"; then
8749
    pkg_cv_[]$1="$$1"
8750
 elif test -n "$PKG_CONFIG"; then
8751
    PKG_CHECK_EXISTS([$3],
8752
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8753
		     [pkg_failed=yes])
8754
 else
8755
    pkg_failed=untried
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8756
fi[]dnl
8757
])# _PKG_CONFIG
8758
8759
# _PKG_SHORT_ERRORS_SUPPORTED
8760
# -----------------------------
8761
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8762
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8763
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8764
        _pkg_short_errors_supported=yes
8765
else
8766
        _pkg_short_errors_supported=no
8767
fi[]dnl
8768
])# _PKG_SHORT_ERRORS_SUPPORTED
8769
8770
8771
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8772
# [ACTION-IF-NOT-FOUND])
8773
#
8774
#
8775
# Note that if there is a possibility the first call to
8776
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8777
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8778
#
8779
#
8780
# --------------------------------------------------------------
8781
AC_DEFUN([PKG_CHECK_MODULES],
8782
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8783
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8784
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8785
8786
pkg_failed=no
8787
AC_MSG_CHECKING([for $1])
8788
8789
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8790
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8791
8792
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8793
and $1[]_LIBS to avoid the need to call pkg-config.
8794
See the pkg-config man page for more details.])
8795
8796
if test $pkg_failed = yes; then
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8797
   	AC_MSG_RESULT([no])
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8798
        _PKG_SHORT_ERRORS_SUPPORTED
8799
        if test $_pkg_short_errors_supported = yes; then
1.2.2 by Sebastian Dröge
Import upstream version 2.12.8
8800
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8801
        else 
1.2.2 by Sebastian Dröge
Import upstream version 2.12.8
8802
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8803
        fi
8804
	# Put the nasty error message in config.log where it belongs
8805
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8806
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8807
	m4_default([$4], [AC_MSG_ERROR(
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8808
[Package requirements ($2) were not met:
8809
8810
$$1_PKG_ERRORS
8811
8812
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8813
installed software in a non-standard prefix.
8814
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8815
_PKG_TEXT])dnl
8816
        ])
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8817
elif test $pkg_failed = untried; then
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8818
     	AC_MSG_RESULT([no])
8819
	m4_default([$4], [AC_MSG_FAILURE(
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8820
[The pkg-config script could not be found or is too old.  Make sure it
8821
is in your PATH or set the PKG_CONFIG environment variable to the full
8822
path to pkg-config.
8823
8824
_PKG_TEXT
8825
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8826
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
8827
        ])
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8828
else
8829
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8830
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8831
        AC_MSG_RESULT([yes])
1.11.5 by Sebastian Dröge
Import upstream version 2.21.1
8832
	$3
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
8833
fi[]dnl
8834
])# PKG_CHECK_MODULES
8835
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
8836
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8837
#
8838
# This file is free software; the Free Software Foundation
8839
# gives unlimited permission to copy and/or distribute it,
8840
# with or without modifications, as long as this notice is preserved.
8841
8842
# AM_AUTOMAKE_VERSION(VERSION)
8843
# ----------------------------
8844
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8845
# generated from the m4 files accompanying Automake X.Y.
8846
# (This private macro should not be called outside this file.)
8847
AC_DEFUN([AM_AUTOMAKE_VERSION],
8848
[am__api_version='1.11'
8849
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8850
dnl require some minimum version.  Point them to the right macro.
1.7.1 by Sebastian Dröge
Import upstream version 2.18.6
8851
m4_if([$1], [1.11.1], [],
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
8852
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8853
])
8854
8855
# _AM_AUTOCONF_VERSION(VERSION)
8856
# -----------------------------
8857
# aclocal traces this macro to find the Autoconf version.
8858
# This is a private macro too.  Using m4_define simplifies
8859
# the logic in aclocal, which can simply ignore this definition.
8860
m4_define([_AM_AUTOCONF_VERSION], [])
8861
8862
# AM_SET_CURRENT_AUTOMAKE_VERSION
8863
# -------------------------------
8864
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8865
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8866
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1.7.1 by Sebastian Dröge
Import upstream version 2.18.6
8867
[AM_AUTOMAKE_VERSION([1.11.1])dnl
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
8868
m4_ifndef([AC_AUTOCONF_VERSION],
8869
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8870
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8871
8872
# Figure out how to run the assembler.                      -*- Autoconf -*-
8873
8874
# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8875
#
8876
# This file is free software; the Free Software Foundation
8877
# gives unlimited permission to copy and/or distribute it,
8878
# with or without modifications, as long as this notice is preserved.
8879
8880
# serial 5
8881
8882
# AM_PROG_AS
8883
# ----------
8884
AC_DEFUN([AM_PROG_AS],
8885
[# By default we simply use the C compiler to build assembly code.
8886
AC_REQUIRE([AC_PROG_CC])
8887
test "${CCAS+set}" = set || CCAS=$CC
8888
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
8889
AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
8890
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
8891
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
8892
])
8893
8894
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8895
8896
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8897
#
8898
# This file is free software; the Free Software Foundation
8899
# gives unlimited permission to copy and/or distribute it,
8900
# with or without modifications, as long as this notice is preserved.
8901
8902
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8903
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8904
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8905
#
8906
# Of course, Automake must honor this variable whenever it calls a
8907
# tool from the auxiliary directory.  The problem is that $srcdir (and
8908
# therefore $ac_aux_dir as well) can be either absolute or relative,
8909
# depending on how configure is run.  This is pretty annoying, since
8910
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8911
# source directory, any form will work fine, but in subdirectories a
8912
# relative path needs to be adjusted first.
8913
#
8914
# $ac_aux_dir/missing
8915
#    fails when called from a subdirectory if $ac_aux_dir is relative
8916
# $top_srcdir/$ac_aux_dir/missing
8917
#    fails if $ac_aux_dir is absolute,
8918
#    fails when called from a subdirectory in a VPATH build with
8919
#          a relative $ac_aux_dir
8920
#
8921
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8922
# are both prefixed by $srcdir.  In an in-source build this is usually
8923
# harmless because $srcdir is `.', but things will broke when you
8924
# start a VPATH build or use an absolute $srcdir.
8925
#
8926
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8927
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8928
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8929
# and then we would define $MISSING as
8930
#   MISSING="\${SHELL} $am_aux_dir/missing"
8931
# This will work as long as MISSING is not called from configure, because
8932
# unfortunately $(top_srcdir) has no meaning in configure.
8933
# However there are other variables, like CC, which are often used in
8934
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8935
#
8936
# Another solution, used here, is to always expand $ac_aux_dir to an
8937
# absolute PATH.  The drawback is that using absolute paths prevent a
8938
# configured tree to be moved without reconfiguration.
8939
8940
AC_DEFUN([AM_AUX_DIR_EXPAND],
8941
[dnl Rely on autoconf to set up CDPATH properly.
8942
AC_PREREQ([2.50])dnl
8943
# expand $ac_aux_dir to an absolute path
8944
am_aux_dir=`cd $ac_aux_dir && pwd`
8945
])
8946
8947
8948
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8949
# Free Software Foundation, Inc.
8950
#
8951
# This file is free software; the Free Software Foundation
8952
# gives unlimited permission to copy and/or distribute it,
8953
# with or without modifications, as long as this notice is preserved.
8954
8955
# serial 4
8956
8957
# This was merged into AC_PROG_CC in Autoconf.
8958
8959
AU_DEFUN([AM_PROG_CC_STDC],
8960
[AC_PROG_CC
8961
AC_DIAGNOSE([obsolete], [$0:
8962
	your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8963
	`ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
8964
	you adjust the code.  You can also remove the above call to
8965
	AC_PROG_CC if you already called it elsewhere.])
8966
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8967
])
8968
AU_DEFUN([fp_PROG_CC_STDC])
8969
8970
# AM_CONDITIONAL                                            -*- Autoconf -*-
8971
8972
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8973
# Free Software Foundation, Inc.
8974
#
8975
# This file is free software; the Free Software Foundation
8976
# gives unlimited permission to copy and/or distribute it,
8977
# with or without modifications, as long as this notice is preserved.
8978
8979
# serial 9
8980
8981
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8982
# -------------------------------------
8983
# Define a conditional.
8984
AC_DEFUN([AM_CONDITIONAL],
8985
[AC_PREREQ(2.52)dnl
8986
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8987
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8988
AC_SUBST([$1_TRUE])dnl
8989
AC_SUBST([$1_FALSE])dnl
8990
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8991
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8992
m4_define([_AM_COND_VALUE_$1], [$2])dnl
8993
if $2; then
8994
  $1_TRUE=
8995
  $1_FALSE='#'
8996
else
8997
  $1_TRUE='#'
8998
  $1_FALSE=
8999
fi
9000
AC_CONFIG_COMMANDS_PRE(
9001
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9002
  AC_MSG_ERROR([[conditional "$1" was never defined.
9003
Usually this means the macro was only invoked conditionally.]])
9004
fi])])
9005
9006
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9007
# Free Software Foundation, Inc.
9008
#
9009
# This file is free software; the Free Software Foundation
9010
# gives unlimited permission to copy and/or distribute it,
9011
# with or without modifications, as long as this notice is preserved.
9012
9013
# serial 10
9014
9015
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9016
# written in clear, in which case automake, when reading aclocal.m4,
9017
# will think it sees a *use*, and therefore will trigger all it's
9018
# C support machinery.  Also note that it means that autoscan, seeing
9019
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9020
9021
9022
# _AM_DEPENDENCIES(NAME)
9023
# ----------------------
9024
# See how the compiler implements dependency checking.
9025
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9026
# We try a few techniques and use that to set a single cache variable.
9027
#
9028
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9029
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9030
# dependency, and given that the user is not expected to run this macro,
9031
# just rely on AC_PROG_CC.
9032
AC_DEFUN([_AM_DEPENDENCIES],
9033
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9034
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9035
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9036
AC_REQUIRE([AM_DEP_TRACK])dnl
9037
9038
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9039
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9040
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9041
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9042
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9043
                   [depcc="$$1"   am_compiler_list=])
9044
9045
AC_CACHE_CHECK([dependency style of $depcc],
9046
               [am_cv_$1_dependencies_compiler_type],
9047
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9048
  # We make a subdir and do the tests there.  Otherwise we can end up
9049
  # making bogus files that we don't know about and never remove.  For
9050
  # instance it was reported that on HP-UX the gcc test will end up
9051
  # making a dummy file named `D' -- because `-MD' means `put the output
9052
  # in D'.
9053
  mkdir conftest.dir
9054
  # Copy depcomp to subdir because otherwise we won't find it if we're
9055
  # using a relative directory.
9056
  cp "$am_depcomp" conftest.dir
9057
  cd conftest.dir
9058
  # We will build objects and dependencies in a subdirectory because
9059
  # it helps to detect inapplicable dependency modes.  For instance
9060
  # both Tru64's cc and ICC support -MD to output dependencies as a
9061
  # side effect of compilation, but ICC will put the dependencies in
9062
  # the current directory while Tru64 will put them in the object
9063
  # directory.
9064
  mkdir sub
9065
9066
  am_cv_$1_dependencies_compiler_type=none
9067
  if test "$am_compiler_list" = ""; then
9068
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9069
  fi
9070
  am__universal=false
9071
  m4_case([$1], [CC],
9072
    [case " $depcc " in #(
9073
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9074
     esac],
9075
    [CXX],
9076
    [case " $depcc " in #(
9077
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9078
     esac])
9079
9080
  for depmode in $am_compiler_list; do
9081
    # Setup a source with many dependencies, because some compilers
9082
    # like to wrap large dependency lists on column 80 (with \), and
9083
    # we should not choose a depcomp mode which is confused by this.
9084
    #
9085
    # We need to recreate these files for each test, as the compiler may
9086
    # overwrite some of them when testing with obscure command lines.
9087
    # This happens at least with the AIX C compiler.
9088
    : > sub/conftest.c
9089
    for i in 1 2 3 4 5 6; do
9090
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9091
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9092
      # Solaris 8's {/usr,}/bin/sh.
9093
      touch sub/conftst$i.h
9094
    done
9095
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9096
9097
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9098
    # mode.  It turns out that the SunPro C++ compiler does not properly
9099
    # handle `-M -o', and we need to detect this.  Also, some Intel
9100
    # versions had trouble with output in subdirs
9101
    am__obj=sub/conftest.${OBJEXT-o}
9102
    am__minus_obj="-o $am__obj"
9103
    case $depmode in
9104
    gcc)
9105
      # This depmode causes a compiler race in universal mode.
9106
      test "$am__universal" = false || continue
9107
      ;;
9108
    nosideeffect)
9109
      # after this tag, mechanisms are not by side-effect, so they'll
9110
      # only be used when explicitly requested
9111
      if test "x$enable_dependency_tracking" = xyes; then
9112
	continue
9113
      else
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9114
	break
9115
      fi
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9116
      ;;
9117
    msvisualcpp | msvcmsys)
9118
      # This compiler won't grok `-c -o', but also, the minuso test has
9119
      # not run yet.  These depmodes are late enough in the game, and
9120
      # so weak that their functioning should not be impacted.
9121
      am__obj=conftest.${OBJEXT-o}
9122
      am__minus_obj=
9123
      ;;
9124
    none) break ;;
9125
    esac
9126
    if depmode=$depmode \
9127
       source=sub/conftest.c object=$am__obj \
9128
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9129
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9130
         >/dev/null 2>conftest.err &&
9131
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9132
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9133
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9134
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9135
      # icc doesn't choke on unknown options, it will just issue warnings
9136
      # or remarks (even with -Werror).  So we grep stderr for any message
9137
      # that says an option was ignored or not supported.
9138
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9139
      #   icc: Command line warning: ignoring option '-M'; no argument required
9140
      # The diagnosis changed in icc 8.0:
9141
      #   icc: Command line remark: option '-MP' not supported
9142
      if (grep 'ignoring option' conftest.err ||
9143
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9144
        am_cv_$1_dependencies_compiler_type=$depmode
9145
        break
9146
      fi
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9147
    fi
9148
  done
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9149
9150
  cd ..
9151
  rm -rf conftest.dir
9152
else
9153
  am_cv_$1_dependencies_compiler_type=none
9154
fi
9155
])
9156
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9157
AM_CONDITIONAL([am__fastdep$1], [
9158
  test "x$enable_dependency_tracking" != xno \
9159
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9160
])
9161
9162
9163
# AM_SET_DEPDIR
9164
# -------------
9165
# Choose a directory name for dependency files.
9166
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9167
AC_DEFUN([AM_SET_DEPDIR],
9168
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9169
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9170
])
9171
9172
9173
# AM_DEP_TRACK
9174
# ------------
9175
AC_DEFUN([AM_DEP_TRACK],
9176
[AC_ARG_ENABLE(dependency-tracking,
9177
[  --disable-dependency-tracking  speeds up one-time build
9178
  --enable-dependency-tracking   do not reject slow dependency extractors])
9179
if test "x$enable_dependency_tracking" != xno; then
9180
  am_depcomp="$ac_aux_dir/depcomp"
9181
  AMDEPBACKSLASH='\'
9182
fi
9183
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9184
AC_SUBST([AMDEPBACKSLASH])dnl
9185
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9186
])
9187
9188
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9189
9190
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9191
# Free Software Foundation, Inc.
9192
#
9193
# This file is free software; the Free Software Foundation
9194
# gives unlimited permission to copy and/or distribute it,
9195
# with or without modifications, as long as this notice is preserved.
9196
9197
#serial 5
9198
9199
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9200
# ------------------------------
9201
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9202
[{
9203
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9204
  # are listed without --file.  Let's play safe and only enable the eval
9205
  # if we detect the quoting.
9206
  case $CONFIG_FILES in
9207
  *\'*) eval set x "$CONFIG_FILES" ;;
9208
  *)   set x $CONFIG_FILES ;;
9209
  esac
9210
  shift
9211
  for mf
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9212
  do
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9213
    # Strip MF so we end up with the name of the file.
9214
    mf=`echo "$mf" | sed -e 's/:.*$//'`
9215
    # Check whether this is an Automake generated Makefile or not.
9216
    # We used to match only the files named `Makefile.in', but
9217
    # some people rename them; so instead we look at the file content.
9218
    # Grep'ing the first line is not enough: some people post-process
9219
    # each Makefile.in and add a new line on top of each file to say so.
9220
    # Grep'ing the whole file is not good either: AIX grep has a line
9221
    # limit of 2048, but all sed's we know have understand at least 4000.
9222
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9223
      dirpart=`AS_DIRNAME("$mf")`
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9224
    else
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9225
      continue
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9226
    fi
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9227
    # Extract the definition of DEPDIR, am__include, and am__quote
9228
    # from the Makefile without running `make'.
9229
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9230
    test -z "$DEPDIR" && continue
9231
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9232
    test -z "am__include" && continue
9233
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9234
    # When using ansi2knr, U may be empty or an underscore; expand it
9235
    U=`sed -n 's/^U = //p' < "$mf"`
9236
    # Find all dependency output files, they are included files with
9237
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9238
    # simplest approach to changing $(DEPDIR) to its actual value in the
9239
    # expansion.
9240
    for file in `sed -n "
9241
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9242
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9243
      # Make sure the directory exists.
9244
      test -f "$dirpart/$file" && continue
9245
      fdir=`AS_DIRNAME(["$file"])`
9246
      AS_MKDIR_P([$dirpart/$fdir])
9247
      # echo "creating $dirpart/$file"
9248
      echo '# dummy' > "$dirpart/$file"
9249
    done
9250
  done
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9251
}
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9252
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9253
9254
9255
# AM_OUTPUT_DEPENDENCY_COMMANDS
9256
# -----------------------------
9257
# This macro should only be invoked once -- use via AC_REQUIRE.
9258
#
9259
# This code is only required when automatic dependency tracking
9260
# is enabled.  FIXME.  This creates each `.P' file that we will
9261
# need in order to bootstrap the dependency handling code.
9262
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9263
[AC_CONFIG_COMMANDS([depfiles],
9264
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9265
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9266
])
9267
9268
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9269
# Free Software Foundation, Inc.
9270
#
9271
# This file is free software; the Free Software Foundation
9272
# gives unlimited permission to copy and/or distribute it,
9273
# with or without modifications, as long as this notice is preserved.
9274
9275
# serial 8
9276
9277
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9278
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9279
9280
# Do all the work for Automake.                             -*- Autoconf -*-
9281
9282
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9283
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9284
#
9285
# This file is free software; the Free Software Foundation
9286
# gives unlimited permission to copy and/or distribute it,
9287
# with or without modifications, as long as this notice is preserved.
9288
9289
# serial 16
9290
9291
# This macro actually does too much.  Some checks are only needed if
9292
# your package does certain things.  But this isn't really a big deal.
9293
9294
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9295
# AM_INIT_AUTOMAKE([OPTIONS])
9296
# -----------------------------------------------
9297
# The call with PACKAGE and VERSION arguments is the old style
9298
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9299
# and VERSION should now be passed to AC_INIT and removed from
9300
# the call to AM_INIT_AUTOMAKE.
9301
# We support both call styles for the transition.  After
9302
# the next Automake release, Autoconf can make the AC_INIT
9303
# arguments mandatory, and then we can depend on a new Autoconf
9304
# release and drop the old call support.
9305
AC_DEFUN([AM_INIT_AUTOMAKE],
9306
[AC_PREREQ([2.62])dnl
9307
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9308
dnl the ones we care about.
9309
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9310
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9311
AC_REQUIRE([AC_PROG_INSTALL])dnl
9312
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9313
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9314
  # is not polluted with repeated "-I."
9315
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9316
  # test to see if srcdir already configured
9317
  if test -f $srcdir/config.status; then
9318
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9319
  fi
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9320
fi
9321
9322
# test whether we have cygpath
9323
if test -z "$CYGPATH_W"; then
9324
  if (cygpath --version) >/dev/null 2>/dev/null; then
9325
    CYGPATH_W='cygpath -w'
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9326
  else
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9327
    CYGPATH_W=echo
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9328
  fi
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9329
fi
9330
AC_SUBST([CYGPATH_W])
9331
9332
# Define the identity of the package.
9333
dnl Distinguish between old-style and new-style calls.
9334
m4_ifval([$2],
9335
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9336
 AC_SUBST([PACKAGE], [$1])dnl
9337
 AC_SUBST([VERSION], [$2])],
9338
[_AM_SET_OPTIONS([$1])dnl
9339
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9340
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9341
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9342
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9343
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9344
9345
_AM_IF_OPTION([no-define],,
9346
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9347
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9348
9349
# Some tools Automake needs.
9350
AC_REQUIRE([AM_SANITY_CHECK])dnl
9351
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9352
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9353
AM_MISSING_PROG(AUTOCONF, autoconf)
9354
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9355
AM_MISSING_PROG(AUTOHEADER, autoheader)
9356
AM_MISSING_PROG(MAKEINFO, makeinfo)
9357
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9358
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9359
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9360
# We need awk for the "check" target.  The system "awk" is bad on
9361
# some platforms.
9362
AC_REQUIRE([AC_PROG_AWK])dnl
9363
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9364
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9365
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9366
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9367
			     [_AM_PROG_TAR([v7])])])
9368
_AM_IF_OPTION([no-dependencies],,
9369
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9370
		  [_AM_DEPENDENCIES(CC)],
9371
		  [define([AC_PROG_CC],
9372
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9373
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9374
		  [_AM_DEPENDENCIES(CXX)],
9375
		  [define([AC_PROG_CXX],
9376
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9377
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9378
		  [_AM_DEPENDENCIES(OBJC)],
9379
		  [define([AC_PROG_OBJC],
9380
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9381
])
9382
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9383
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9384
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9385
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9386
AC_CONFIG_COMMANDS_PRE(dnl
9387
[m4_provide_if([_AM_COMPILER_EXEEXT],
9388
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9389
])
9390
9391
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9392
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9393
dnl mangled by Autoconf and run in a shell conditional statement.
9394
m4_define([_AC_COMPILER_EXEEXT],
9395
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9396
9397
9398
# When config.status generates a header, we must update the stamp-h file.
9399
# This file resides in the same directory as the config header
9400
# that is generated.  The stamp files are numbered to have different names.
9401
9402
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9403
# loop where config.status creates the headers, so we can generate
9404
# our stamp files there.
9405
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9406
[# Compute $1's index in $config_headers.
9407
_am_arg=$1
9408
_am_stamp_count=1
9409
for _am_header in $config_headers :; do
9410
  case $_am_header in
9411
    $_am_arg | $_am_arg:* )
9412
      break ;;
9413
    * )
9414
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9415
  esac
9416
done
9417
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9418
9419
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9420
#
9421
# This file is free software; the Free Software Foundation
9422
# gives unlimited permission to copy and/or distribute it,
9423
# with or without modifications, as long as this notice is preserved.
9424
9425
# AM_PROG_INSTALL_SH
9426
# ------------------
9427
# Define $install_sh.
9428
AC_DEFUN([AM_PROG_INSTALL_SH],
9429
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9430
if test x"${install_sh}" != xset; then
9431
  case $am_aux_dir in
9432
  *\ * | *\	*)
9433
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9434
  *)
9435
    install_sh="\${SHELL} $am_aux_dir/install-sh"
9436
  esac
9437
fi
9438
AC_SUBST(install_sh)])
9439
9440
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9441
#
9442
# This file is free software; the Free Software Foundation
9443
# gives unlimited permission to copy and/or distribute it,
9444
# with or without modifications, as long as this notice is preserved.
9445
9446
# serial 2
9447
9448
# Check whether the underlying file-system supports filenames
9449
# with a leading dot.  For instance MS-DOS doesn't.
9450
AC_DEFUN([AM_SET_LEADING_DOT],
9451
[rm -rf .tst 2>/dev/null
9452
mkdir .tst 2>/dev/null
9453
if test -d .tst; then
9454
  am__leading_dot=.
9455
else
9456
  am__leading_dot=_
9457
fi
9458
rmdir .tst 2>/dev/null
9459
AC_SUBST([am__leading_dot])])
9460
9461
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9462
# From Jim Meyering
9463
9464
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9465
# Free Software Foundation, Inc.
9466
#
9467
# This file is free software; the Free Software Foundation
9468
# gives unlimited permission to copy and/or distribute it,
9469
# with or without modifications, as long as this notice is preserved.
9470
9471
# serial 5
9472
9473
# AM_MAINTAINER_MODE([DEFAULT-MODE])
9474
# ----------------------------------
9475
# Control maintainer-specific portions of Makefiles.
9476
# Default is to disable them, unless `enable' is passed literally.
9477
# For symmetry, `disable' may be passed as well.  Anyway, the user
9478
# can override the default with the --enable/--disable switch.
9479
AC_DEFUN([AM_MAINTAINER_MODE],
9480
[m4_case(m4_default([$1], [disable]),
9481
       [enable], [m4_define([am_maintainer_other], [disable])],
9482
       [disable], [m4_define([am_maintainer_other], [enable])],
9483
       [m4_define([am_maintainer_other], [enable])
9484
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9485
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9486
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9487
  AC_ARG_ENABLE([maintainer-mode],
9488
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9489
			  (and sometimes confusing) to the casual installer],
9490
      [USE_MAINTAINER_MODE=$enableval],
9491
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9492
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9493
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9494
  MAINT=$MAINTAINER_MODE_TRUE
9495
  AC_SUBST([MAINT])dnl
9496
]
9497
)
9498
9499
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9500
9501
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9502
9503
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9504
#
9505
# This file is free software; the Free Software Foundation
9506
# gives unlimited permission to copy and/or distribute it,
9507
# with or without modifications, as long as this notice is preserved.
9508
9509
# serial 4
9510
9511
# AM_MAKE_INCLUDE()
9512
# -----------------
9513
# Check to see how make treats includes.
9514
AC_DEFUN([AM_MAKE_INCLUDE],
9515
[am_make=${MAKE-make}
9516
cat > confinc << 'END'
9517
am__doit:
9518
	@echo this is the am__doit target
9519
.PHONY: am__doit
9520
END
9521
# If we don't find an include directive, just comment out the code.
9522
AC_MSG_CHECKING([for style of include used by $am_make])
9523
am__include="#"
9524
am__quote=
9525
_am_result=none
9526
# First try GNU make style include.
9527
echo "include confinc" > confmf
9528
# Ignore all kinds of additional output from `make'.
9529
case `$am_make -s -f confmf 2> /dev/null` in #(
9530
*the\ am__doit\ target*)
9531
  am__include=include
9532
  am__quote=
9533
  _am_result=GNU
9534
  ;;
9535
esac
9536
# Now try BSD make style include.
9537
if test "$am__include" = "#"; then
9538
   echo '.include "confinc"' > confmf
9539
   case `$am_make -s -f confmf 2> /dev/null` in #(
9540
   *the\ am__doit\ target*)
9541
     am__include=.include
9542
     am__quote="\""
9543
     _am_result=BSD
9544
     ;;
9545
   esac
9546
fi
9547
AC_SUBST([am__include])
9548
AC_SUBST([am__quote])
9549
AC_MSG_RESULT([$_am_result])
9550
rm -f confinc confmf
9551
])
9552
9553
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9554
# Free Software Foundation, Inc.
9555
#
9556
# This file is free software; the Free Software Foundation
9557
# gives unlimited permission to copy and/or distribute it,
9558
# with or without modifications, as long as this notice is preserved.
9559
9560
# serial 6
9561
9562
# AM_PROG_CC_C_O
9563
# --------------
9564
# Like AC_PROG_CC_C_O, but changed for automake.
9565
AC_DEFUN([AM_PROG_CC_C_O],
9566
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
9567
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9568
AC_REQUIRE_AUX_FILE([compile])dnl
9569
# FIXME: we rely on the cache variable name because
9570
# there is no other way.
9571
set dummy $CC
9572
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9573
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9574
if test "$am_t" != yes; then
9575
   # Losing compiler, so override with the script.
9576
   # FIXME: It is wrong to rewrite CC.
9577
   # But if we don't then we get into trouble of one sort or another.
9578
   # A longer-term fix would be to have automake use am__CC in this case,
9579
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9580
   CC="$am_aux_dir/compile $CC"
9581
fi
9582
dnl Make sure AC_PROG_CC is never called again, or it will override our
9583
dnl setting of CC.
9584
m4_define([AC_PROG_CC],
9585
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9586
])
9587
9588
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9589
9590
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9591
# Free Software Foundation, Inc.
9592
#
9593
# This file is free software; the Free Software Foundation
9594
# gives unlimited permission to copy and/or distribute it,
9595
# with or without modifications, as long as this notice is preserved.
9596
9597
# serial 6
9598
9599
# AM_MISSING_PROG(NAME, PROGRAM)
9600
# ------------------------------
9601
AC_DEFUN([AM_MISSING_PROG],
9602
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9603
$1=${$1-"${am_missing_run}$2"}
9604
AC_SUBST($1)])
9605
9606
9607
# AM_MISSING_HAS_RUN
9608
# ------------------
9609
# Define MISSING if not defined so far and test if it supports --run.
9610
# If it does, set am_missing_run to use it, otherwise, to nothing.
9611
AC_DEFUN([AM_MISSING_HAS_RUN],
9612
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9613
AC_REQUIRE_AUX_FILE([missing])dnl
9614
if test x"${MISSING+set}" != xset; then
9615
  case $am_aux_dir in
9616
  *\ * | *\	*)
9617
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9618
  *)
9619
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
9620
  esac
9621
fi
9622
# Use eval to expand $SHELL
9623
if eval "$MISSING --run true"; then
9624
  am_missing_run="$MISSING --run "
9625
else
9626
  am_missing_run=
9627
  AC_MSG_WARN([`missing' script is too old or missing])
9628
fi
9629
])
9630
9631
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9632
#
9633
# This file is free software; the Free Software Foundation
9634
# gives unlimited permission to copy and/or distribute it,
9635
# with or without modifications, as long as this notice is preserved.
9636
9637
# AM_PROG_MKDIR_P
9638
# ---------------
9639
# Check for `mkdir -p'.
9640
AC_DEFUN([AM_PROG_MKDIR_P],
9641
[AC_PREREQ([2.60])dnl
9642
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9643
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9644
dnl while keeping a definition of mkdir_p for backward compatibility.
9645
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9646
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9647
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9648
dnl adjustment using top_builddir (which is defined more often than
9649
dnl MKDIR_P).
9650
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9651
case $mkdir_p in
9652
  [[\\/$]]* | ?:[[\\/]]*) ;;
9653
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9654
esac
9655
])
9656
9657
# Helper functions for option handling.                     -*- Autoconf -*-
9658
9659
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9660
#
9661
# This file is free software; the Free Software Foundation
9662
# gives unlimited permission to copy and/or distribute it,
9663
# with or without modifications, as long as this notice is preserved.
9664
9665
# serial 4
9666
9667
# _AM_MANGLE_OPTION(NAME)
9668
# -----------------------
9669
AC_DEFUN([_AM_MANGLE_OPTION],
9670
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9671
9672
# _AM_SET_OPTION(NAME)
9673
# ------------------------------
9674
# Set option NAME.  Presently that only means defining a flag for this option.
9675
AC_DEFUN([_AM_SET_OPTION],
9676
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9677
9678
# _AM_SET_OPTIONS(OPTIONS)
9679
# ----------------------------------
9680
# OPTIONS is a space-separated list of Automake options.
9681
AC_DEFUN([_AM_SET_OPTIONS],
9682
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9683
9684
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9685
# -------------------------------------------
9686
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9687
AC_DEFUN([_AM_IF_OPTION],
9688
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9689
9690
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9691
9692
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9693
# Free Software Foundation, Inc.
9694
#
9695
# This file is free software; the Free Software Foundation
9696
# gives unlimited permission to copy and/or distribute it,
9697
# with or without modifications, as long as this notice is preserved.
9698
9699
# serial 5
9700
9701
# AM_SANITY_CHECK
9702
# ---------------
9703
AC_DEFUN([AM_SANITY_CHECK],
9704
[AC_MSG_CHECKING([whether build environment is sane])
9705
# Just in case
9706
sleep 1
9707
echo timestamp > conftest.file
9708
# Reject unsafe characters in $srcdir or the absolute working directory
9709
# name.  Accept space and tab only in the latter.
9710
am_lf='
9711
'
9712
case `pwd` in
9713
  *[[\\\"\#\$\&\'\`$am_lf]]*)
9714
    AC_MSG_ERROR([unsafe absolute working directory name]);;
9715
esac
9716
case $srcdir in
9717
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9718
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9719
esac
9720
9721
# Do `set' in a subshell so we don't clobber the current shell's
9722
# arguments.  Must try -L first in case configure is actually a
9723
# symlink; some systems play weird games with the mod time of symlinks
9724
# (eg FreeBSD returns the mod time of the symlink's containing
9725
# directory).
9726
if (
9727
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9728
   if test "$[*]" = "X"; then
9729
      # -L didn't work.
9730
      set X `ls -t "$srcdir/configure" conftest.file`
9731
   fi
9732
   rm -f conftest.file
9733
   if test "$[*]" != "X $srcdir/configure conftest.file" \
9734
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9735
9736
      # If neither matched, then we have a broken ls.  This can happen
9737
      # if, for instance, CONFIG_SHELL is bash and it inherits a
9738
      # broken ls alias from the environment.  This has actually
9739
      # happened.  Such a system could not be considered "sane".
9740
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9741
alias in your environment])
9742
   fi
9743
9744
   test "$[2]" = conftest.file
9745
   )
9746
then
9747
   # Ok.
9748
   :
9749
else
9750
   AC_MSG_ERROR([newly created file is older than distributed files!
9751
Check your system clock])
9752
fi
9753
AC_MSG_RESULT(yes)])
9754
9755
# Copyright (C) 2009  Free Software Foundation, Inc.
9756
#
9757
# This file is free software; the Free Software Foundation
9758
# gives unlimited permission to copy and/or distribute it,
9759
# with or without modifications, as long as this notice is preserved.
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9760
9761
# serial 1
9762
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9763
# AM_SILENT_RULES([DEFAULT])
9764
# --------------------------
9765
# Enable less verbose build rules; with the default set to DEFAULT
9766
# (`yes' being less verbose, `no' or empty being verbose).
9767
AC_DEFUN([AM_SILENT_RULES],
9768
[AC_ARG_ENABLE([silent-rules],
9769
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
9770
  --disable-silent-rules         verbose build output (undo: `make V=0')])
9771
case $enable_silent_rules in
9772
yes) AM_DEFAULT_VERBOSITY=0;;
9773
no)  AM_DEFAULT_VERBOSITY=1;;
9774
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9775
esac
9776
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9777
AM_BACKSLASH='\'
9778
AC_SUBST([AM_BACKSLASH])dnl
9779
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9780
])
9781
9782
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9783
#
9784
# This file is free software; the Free Software Foundation
9785
# gives unlimited permission to copy and/or distribute it,
9786
# with or without modifications, as long as this notice is preserved.
9787
9788
# AM_PROG_INSTALL_STRIP
9789
# ---------------------
9790
# One issue with vendor `install' (even GNU) is that you can't
9791
# specify the program used to strip binaries.  This is especially
9792
# annoying in cross-compiling environments, where the build's strip
9793
# is unlikely to handle the host's binaries.
9794
# Fortunately install-sh will honor a STRIPPROG variable, so we
9795
# always use install-sh in `make install-strip', and initialize
9796
# STRIPPROG with the value of the STRIP variable (set by the user).
9797
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9798
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9799
# Installed binaries are usually stripped using `strip' when the user
9800
# run `make install-strip'.  However `strip' might not be the right
9801
# tool to use in cross-compilation environments, therefore Automake
9802
# will honor the `STRIP' environment variable to overrule this program.
9803
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9804
if test "$cross_compiling" != no; then
9805
  AC_CHECK_TOOL([STRIP], [strip], :)
9806
fi
9807
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9808
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9809
9810
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9811
#
9812
# This file is free software; the Free Software Foundation
9813
# gives unlimited permission to copy and/or distribute it,
9814
# with or without modifications, as long as this notice is preserved.
9815
9816
# serial 2
9817
9818
# _AM_SUBST_NOTMAKE(VARIABLE)
9819
# ---------------------------
9820
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9821
# This macro is traced by Automake.
9822
AC_DEFUN([_AM_SUBST_NOTMAKE])
9823
9824
# AM_SUBST_NOTMAKE(VARIABLE)
9825
# ---------------------------
9826
# Public sister of _AM_SUBST_NOTMAKE.
9827
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9828
9829
# Check how to create a tarball.                            -*- Autoconf -*-
9830
9831
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9832
#
9833
# This file is free software; the Free Software Foundation
9834
# gives unlimited permission to copy and/or distribute it,
9835
# with or without modifications, as long as this notice is preserved.
9836
9837
# serial 2
9838
9839
# _AM_PROG_TAR(FORMAT)
9840
# --------------------
9841
# Check how to create a tarball in format FORMAT.
9842
# FORMAT should be one of `v7', `ustar', or `pax'.
9843
#
9844
# Substitute a variable $(am__tar) that is a command
9845
# writing to stdout a FORMAT-tarball containing the directory
9846
# $tardir.
9847
#     tardir=directory && $(am__tar) > result.tar
9848
#
9849
# Substitute a variable $(am__untar) that extract such
9850
# a tarball read from stdin.
9851
#     $(am__untar) < result.tar
9852
AC_DEFUN([_AM_PROG_TAR],
9853
[# Always define AMTAR for backward compatibility.
9854
AM_MISSING_PROG([AMTAR], [tar])
9855
m4_if([$1], [v7],
9856
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9857
     [m4_case([$1], [ustar],, [pax],,
9858
              [m4_fatal([Unknown tar format])])
9859
AC_MSG_CHECKING([how to create a $1 tar archive])
9860
# Loop over all known methods to create a tar archive until one works.
9861
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9862
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9863
# Do not fold the above two line into one, because Tru64 sh and
9864
# Solaris sh will not grok spaces in the rhs of `-'.
9865
for _am_tool in $_am_tools
9866
do
9867
  case $_am_tool in
9868
  gnutar)
9869
    for _am_tar in tar gnutar gtar;
9870
    do
9871
      AM_RUN_LOG([$_am_tar --version]) && break
9872
    done
9873
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9874
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9875
    am__untar="$_am_tar -xf -"
9876
    ;;
9877
  plaintar)
9878
    # Must skip GNU tar: if it does not support --format= it doesn't create
9879
    # ustar tarball either.
9880
    (tar --version) >/dev/null 2>&1 && continue
9881
    am__tar='tar chf - "$$tardir"'
9882
    am__tar_='tar chf - "$tardir"'
9883
    am__untar='tar xf -'
9884
    ;;
9885
  pax)
9886
    am__tar='pax -L -x $1 -w "$$tardir"'
9887
    am__tar_='pax -L -x $1 -w "$tardir"'
9888
    am__untar='pax -r'
9889
    ;;
9890
  cpio)
9891
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9892
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9893
    am__untar='cpio -i -H $1 -d'
9894
    ;;
9895
  none)
9896
    am__tar=false
9897
    am__tar_=false
9898
    am__untar=false
9899
    ;;
9900
  esac
9901
9902
  # If the value was cached, stop now.  We just wanted to have am__tar
9903
  # and am__untar set.
9904
  test -n "${am_cv_prog_tar_$1}" && break
9905
9906
  # tar/untar a dummy directory, and stop if the command works
9907
  rm -rf conftest.dir
9908
  mkdir conftest.dir
9909
  echo GrepMe > conftest.dir/file
9910
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9911
  rm -rf conftest.dir
9912
  if test -s conftest.tar; then
9913
    AM_RUN_LOG([$am__untar <conftest.tar])
9914
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1.1.21 by Sebastien Bacher
Import upstream version 2.10.12
9915
  fi
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9916
done
9917
rm -rf conftest.dir
9918
9919
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9920
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9921
AC_SUBST([am__tar])
9922
AC_SUBST([am__untar])
9923
]) # _AM_PROG_TAR
9924
1.7.3 by Sebastian Dröge
Import upstream version 2.19.2
9925
m4_include([m4/introspection.m4])
1.3.2 by Sebastian Dröge
Import upstream version 2.17.11
9926
m4_include([acinclude.m4])