~kelemeng/libubuntuone/bug786632

37.1.5 by Ken VanDine
Import upstream version 0.2.100
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
37 by Ken VanDine
Import upstream version 0.2.1
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
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
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
37.1.12 by Rodrigo Moya
Import upstream version 0.3.4
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17
[m4_warning([this file was generated for autoconf 2.67.
37 by Ken VanDine
Import upstream version 0.2.1
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
37.1.3 by Ken VanDine
Import upstream version 0.2.91
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24
#
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License.  As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
30
#
31
# This file can be copied and used freely without restrictions.  It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
34
#
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37
#
38
# Modified to never use included libintl. 
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40
#
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43
#
44
# Added better handling of ALL_LINGUAS from GNU gettext version 
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46
#
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49
#
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
53
AC_PREREQ(2.53)
54
55
dnl
56
dnl We go to great lengths to make sure that aclocal won't 
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
59
dnl
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
62
dnl
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
65
dnl
66
67
# GLIB_LC_MESSAGES
68
#--------------------
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
  [AC_CHECK_HEADERS([locale.h])
71
    if test $ac_cv_header_locale_h = yes; then
72
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
    if test $am_cv_val_LC_MESSAGES = yes; then
76
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
        [Define if your <locale.h> file defines LC_MESSAGES.])
78
    fi
79
  fi])
80
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
90
[case "[$]$1" in
91
  /*)
92
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93
  ;;
94
  *)
95
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
    test -z "$ac_dir" && ac_dir=.
98
    if test -f $ac_dir/$ac_word; then
99
      if [$3]; then
100
	ac_cv_path_$1="$ac_dir/$ac_word"
101
	break
102
      fi
103
    fi
104
  done
105
  IFS="$ac_save_ifs"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109
])dnl
110
  ;;
111
esac])dnl
112
$1="$ac_cv_path_$1"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114
  AC_MSG_RESULT([$]$1)
115
else
116
  AC_MSG_RESULT(no)
117
fi
118
AC_SUBST($1)dnl
119
])
120
121
# GLIB_WITH_NLS
122
#-----------------
123
glib_DEFUN([GLIB_WITH_NLS],
124
  dnl NLS is obligatory
125
  [USE_NLS=yes
126
    AC_SUBST(USE_NLS)
127
128
    gt_cv_have_gettext=no
129
130
    CATOBJEXT=NONE
131
    XGETTEXT=:
132
    INTLLIBS=
133
134
    AC_CHECK_HEADER(libintl.h,
135
     [gt_cv_func_dgettext_libintl="no"
136
      libintl_extra_libs=""
137
138
      #
139
      # First check in libc
140
      #
141
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142
        [AC_TRY_LINK([
143
#include <libintl.h>
144
],
145
         [return !ngettext ("","", 1)],
146
	  gt_cv_func_ngettext_libc=yes,
147
          gt_cv_func_ngettext_libc=no)
148
        ])
149
  
150
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152
        	[AC_TRY_LINK([
153
#include <libintl.h>
154
],
155
	          [return !dgettext ("","")],
156
		  gt_cv_func_dgettext_libc=yes,
157
	          gt_cv_func_dgettext_libc=no)
158
        	])
159
      fi
160
  
161
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
        AC_CHECK_FUNCS(bind_textdomain_codeset)
163
      fi
164
165
      #
166
      # If we don't have everything we want, check in libintl
167
      #
168
      if test "$gt_cv_func_dgettext_libc" != "yes" \
169
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
170
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171
        
172
        AC_CHECK_LIB(intl, bindtextdomain,
173
	    [AC_CHECK_LIB(intl, ngettext,
174
		    [AC_CHECK_LIB(intl, dgettext,
175
			          gt_cv_func_dgettext_libintl=yes)])])
176
177
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
179
	  AC_MSG_RESULT([])
180
  	  AC_CHECK_LIB(intl, ngettext,
181
          	[AC_CHECK_LIB(intl, dcgettext,
182
		       [gt_cv_func_dgettext_libintl=yes
183
			libintl_extra_libs=-liconv],
184
			:,-liconv)],
185
		:,-liconv)
186
        fi
187
188
        #
189
        # If we found libintl, then check in it for bind_textdomain_codeset();
190
        # we'll prefer libc if neither have bind_textdomain_codeset(),
191
        # and both have dgettext and ngettext
192
        #
193
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
          glib_save_LIBS="$LIBS"
195
          LIBS="$LIBS -lintl $libintl_extra_libs"
196
          unset ac_cv_func_bind_textdomain_codeset
197
          AC_CHECK_FUNCS(bind_textdomain_codeset)
198
          LIBS="$glib_save_LIBS"
199
200
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
            gt_cv_func_dgettext_libc=no
202
          else
203
            if test "$gt_cv_func_dgettext_libc" = "yes" \
204
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
              gt_cv_func_dgettext_libintl=no
206
            fi
207
          fi
208
        fi
209
      fi
210
211
      if test "$gt_cv_func_dgettext_libc" = "yes" \
212
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
        gt_cv_have_gettext=yes
214
      fi
215
  
216
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
        INTLLIBS="-lintl $libintl_extra_libs"
218
      fi
219
  
220
      if test "$gt_cv_have_gettext" = "yes"; then
221
	AC_DEFINE(HAVE_GETTEXT,1,
222
	  [Define if the GNU gettext() function is already present or preinstalled.])
223
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
	if test "$MSGFMT" != "no"; then
226
          glib_save_LIBS="$LIBS"
227
          LIBS="$LIBS $INTLLIBS"
228
	  AC_CHECK_FUNCS(dcgettext)
229
	  MSGFMT_OPTS=
230
	  AC_MSG_CHECKING([if msgfmt accepts -c])
231
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232
msgid ""
233
msgstr ""
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
	  AC_SUBST(MSGFMT_OPTS)
243
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
			 return _nl_msg_cat_cntr],
248
	    [CATOBJEXT=.gmo 
249
             DATADIRNAME=share],
250
	    [case $host in
251
	    *-*-solaris*)
252
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
253
	    dnl GNU format message catalog is always supported,
254
            dnl since both are added to the libc all together.
255
	    dnl Hence, we'd like to go with DATADIRNAME=share and
256
	    dnl and CATOBJEXT=.gmo in this case.
257
            AC_CHECK_FUNC(bind_textdomain_codeset,
258
	      [CATOBJEXT=.gmo 
259
               DATADIRNAME=share],
260
	      [CATOBJEXT=.mo
261
               DATADIRNAME=lib])
262
	    ;;
263
	    *)
264
	    CATOBJEXT=.mo
265
            DATADIRNAME=lib
266
	    ;;
267
	    esac])
268
          LIBS="$glib_save_LIBS"
269
	  INSTOBJEXT=.mo
270
	else
271
	  gt_cv_have_gettext=no
272
	fi
273
      fi
274
    ])
275
276
    if test "$gt_cv_have_gettext" = "yes" ; then
277
      AC_DEFINE(ENABLE_NLS, 1,
278
        [always defined to indicate that i18n is enabled])
279
    fi
280
281
    dnl Test whether we really found GNU xgettext.
282
    if test "$XGETTEXT" != ":"; then
283
      dnl If it is not GNU xgettext we define it as : so that the
284
      dnl Makefiles still can work.
285
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286
        : ;
287
      else
288
        AC_MSG_RESULT(
289
	  [found xgettext program is not GNU xgettext; ignore it])
290
        XGETTEXT=":"
291
      fi
292
    fi
293
294
    # We need to process the po/ directory.
295
    POSUB=po
296
297
    AC_OUTPUT_COMMANDS(
298
      [case "$CONFIG_FILES" in *po/Makefile.in*)
299
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300
      esac])
301
302
    dnl These rules are solely for the distribution goal.  While doing this
303
    dnl we only have to keep exactly one list of the available catalogs
37.1.12 by Rodrigo Moya
Import upstream version 0.3.4
304
    dnl in configure.ac.
37.1.3 by Ken VanDine
Import upstream version 0.2.91
305
    for lang in $ALL_LINGUAS; do
306
      GMOFILES="$GMOFILES $lang.gmo"
307
      POFILES="$POFILES $lang.po"
308
    done
309
310
    dnl Make all variables we use known to autoconf.
311
    AC_SUBST(CATALOGS)
312
    AC_SUBST(CATOBJEXT)
313
    AC_SUBST(DATADIRNAME)
314
    AC_SUBST(GMOFILES)
315
    AC_SUBST(INSTOBJEXT)
316
    AC_SUBST(INTLLIBS)
317
    AC_SUBST(PO_IN_DATADIR_TRUE)
318
    AC_SUBST(PO_IN_DATADIR_FALSE)
319
    AC_SUBST(POFILES)
320
    AC_SUBST(POSUB)
321
  ])
322
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation 
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by 
331
# glib-gettextize.
332
dnl
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
  [AC_REQUIRE([AC_PROG_CC])dnl
335
   AC_REQUIRE([AC_HEADER_STDC])dnl
336
   
337
   GLIB_LC_MESSAGES
338
   GLIB_WITH_NLS
339
340
   if test "$gt_cv_have_gettext" = "yes"; then
341
     if test "x$ALL_LINGUAS" = "x"; then
342
       LINGUAS=
343
     else
344
       AC_MSG_CHECKING(for catalogs to be installed)
345
       NEW_LINGUAS=
346
       for presentlang in $ALL_LINGUAS; do
347
         useit=no
348
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
           desiredlanguages="$LINGUAS"
350
         else
351
           desiredlanguages="$ALL_LINGUAS"
352
         fi
353
         for desiredlang in $desiredlanguages; do
354
 	   # Use the presentlang catalog if desiredlang is
355
           #   a. equal to presentlang, or
356
           #   b. a variant of presentlang (because in this case,
357
           #      presentlang can be used as a fallback for messages
358
           #      which are not translated in the desiredlang catalog).
359
           case "$desiredlang" in
360
             "$presentlang"*) useit=yes;;
361
           esac
362
         done
363
         if test $useit = yes; then
364
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365
         fi
366
       done
367
       LINGUAS=$NEW_LINGUAS
368
       AC_MSG_RESULT($LINGUAS)
369
     fi
370
371
     dnl Construct list of names of catalog files to be constructed.
372
     if test -n "$LINGUAS"; then
373
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374
     fi
375
   fi
376
377
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
   dnl Try to locate is.
380
   MKINSTALLDIRS=
381
   if test -n "$ac_aux_dir"; then
382
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383
   fi
384
   if test -z "$MKINSTALLDIRS"; then
385
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386
   fi
387
   AC_SUBST(MKINSTALLDIRS)
388
389
   dnl Generate list of files to be processed by xgettext which will
390
   dnl be included in po/Makefile.
391
   test -d po || mkdir po
392
   if test "x$srcdir" != "x."; then
393
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
       posrcprefix="$srcdir/"
395
     else
396
       posrcprefix="../$srcdir/"
397
     fi
398
   else
399
     posrcprefix="../"
400
   fi
401
   rm -f po/POTFILES
402
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
	< $srcdir/po/POTFILES.in > po/POTFILES
404
  ])
405
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
  localedir=`eval echo "${libdir}/locale"`
420
else
421
  localedir=`eval echo "${datadir}/locale"`
422
fi
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
  [Define the location where the catalogs will be installed])
428
])
429
430
dnl
431
dnl Now the definitions that aclocal will find
432
dnl
37.1.12 by Rodrigo Moya
Import upstream version 0.3.4
433
ifdef(glib_configure_ac,[],[
37.1.3 by Ken VanDine
Import upstream version 0.2.91
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436
])dnl
437
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
# 
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
445
$2
446
_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
  m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452
fi])
453
454
455
dnl -*- mode: autoconf -*-
456
457
# serial 1
458
459
dnl Usage:
460
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
461
AC_DEFUN([GTK_DOC_CHECK],
462
[
463
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
464
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
37.1.8 by Ken VanDine
Import upstream version 0.3.0
465
466
  dnl check for tools we added during development
467
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
468
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
469
  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
470
37.1.3 by Ken VanDine
Import upstream version 0.2.91
471
  dnl for overriding the documentation installation directory
472
  AC_ARG_WITH([html-dir],
473
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
474
    [with_html_dir='${datadir}/gtk-doc/html'])
475
  HTML_DIR="$with_html_dir"
476
  AC_SUBST([HTML_DIR])
477
478
  dnl enable/disable documentation building
479
  AC_ARG_ENABLE([gtk-doc],
480
    AS_HELP_STRING([--enable-gtk-doc],
481
                   [use gtk-doc to build documentation [[default=no]]]),,
482
    [enable_gtk_doc=no])
483
484
  if test x$enable_gtk_doc = xyes; then
485
    ifelse([$1],[],
486
      [PKG_CHECK_EXISTS([gtk-doc],,
487
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
488
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
37.1.8 by Ken VanDine
Import upstream version 0.3.0
489
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
37.1.3 by Ken VanDine
Import upstream version 0.2.91
490
  fi
491
492
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
493
  AC_MSG_RESULT($enable_gtk_doc)
494
37.1.8 by Ken VanDine
Import upstream version 0.3.0
495
  dnl enable/disable output formats
496
  AC_ARG_ENABLE([gtk-doc-html],
497
    AS_HELP_STRING([--enable-gtk-doc-html],
498
                   [build documentation in html format [[default=yes]]]),,
499
    [enable_gtk_doc_html=yes])
500
    AC_ARG_ENABLE([gtk-doc-pdf],
501
      AS_HELP_STRING([--enable-gtk-doc-pdf],
502
                     [build documentation in pdf format [[default=no]]]),,
503
      [enable_gtk_doc_pdf=no])
504
505
  if test -z "$GTKDOC_MKPDF"; then
506
    enable_gtk_doc_pdf=no
507
  fi
508
37.1.3 by Ken VanDine
Import upstream version 0.2.91
509
510
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
37.1.8 by Ken VanDine
Import upstream version 0.3.0
511
  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
512
  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
37.1.3 by Ken VanDine
Import upstream version 0.2.91
513
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
37.1.8 by Ken VanDine
Import upstream version 0.3.0
514
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
37.1.3 by Ken VanDine
Import upstream version 0.2.91
515
])
516
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
517
dnl -*- mode: autoconf -*-
518
dnl Copyright 2009 Johan Dahlin
519
dnl
520
dnl This file is free software; the author(s) gives unlimited
521
dnl permission to copy and/or distribute it, with or without
522
dnl modifications, as long as this notice is preserved.
523
dnl
524
525
# serial 1
526
527
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
528
[
529
    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
530
    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
531
    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
532
533
    dnl enable/disable introspection
534
    m4_if([$2], [require],
535
    [dnl
536
        enable_introspection=yes
537
    ],[dnl
538
        AC_ARG_ENABLE(introspection,
539
                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
540
                                 [Enable introspection for this build]),, 
541
                                 [enable_introspection=auto])
542
    ])dnl
543
544
    AC_MSG_CHECKING([for gobject-introspection])
545
546
    dnl presence/version checking
547
    AS_CASE([$enable_introspection],
548
    [no], [dnl
549
        found_introspection="no (disabled, use --enable-introspection to enable)"
550
    ],dnl
551
    [yes],[dnl
552
        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
553
                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
554
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
555
                         found_introspection=yes,
556
                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
557
    ],dnl
558
    [auto],[dnl
559
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
560
    ],dnl
561
    [dnl	
562
        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
563
    ])dnl
564
565
    AC_MSG_RESULT([$found_introspection])
566
567
    INTROSPECTION_SCANNER=
568
    INTROSPECTION_COMPILER=
569
    INTROSPECTION_GENERATE=
570
    INTROSPECTION_GIRDIR=
571
    INTROSPECTION_TYPELIBDIR=
572
    if test "x$found_introspection" = "xyes"; then
573
       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
574
       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
575
       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
576
       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
577
       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
578
       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
579
       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
580
       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
581
    fi
582
    AC_SUBST(INTROSPECTION_SCANNER)
583
    AC_SUBST(INTROSPECTION_COMPILER)
584
    AC_SUBST(INTROSPECTION_GENERATE)
585
    AC_SUBST(INTROSPECTION_GIRDIR)
586
    AC_SUBST(INTROSPECTION_TYPELIBDIR)
587
    AC_SUBST(INTROSPECTION_CFLAGS)
588
    AC_SUBST(INTROSPECTION_LIBS)
589
    AC_SUBST(INTROSPECTION_MAKEFILE)
590
591
    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
592
])
593
594
595
dnl Usage:
596
dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
597
598
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
599
[
600
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
601
])
602
603
dnl Usage:
604
dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
605
606
607
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
608
[
609
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
610
])
611
37 by Ken VanDine
Import upstream version 0.2.1
612
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
613
#
614
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
615
#                 2006, 2007, 2008 Free Software Foundation, Inc.
616
#   Written by Gordon Matzigkeit, 1996
617
#
618
# This file is free software; the Free Software Foundation gives
619
# unlimited permission to copy and/or distribute it, with or without
620
# modifications, as long as this notice is preserved.
621
622
m4_define([_LT_COPYING], [dnl
623
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
624
#                 2006, 2007, 2008 Free Software Foundation, Inc.
625
#   Written by Gordon Matzigkeit, 1996
626
#
627
#   This file is part of GNU Libtool.
628
#
629
# GNU Libtool is free software; you can redistribute it and/or
630
# modify it under the terms of the GNU General Public License as
631
# published by the Free Software Foundation; either version 2 of
632
# the License, or (at your option) any later version.
633
#
634
# As a special exception to the GNU General Public License,
635
# if you distribute this file as part of a program or library that
636
# is built using GNU Libtool, you may include this file under the
637
# same distribution terms that you use for the rest of that program.
638
#
639
# GNU Libtool is distributed in the hope that it will be useful,
640
# but WITHOUT ANY WARRANTY; without even the implied warranty of
641
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
642
# GNU General Public License for more details.
643
#
644
# You should have received a copy of the GNU General Public License
645
# along with GNU Libtool; see the file COPYING.  If not, a copy
646
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
647
# obtained by writing to the Free Software Foundation, Inc.,
648
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
649
])
650
651
# serial 56 LT_INIT
652
653
654
# LT_PREREQ(VERSION)
655
# ------------------
656
# Complain and exit if this libtool version is less that VERSION.
657
m4_defun([LT_PREREQ],
658
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
659
       [m4_default([$3],
660
		   [m4_fatal([Libtool version $1 or higher is required],
661
		             63)])],
662
       [$2])])
663
664
665
# _LT_CHECK_BUILDDIR
666
# ------------------
667
# Complain if the absolute build directory name contains unusual characters
668
m4_defun([_LT_CHECK_BUILDDIR],
669
[case `pwd` in
670
  *\ * | *\	*)
671
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
672
esac
673
])
674
675
676
# LT_INIT([OPTIONS])
677
# ------------------
678
AC_DEFUN([LT_INIT],
679
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
680
AC_BEFORE([$0], [LT_LANG])dnl
681
AC_BEFORE([$0], [LT_OUTPUT])dnl
682
AC_BEFORE([$0], [LTDL_INIT])dnl
683
m4_require([_LT_CHECK_BUILDDIR])dnl
684
685
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
686
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
687
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
688
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
689
dnl unless we require an AC_DEFUNed macro:
690
AC_REQUIRE([LTOPTIONS_VERSION])dnl
691
AC_REQUIRE([LTSUGAR_VERSION])dnl
692
AC_REQUIRE([LTVERSION_VERSION])dnl
693
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
694
m4_require([_LT_PROG_LTMAIN])dnl
695
696
dnl Parse OPTIONS
697
_LT_SET_OPTIONS([$0], [$1])
698
699
# This can be used to rebuild libtool when needed
700
LIBTOOL_DEPS="$ltmain"
701
702
# Always use our own libtool.
703
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
704
AC_SUBST(LIBTOOL)dnl
705
706
_LT_SETUP
707
708
# Only expand once:
709
m4_define([LT_INIT])
710
])# LT_INIT
711
712
# Old names:
713
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
714
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
715
dnl aclocal-1.4 backwards compatibility:
716
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
717
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
718
719
720
# _LT_CC_BASENAME(CC)
721
# -------------------
722
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
723
m4_defun([_LT_CC_BASENAME],
724
[for cc_temp in $1""; do
725
  case $cc_temp in
726
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
727
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
728
    \-*) ;;
729
    *) break;;
730
  esac
731
done
732
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
733
])
734
735
736
# _LT_FILEUTILS_DEFAULTS
737
# ----------------------
738
# It is okay to use these file commands and assume they have been set
739
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
740
m4_defun([_LT_FILEUTILS_DEFAULTS],
741
[: ${CP="cp -f"}
742
: ${MV="mv -f"}
743
: ${RM="rm -f"}
744
])# _LT_FILEUTILS_DEFAULTS
745
746
747
# _LT_SETUP
748
# ---------
749
m4_defun([_LT_SETUP],
750
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
751
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
752
_LT_DECL([], [host_alias], [0], [The host system])dnl
753
_LT_DECL([], [host], [0])dnl
754
_LT_DECL([], [host_os], [0])dnl
755
dnl
756
_LT_DECL([], [build_alias], [0], [The build system])dnl
757
_LT_DECL([], [build], [0])dnl
758
_LT_DECL([], [build_os], [0])dnl
759
dnl
760
AC_REQUIRE([AC_PROG_CC])dnl
761
AC_REQUIRE([LT_PATH_LD])dnl
762
AC_REQUIRE([LT_PATH_NM])dnl
763
dnl
764
AC_REQUIRE([AC_PROG_LN_S])dnl
765
test -z "$LN_S" && LN_S="ln -s"
766
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
767
dnl
768
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
769
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
770
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
771
dnl
772
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
773
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
774
m4_require([_LT_CMD_RELOAD])dnl
775
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
776
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
777
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
778
779
_LT_CONFIG_LIBTOOL_INIT([
780
# See if we are running on zsh, and set the options which allow our
781
# commands through without removal of \ escapes INIT.
782
if test -n "\${ZSH_VERSION+set}" ; then
783
   setopt NO_GLOB_SUBST
784
fi
785
])
786
if test -n "${ZSH_VERSION+set}" ; then
787
   setopt NO_GLOB_SUBST
788
fi
789
790
_LT_CHECK_OBJDIR
791
792
m4_require([_LT_TAG_COMPILER])dnl
793
_LT_PROG_ECHO_BACKSLASH
794
795
case $host_os in
796
aix3*)
797
  # AIX sometimes has problems with the GCC collect2 program.  For some
798
  # reason, if we set the COLLECT_NAMES environment variable, the problems
799
  # vanish in a puff of smoke.
800
  if test "X${COLLECT_NAMES+set}" != Xset; then
801
    COLLECT_NAMES=
802
    export COLLECT_NAMES
803
  fi
804
  ;;
805
esac
806
807
# Sed substitution that helps us do robust quoting.  It backslashifies
808
# metacharacters that are still active within double-quoted strings.
809
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
810
811
# Same as above, but do not quote variable references.
812
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
813
814
# Sed substitution to delay expansion of an escaped shell variable in a
815
# double_quote_subst'ed string.
816
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
817
818
# Sed substitution to delay expansion of an escaped single quote.
819
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
820
821
# Sed substitution to avoid accidental globbing in evaled expressions
822
no_glob_subst='s/\*/\\\*/g'
823
824
# Global variables:
825
ofile=libtool
826
can_build_shared=yes
827
828
# All known linkers require a `.a' archive for static linking (except MSVC,
829
# which needs '.lib').
830
libext=a
831
832
with_gnu_ld="$lt_cv_prog_gnu_ld"
833
834
old_CC="$CC"
835
old_CFLAGS="$CFLAGS"
836
837
# Set sane defaults for various variables
838
test -z "$CC" && CC=cc
839
test -z "$LTCC" && LTCC=$CC
840
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
841
test -z "$LD" && LD=ld
842
test -z "$ac_objext" && ac_objext=o
843
844
_LT_CC_BASENAME([$compiler])
845
846
# Only perform the check for file, if the check method requires it
847
test -z "$MAGIC_CMD" && MAGIC_CMD=file
848
case $deplibs_check_method in
849
file_magic*)
850
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
851
    _LT_PATH_MAGIC
852
  fi
853
  ;;
854
esac
855
856
# Use C for the default configuration in the libtool script
857
LT_SUPPORTED_TAG([CC])
858
_LT_LANG_C_CONFIG
859
_LT_LANG_DEFAULT_CONFIG
860
_LT_CONFIG_COMMANDS
861
])# _LT_SETUP
862
863
864
# _LT_PROG_LTMAIN
865
# ---------------
866
# Note that this code is called both from `configure', and `config.status'
867
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
868
# `config.status' has no value for ac_aux_dir unless we are using Automake,
869
# so we pass a copy along to make sure it has a sensible value anyway.
870
m4_defun([_LT_PROG_LTMAIN],
871
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
872
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
873
ltmain="$ac_aux_dir/ltmain.sh"
874
])# _LT_PROG_LTMAIN
875
876
877
878
# So that we can recreate a full libtool script including additional
879
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
880
# in macros and then make a single call at the end using the `libtool'
881
# label.
882
883
884
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
885
# ----------------------------------------
886
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
887
m4_define([_LT_CONFIG_LIBTOOL_INIT],
888
[m4_ifval([$1],
889
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
890
                     [$1
891
])])])
892
893
# Initialize.
894
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
895
896
897
# _LT_CONFIG_LIBTOOL([COMMANDS])
898
# ------------------------------
899
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
900
m4_define([_LT_CONFIG_LIBTOOL],
901
[m4_ifval([$1],
902
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
903
                     [$1
904
])])])
905
906
# Initialize.
907
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
908
909
910
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
911
# -----------------------------------------------------
912
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
913
[_LT_CONFIG_LIBTOOL([$1])
914
_LT_CONFIG_LIBTOOL_INIT([$2])
915
])
916
917
918
# _LT_FORMAT_COMMENT([COMMENT])
919
# -----------------------------
920
# Add leading comment marks to the start of each line, and a trailing
921
# full-stop to the whole comment if one is not present already.
922
m4_define([_LT_FORMAT_COMMENT],
923
[m4_ifval([$1], [
924
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
925
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
926
)])
927
928
929
930
931
932
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
933
# -------------------------------------------------------------------
934
# CONFIGNAME is the name given to the value in the libtool script.
935
# VARNAME is the (base) name used in the configure script.
936
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
937
# VARNAME.  Any other value will be used directly.
938
m4_define([_LT_DECL],
939
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
940
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
941
	[m4_ifval([$1], [$1], [$2])])
942
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
943
    m4_ifval([$4],
944
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
945
    lt_dict_add_subkey([lt_decl_dict], [$2],
946
	[tagged?], [m4_ifval([$5], [yes], [no])])])
947
])
948
949
950
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
951
# --------------------------------------------------------
952
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
953
954
955
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
956
# ------------------------------------------------
957
m4_define([lt_decl_tag_varnames],
958
[_lt_decl_filter([tagged?], [yes], $@)])
959
960
961
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
962
# ---------------------------------------------------------
963
m4_define([_lt_decl_filter],
964
[m4_case([$#],
965
  [0], [m4_fatal([$0: too few arguments: $#])],
966
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
967
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
968
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
969
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
970
])
971
972
973
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
974
# --------------------------------------------------
975
m4_define([lt_decl_quote_varnames],
976
[_lt_decl_filter([value], [1], $@)])
977
978
979
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
980
# ---------------------------------------------------
981
m4_define([lt_decl_dquote_varnames],
982
[_lt_decl_filter([value], [2], $@)])
983
984
985
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
986
# ---------------------------------------------------
987
m4_define([lt_decl_varnames_tagged],
988
[m4_assert([$# <= 2])dnl
989
_$0(m4_quote(m4_default([$1], [[, ]])),
990
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
991
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
992
m4_define([_lt_decl_varnames_tagged],
993
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
994
995
996
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
997
# ------------------------------------------------
998
m4_define([lt_decl_all_varnames],
999
[_$0(m4_quote(m4_default([$1], [[, ]])),
1000
     m4_if([$2], [],
1001
	   m4_quote(lt_decl_varnames),
1002
	m4_quote(m4_shift($@))))[]dnl
1003
])
1004
m4_define([_lt_decl_all_varnames],
1005
[lt_join($@, lt_decl_varnames_tagged([$1],
1006
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1007
])
1008
1009
1010
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1011
# ------------------------------------
1012
# Quote a variable value, and forward it to `config.status' so that its
1013
# declaration there will have the same value as in `configure'.  VARNAME
1014
# must have a single quote delimited value for this to work.
1015
m4_define([_LT_CONFIG_STATUS_DECLARE],
1016
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1017
1018
1019
# _LT_CONFIG_STATUS_DECLARATIONS
1020
# ------------------------------
1021
# We delimit libtool config variables with single quotes, so when
1022
# we write them to config.status, we have to be sure to quote all
1023
# embedded single quotes properly.  In configure, this macro expands
1024
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1025
#
1026
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1027
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1028
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1029
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1030
1031
1032
# _LT_LIBTOOL_TAGS
1033
# ----------------
1034
# Output comment and list of tags supported by the script
1035
m4_defun([_LT_LIBTOOL_TAGS],
1036
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1037
available_tags="_LT_TAGS"dnl
1038
])
1039
1040
1041
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1042
# -----------------------------------
1043
# Extract the dictionary values for VARNAME (optionally with TAG) and
1044
# expand to a commented shell variable setting:
1045
#
1046
#    # Some comment about what VAR is for.
1047
#    visible_name=$lt_internal_name
1048
m4_define([_LT_LIBTOOL_DECLARE],
1049
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1050
					   [description])))[]dnl
1051
m4_pushdef([_libtool_name],
1052
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1053
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1054
    [0], [_libtool_name=[$]$1],
1055
    [1], [_libtool_name=$lt_[]$1],
1056
    [2], [_libtool_name=$lt_[]$1],
1057
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1058
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1059
])
1060
1061
1062
# _LT_LIBTOOL_CONFIG_VARS
1063
# -----------------------
1064
# Produce commented declarations of non-tagged libtool config variables
1065
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1066
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1067
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1068
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1069
[m4_foreach([_lt_var],
1070
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1071
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1072
1073
1074
# _LT_LIBTOOL_TAG_VARS(TAG)
1075
# -------------------------
1076
m4_define([_LT_LIBTOOL_TAG_VARS],
1077
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1078
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1079
1080
1081
# _LT_TAGVAR(VARNAME, [TAGNAME])
1082
# ------------------------------
1083
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1084
1085
1086
# _LT_CONFIG_COMMANDS
1087
# -------------------
1088
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1089
# variables for single and double quote escaping we saved from calls
1090
# to _LT_DECL, we can put quote escaped variables declarations
1091
# into `config.status', and then the shell code to quote escape them in
1092
# for loops in `config.status'.  Finally, any additional code accumulated
1093
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1094
m4_defun([_LT_CONFIG_COMMANDS],
1095
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1096
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1097
	dnl instead of duplicating it all over again into config.status,
1098
	dnl then we will have config.status run $CONFIG_LT later, so it
1099
	dnl needs to know what name is stored there:
1100
        [AC_CONFIG_COMMANDS([libtool],
1101
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1102
    dnl If the libtool generation code is destined for config.status,
1103
    dnl expand the accumulated commands and init code now:
1104
    [AC_CONFIG_COMMANDS([libtool],
1105
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1106
])#_LT_CONFIG_COMMANDS
1107
1108
1109
# Initialize.
1110
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1111
[
1112
1113
# The HP-UX ksh and POSIX shell print the target directory to stdout
1114
# if CDPATH is set.
1115
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1116
1117
sed_quote_subst='$sed_quote_subst'
1118
double_quote_subst='$double_quote_subst'
1119
delay_variable_subst='$delay_variable_subst'
1120
_LT_CONFIG_STATUS_DECLARATIONS
1121
LTCC='$LTCC'
1122
LTCFLAGS='$LTCFLAGS'
1123
compiler='$compiler_DEFAULT'
1124
1125
# Quote evaled strings.
1126
for var in lt_decl_all_varnames([[ \
1127
]], lt_decl_quote_varnames); do
1128
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1129
    *[[\\\\\\\`\\"\\\$]]*)
1130
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1131
      ;;
1132
    *)
1133
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1134
      ;;
1135
    esac
1136
done
1137
1138
# Double-quote double-evaled strings.
1139
for var in lt_decl_all_varnames([[ \
1140
]], lt_decl_dquote_varnames); do
1141
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1142
    *[[\\\\\\\`\\"\\\$]]*)
1143
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1144
      ;;
1145
    *)
1146
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1147
      ;;
1148
    esac
1149
done
1150
1151
# Fix-up fallback echo if it was mangled by the above quoting rules.
1152
case \$lt_ECHO in
1153
*'\\\[$]0 --fallback-echo"')dnl "
1154
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1155
  ;;
1156
esac
1157
1158
_LT_OUTPUT_LIBTOOL_INIT
1159
])
1160
1161
1162
# LT_OUTPUT
1163
# ---------
1164
# This macro allows early generation of the libtool script (before
1165
# AC_OUTPUT is called), incase it is used in configure for compilation
1166
# tests.
1167
AC_DEFUN([LT_OUTPUT],
1168
[: ${CONFIG_LT=./config.lt}
1169
AC_MSG_NOTICE([creating $CONFIG_LT])
1170
cat >"$CONFIG_LT" <<_LTEOF
1171
#! $SHELL
1172
# Generated by $as_me.
1173
# Run this file to recreate a libtool stub with the current configuration.
1174
1175
lt_cl_silent=false
1176
SHELL=\${CONFIG_SHELL-$SHELL}
1177
_LTEOF
1178
1179
cat >>"$CONFIG_LT" <<\_LTEOF
1180
AS_SHELL_SANITIZE
1181
_AS_PREPARE
1182
1183
exec AS_MESSAGE_FD>&1
1184
exec AS_MESSAGE_LOG_FD>>config.log
1185
{
1186
  echo
1187
  AS_BOX([Running $as_me.])
1188
} >&AS_MESSAGE_LOG_FD
1189
1190
lt_cl_help="\
1191
\`$as_me' creates a local libtool stub from the current configuration,
1192
for use in further configure time tests before the real libtool is
1193
generated.
1194
1195
Usage: $[0] [[OPTIONS]]
1196
1197
  -h, --help      print this help, then exit
1198
  -V, --version   print version number, then exit
1199
  -q, --quiet     do not print progress messages
1200
  -d, --debug     don't remove temporary files
1201
1202
Report bugs to <bug-libtool@gnu.org>."
1203
1204
lt_cl_version="\
1205
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1206
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1207
configured by $[0], generated by m4_PACKAGE_STRING.
1208
1209
Copyright (C) 2008 Free Software Foundation, Inc.
1210
This config.lt script is free software; the Free Software Foundation
1211
gives unlimited permision to copy, distribute and modify it."
1212
1213
while test $[#] != 0
1214
do
1215
  case $[1] in
1216
    --version | --v* | -V )
1217
      echo "$lt_cl_version"; exit 0 ;;
1218
    --help | --h* | -h )
1219
      echo "$lt_cl_help"; exit 0 ;;
1220
    --debug | --d* | -d )
1221
      debug=: ;;
1222
    --quiet | --q* | --silent | --s* | -q )
1223
      lt_cl_silent=: ;;
1224
1225
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1226
Try \`$[0] --help' for more information.]) ;;
1227
1228
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1229
Try \`$[0] --help' for more information.]) ;;
1230
  esac
1231
  shift
1232
done
1233
1234
if $lt_cl_silent; then
1235
  exec AS_MESSAGE_FD>/dev/null
1236
fi
1237
_LTEOF
1238
1239
cat >>"$CONFIG_LT" <<_LTEOF
1240
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1241
_LTEOF
1242
1243
cat >>"$CONFIG_LT" <<\_LTEOF
1244
AC_MSG_NOTICE([creating $ofile])
1245
_LT_OUTPUT_LIBTOOL_COMMANDS
1246
AS_EXIT(0)
1247
_LTEOF
1248
chmod +x "$CONFIG_LT"
1249
1250
# configure is writing to config.log, but config.lt does its own redirection,
1251
# appending to config.log, which fails on DOS, as config.log is still kept
1252
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1253
# config.log, so it can be properly (re)opened and appended to by config.lt.
1254
if test "$no_create" != yes; then
1255
  lt_cl_success=:
1256
  test "$silent" = yes &&
1257
    lt_config_lt_args="$lt_config_lt_args --quiet"
1258
  exec AS_MESSAGE_LOG_FD>/dev/null
1259
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1260
  exec AS_MESSAGE_LOG_FD>>config.log
1261
  $lt_cl_success || AS_EXIT(1)
1262
fi
1263
])# LT_OUTPUT
1264
1265
1266
# _LT_CONFIG(TAG)
1267
# ---------------
1268
# If TAG is the built-in tag, create an initial libtool script with a
1269
# default configuration from the untagged config vars.  Otherwise add code
1270
# to config.status for appending the configuration named by TAG from the
1271
# matching tagged config vars.
1272
m4_defun([_LT_CONFIG],
1273
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1274
_LT_CONFIG_SAVE_COMMANDS([
1275
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1276
  m4_if(_LT_TAG, [C], [
1277
    # See if we are running on zsh, and set the options which allow our
1278
    # commands through without removal of \ escapes.
1279
    if test -n "${ZSH_VERSION+set}" ; then
1280
      setopt NO_GLOB_SUBST
1281
    fi
1282
1283
    cfgfile="${ofile}T"
1284
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1285
    $RM "$cfgfile"
1286
1287
    cat <<_LT_EOF >> "$cfgfile"
1288
#! $SHELL
1289
1290
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1291
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1292
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1293
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1294
#
1295
_LT_COPYING
1296
_LT_LIBTOOL_TAGS
1297
1298
# ### BEGIN LIBTOOL CONFIG
1299
_LT_LIBTOOL_CONFIG_VARS
1300
_LT_LIBTOOL_TAG_VARS
1301
# ### END LIBTOOL CONFIG
1302
1303
_LT_EOF
1304
1305
  case $host_os in
1306
  aix3*)
1307
    cat <<\_LT_EOF >> "$cfgfile"
1308
# AIX sometimes has problems with the GCC collect2 program.  For some
1309
# reason, if we set the COLLECT_NAMES environment variable, the problems
1310
# vanish in a puff of smoke.
1311
if test "X${COLLECT_NAMES+set}" != Xset; then
1312
  COLLECT_NAMES=
1313
  export COLLECT_NAMES
1314
fi
1315
_LT_EOF
1316
    ;;
1317
  esac
1318
1319
  _LT_PROG_LTMAIN
1320
1321
  # We use sed instead of cat because bash on DJGPP gets confused if
1322
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1323
  # text mode, it properly converts lines to CR/LF.  This bash problem
1324
  # is reportedly fixed, but why not run on old versions too?
1325
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1326
    || (rm -f "$cfgfile"; exit 1)
1327
1328
  _LT_PROG_XSI_SHELLFNS
1329
1330
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1331
    || (rm -f "$cfgfile"; exit 1)
1332
1333
  mv -f "$cfgfile" "$ofile" ||
1334
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1335
  chmod +x "$ofile"
1336
],
1337
[cat <<_LT_EOF >> "$ofile"
1338
1339
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1340
dnl in a comment (ie after a #).
1341
# ### BEGIN LIBTOOL TAG CONFIG: $1
1342
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1343
# ### END LIBTOOL TAG CONFIG: $1
1344
_LT_EOF
1345
])dnl /m4_if
1346
],
1347
[m4_if([$1], [], [
1348
    PACKAGE='$PACKAGE'
1349
    VERSION='$VERSION'
1350
    TIMESTAMP='$TIMESTAMP'
1351
    RM='$RM'
1352
    ofile='$ofile'], [])
1353
])dnl /_LT_CONFIG_SAVE_COMMANDS
1354
])# _LT_CONFIG
1355
1356
1357
# LT_SUPPORTED_TAG(TAG)
1358
# ---------------------
1359
# Trace this macro to discover what tags are supported by the libtool
1360
# --tag option, using:
1361
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1362
AC_DEFUN([LT_SUPPORTED_TAG], [])
1363
1364
1365
# C support is built-in for now
1366
m4_define([_LT_LANG_C_enabled], [])
1367
m4_define([_LT_TAGS], [])
1368
1369
1370
# LT_LANG(LANG)
1371
# -------------
1372
# Enable libtool support for the given language if not already enabled.
1373
AC_DEFUN([LT_LANG],
1374
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1375
m4_case([$1],
1376
  [C],			[_LT_LANG(C)],
1377
  [C++],		[_LT_LANG(CXX)],
1378
  [Java],		[_LT_LANG(GCJ)],
1379
  [Fortran 77],		[_LT_LANG(F77)],
1380
  [Fortran],		[_LT_LANG(FC)],
1381
  [Windows Resource],	[_LT_LANG(RC)],
1382
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1383
    [_LT_LANG($1)],
1384
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1385
])# LT_LANG
1386
1387
1388
# _LT_LANG(LANGNAME)
1389
# ------------------
1390
m4_defun([_LT_LANG],
1391
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1392
  [LT_SUPPORTED_TAG([$1])dnl
1393
  m4_append([_LT_TAGS], [$1 ])dnl
1394
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1395
  _LT_LANG_$1_CONFIG($1)])dnl
1396
])# _LT_LANG
1397
1398
1399
# _LT_LANG_DEFAULT_CONFIG
1400
# -----------------------
1401
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1402
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1403
  [LT_LANG(CXX)],
1404
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1405
1406
AC_PROVIDE_IFELSE([AC_PROG_F77],
1407
  [LT_LANG(F77)],
1408
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1409
1410
AC_PROVIDE_IFELSE([AC_PROG_FC],
1411
  [LT_LANG(FC)],
1412
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1413
1414
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1415
dnl pulling things in needlessly.
1416
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1417
  [LT_LANG(GCJ)],
1418
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1419
    [LT_LANG(GCJ)],
1420
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1421
      [LT_LANG(GCJ)],
1422
      [m4_ifdef([AC_PROG_GCJ],
1423
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1424
       m4_ifdef([A][M_PROG_GCJ],
1425
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1426
       m4_ifdef([LT_PROG_GCJ],
1427
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1428
1429
AC_PROVIDE_IFELSE([LT_PROG_RC],
1430
  [LT_LANG(RC)],
1431
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1432
])# _LT_LANG_DEFAULT_CONFIG
1433
1434
# Obsolete macros:
1435
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1436
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1437
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1438
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1439
dnl aclocal-1.4 backwards compatibility:
1440
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1441
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1442
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1443
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1444
1445
1446
# _LT_TAG_COMPILER
1447
# ----------------
1448
m4_defun([_LT_TAG_COMPILER],
1449
[AC_REQUIRE([AC_PROG_CC])dnl
1450
1451
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1452
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1453
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1454
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1455
1456
# If no C compiler was specified, use CC.
1457
LTCC=${LTCC-"$CC"}
1458
1459
# If no C compiler flags were specified, use CFLAGS.
1460
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1461
1462
# Allow CC to be a program name with arguments.
1463
compiler=$CC
1464
])# _LT_TAG_COMPILER
1465
1466
1467
# _LT_COMPILER_BOILERPLATE
1468
# ------------------------
1469
# Check for compiler boilerplate output or warnings with
1470
# the simple compiler test code.
1471
m4_defun([_LT_COMPILER_BOILERPLATE],
1472
[m4_require([_LT_DECL_SED])dnl
1473
ac_outfile=conftest.$ac_objext
1474
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1475
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1476
_lt_compiler_boilerplate=`cat conftest.err`
1477
$RM conftest*
1478
])# _LT_COMPILER_BOILERPLATE
1479
1480
1481
# _LT_LINKER_BOILERPLATE
1482
# ----------------------
1483
# Check for linker boilerplate output or warnings with
1484
# the simple link test code.
1485
m4_defun([_LT_LINKER_BOILERPLATE],
1486
[m4_require([_LT_DECL_SED])dnl
1487
ac_outfile=conftest.$ac_objext
1488
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1489
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1490
_lt_linker_boilerplate=`cat conftest.err`
1491
$RM -r conftest*
1492
])# _LT_LINKER_BOILERPLATE
1493
1494
# _LT_REQUIRED_DARWIN_CHECKS
1495
# -------------------------
1496
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1497
  case $host_os in
1498
    rhapsody* | darwin*)
1499
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1500
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1501
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1502
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1503
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1504
    _LT_DECL([], [DSYMUTIL], [1],
1505
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1506
    _LT_DECL([], [NMEDIT], [1],
1507
      [Tool to change global to local symbols on Mac OS X])
1508
    _LT_DECL([], [LIPO], [1],
1509
      [Tool to manipulate fat objects and archives on Mac OS X])
1510
    _LT_DECL([], [OTOOL], [1],
1511
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1512
    _LT_DECL([], [OTOOL64], [1],
1513
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1514
1515
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1516
      [lt_cv_apple_cc_single_mod=no
1517
      if test -z "${LT_MULTI_MODULE}"; then
1518
	# By default we will add the -single_module flag. You can override
1519
	# by either setting the environment variable LT_MULTI_MODULE
1520
	# non-empty at configure time, or by adding -multi_module to the
1521
	# link flags.
1522
	rm -rf libconftest.dylib*
1523
	echo "int foo(void){return 1;}" > conftest.c
1524
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1525
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1526
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1527
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1528
        _lt_result=$?
1529
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1530
	  lt_cv_apple_cc_single_mod=yes
1531
	else
1532
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1533
	fi
1534
	rm -rf libconftest.dylib*
1535
	rm -f conftest.*
1536
      fi])
1537
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1538
      [lt_cv_ld_exported_symbols_list],
1539
      [lt_cv_ld_exported_symbols_list=no
1540
      save_LDFLAGS=$LDFLAGS
1541
      echo "_main" > conftest.sym
1542
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1543
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1544
	[lt_cv_ld_exported_symbols_list=yes],
1545
	[lt_cv_ld_exported_symbols_list=no])
1546
	LDFLAGS="$save_LDFLAGS"
1547
    ])
1548
    case $host_os in
1549
    rhapsody* | darwin1.[[012]])
1550
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1551
    darwin1.*)
1552
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1553
    darwin*) # darwin 5.x on
1554
      # if running on 10.5 or later, the deployment target defaults
1555
      # to the OS version, if on x86, and 10.4, the deployment
1556
      # target defaults to 10.4. Don't you love it?
1557
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1558
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1559
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1560
	10.[[012]]*)
1561
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1562
	10.*)
1563
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1564
      esac
1565
    ;;
1566
  esac
1567
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1568
      _lt_dar_single_mod='$single_module'
1569
    fi
1570
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1571
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1572
    else
1573
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1574
    fi
1575
    if test "$DSYMUTIL" != ":"; then
1576
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1577
    else
1578
      _lt_dsymutil=
1579
    fi
1580
    ;;
1581
  esac
1582
])
1583
1584
1585
# _LT_DARWIN_LINKER_FEATURES
1586
# --------------------------
1587
# Checks for linker and compiler features on darwin
1588
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1589
[
1590
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1591
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1592
  _LT_TAGVAR(hardcode_direct, $1)=no
1593
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1594
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1595
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1596
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1597
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1598
  case $cc_basename in
1599
     ifort*) _lt_dar_can_shared=yes ;;
1600
     *) _lt_dar_can_shared=$GCC ;;
1601
  esac
1602
  if test "$_lt_dar_can_shared" = "yes"; then
1603
    output_verbose_link_cmd=echo
1604
    _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}"
1605
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1606
    _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}"
1607
    _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}"
1608
    m4_if([$1], [CXX],
1609
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1610
      _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}"
1611
      _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}"
1612
    fi
1613
],[])
1614
  else
1615
  _LT_TAGVAR(ld_shlibs, $1)=no
1616
  fi
1617
])
1618
1619
# _LT_SYS_MODULE_PATH_AIX
1620
# -----------------------
1621
# Links a minimal program and checks the executable
1622
# for the system default hardcoded library path. In most cases,
1623
# this is /usr/lib:/lib, but when the MPI compilers are used
1624
# the location of the communication and MPI libs are included too.
1625
# If we don't find anything, use the default library path according
1626
# to the aix ld manual.
1627
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1628
[m4_require([_LT_DECL_SED])dnl
1629
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1630
lt_aix_libpath_sed='
1631
    /Import File Strings/,/^$/ {
1632
	/^0/ {
1633
	    s/^0  *\(.*\)$/\1/
1634
	    p
1635
	}
1636
    }'
1637
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1638
# Check for a 64-bit object if we didn't find anything.
1639
if test -z "$aix_libpath"; then
1640
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1641
fi],[])
1642
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1643
])# _LT_SYS_MODULE_PATH_AIX
1644
1645
1646
# _LT_SHELL_INIT(ARG)
1647
# -------------------
1648
m4_define([_LT_SHELL_INIT],
1649
[ifdef([AC_DIVERSION_NOTICE],
1650
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1651
	 [AC_DIVERT_PUSH(NOTICE)])
1652
$1
1653
AC_DIVERT_POP
1654
])# _LT_SHELL_INIT
1655
1656
1657
# _LT_PROG_ECHO_BACKSLASH
1658
# -----------------------
1659
# Add some code to the start of the generated configure script which
1660
# will find an echo command which doesn't interpret backslashes.
1661
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1662
[_LT_SHELL_INIT([
1663
# Check that we are running under the correct shell.
1664
SHELL=${CONFIG_SHELL-/bin/sh}
1665
1666
case X$lt_ECHO in
1667
X*--fallback-echo)
1668
  # Remove one level of quotation (which was required for Make).
1669
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1670
  ;;
1671
esac
1672
1673
ECHO=${lt_ECHO-echo}
1674
if test "X[$]1" = X--no-reexec; then
1675
  # Discard the --no-reexec flag, and continue.
1676
  shift
1677
elif test "X[$]1" = X--fallback-echo; then
1678
  # Avoid inline document here, it may be left over
1679
  :
1680
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1681
  # Yippee, $ECHO works!
1682
  :
1683
else
1684
  # Restart under the correct shell.
1685
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1686
fi
1687
1688
if test "X[$]1" = X--fallback-echo; then
1689
  # used as fallback echo
1690
  shift
1691
  cat <<_LT_EOF
1692
[$]*
1693
_LT_EOF
1694
  exit 0
1695
fi
1696
1697
# The HP-UX ksh and POSIX shell print the target directory to stdout
1698
# if CDPATH is set.
1699
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1700
1701
if test -z "$lt_ECHO"; then
1702
  if test "X${echo_test_string+set}" != Xset; then
1703
    # find a string as large as possible, as long as the shell can cope with it
1704
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1705
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1706
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1707
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1708
      then
1709
        break
1710
      fi
1711
    done
1712
  fi
1713
1714
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1715
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1716
     test "X$echo_testing_string" = "X$echo_test_string"; then
1717
    :
1718
  else
1719
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1720
    # backslashes.  This makes it impossible to quote backslashes using
1721
    #   echo "$something" | sed 's/\\/\\\\/g'
1722
    #
1723
    # So, first we look for a working echo in the user's PATH.
1724
1725
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1726
    for dir in $PATH /usr/ucb; do
1727
      IFS="$lt_save_ifs"
1728
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1729
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1730
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1731
         test "X$echo_testing_string" = "X$echo_test_string"; then
1732
        ECHO="$dir/echo"
1733
        break
1734
      fi
1735
    done
1736
    IFS="$lt_save_ifs"
1737
1738
    if test "X$ECHO" = Xecho; then
1739
      # We didn't find a better echo, so look for alternatives.
1740
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1741
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1742
         test "X$echo_testing_string" = "X$echo_test_string"; then
1743
        # This shell has a builtin print -r that does the trick.
1744
        ECHO='print -r'
1745
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1746
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1747
        # If we have ksh, try running configure again with it.
1748
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1749
        export ORIGINAL_CONFIG_SHELL
1750
        CONFIG_SHELL=/bin/ksh
1751
        export CONFIG_SHELL
1752
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1753
      else
1754
        # Try using printf.
1755
        ECHO='printf %s\n'
1756
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1757
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1758
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1759
	  # Cool, printf works
1760
	  :
1761
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1762
	     test "X$echo_testing_string" = 'X\t' &&
1763
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1764
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1765
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1766
	  export CONFIG_SHELL
1767
	  SHELL="$CONFIG_SHELL"
1768
	  export SHELL
1769
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1770
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1771
	     test "X$echo_testing_string" = 'X\t' &&
1772
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1773
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1774
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1775
        else
1776
	  # maybe with a smaller string...
1777
	  prev=:
1778
1779
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1780
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1781
	    then
1782
	      break
1783
	    fi
1784
	    prev="$cmd"
1785
	  done
1786
1787
	  if test "$prev" != 'sed 50q "[$]0"'; then
1788
	    echo_test_string=`eval $prev`
1789
	    export echo_test_string
1790
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1791
	  else
1792
	    # Oops.  We lost completely, so just stick with echo.
1793
	    ECHO=echo
1794
	  fi
1795
        fi
1796
      fi
1797
    fi
1798
  fi
1799
fi
1800
1801
# Copy echo and quote the copy suitably for passing to libtool from
1802
# the Makefile, instead of quoting the original, which is used later.
1803
lt_ECHO=$ECHO
1804
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1805
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1806
fi
1807
1808
AC_SUBST(lt_ECHO)
1809
])
1810
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1811
_LT_DECL([], [ECHO], [1],
1812
    [An echo program that does not interpret backslashes])
1813
])# _LT_PROG_ECHO_BACKSLASH
1814
1815
1816
# _LT_ENABLE_LOCK
1817
# ---------------
1818
m4_defun([_LT_ENABLE_LOCK],
1819
[AC_ARG_ENABLE([libtool-lock],
1820
  [AS_HELP_STRING([--disable-libtool-lock],
1821
    [avoid locking (might break parallel builds)])])
1822
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1823
1824
# Some flags need to be propagated to the compiler or linker for good
1825
# libtool support.
1826
case $host in
1827
ia64-*-hpux*)
1828
  # Find out which ABI we are using.
1829
  echo 'int i;' > conftest.$ac_ext
1830
  if AC_TRY_EVAL(ac_compile); then
1831
    case `/usr/bin/file conftest.$ac_objext` in
1832
      *ELF-32*)
1833
	HPUX_IA64_MODE="32"
1834
	;;
1835
      *ELF-64*)
1836
	HPUX_IA64_MODE="64"
1837
	;;
1838
    esac
1839
  fi
1840
  rm -rf conftest*
1841
  ;;
1842
*-*-irix6*)
1843
  # Find out which ABI we are using.
1844
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1845
  if AC_TRY_EVAL(ac_compile); then
1846
    if test "$lt_cv_prog_gnu_ld" = yes; then
1847
      case `/usr/bin/file conftest.$ac_objext` in
1848
	*32-bit*)
1849
	  LD="${LD-ld} -melf32bsmip"
1850
	  ;;
1851
	*N32*)
1852
	  LD="${LD-ld} -melf32bmipn32"
1853
	  ;;
1854
	*64-bit*)
1855
	  LD="${LD-ld} -melf64bmip"
1856
	;;
1857
      esac
1858
    else
1859
      case `/usr/bin/file conftest.$ac_objext` in
1860
	*32-bit*)
1861
	  LD="${LD-ld} -32"
1862
	  ;;
1863
	*N32*)
1864
	  LD="${LD-ld} -n32"
1865
	  ;;
1866
	*64-bit*)
1867
	  LD="${LD-ld} -64"
1868
	  ;;
1869
      esac
1870
    fi
1871
  fi
1872
  rm -rf conftest*
1873
  ;;
1874
1875
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1876
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1877
  # Find out which ABI we are using.
1878
  echo 'int i;' > conftest.$ac_ext
1879
  if AC_TRY_EVAL(ac_compile); then
1880
    case `/usr/bin/file conftest.o` in
1881
      *32-bit*)
1882
	case $host in
1883
	  x86_64-*kfreebsd*-gnu)
1884
	    LD="${LD-ld} -m elf_i386_fbsd"
1885
	    ;;
1886
	  x86_64-*linux*)
1887
	    LD="${LD-ld} -m elf_i386"
1888
	    ;;
1889
	  ppc64-*linux*|powerpc64-*linux*)
1890
	    LD="${LD-ld} -m elf32ppclinux"
1891
	    ;;
1892
	  s390x-*linux*)
1893
	    LD="${LD-ld} -m elf_s390"
1894
	    ;;
1895
	  sparc64-*linux*)
1896
	    LD="${LD-ld} -m elf32_sparc"
1897
	    ;;
1898
	esac
1899
	;;
1900
      *64-bit*)
1901
	case $host in
1902
	  x86_64-*kfreebsd*-gnu)
1903
	    LD="${LD-ld} -m elf_x86_64_fbsd"
1904
	    ;;
1905
	  x86_64-*linux*)
1906
	    LD="${LD-ld} -m elf_x86_64"
1907
	    ;;
1908
	  ppc*-*linux*|powerpc*-*linux*)
1909
	    LD="${LD-ld} -m elf64ppc"
1910
	    ;;
1911
	  s390*-*linux*|s390*-*tpf*)
1912
	    LD="${LD-ld} -m elf64_s390"
1913
	    ;;
1914
	  sparc*-*linux*)
1915
	    LD="${LD-ld} -m elf64_sparc"
1916
	    ;;
1917
	esac
1918
	;;
1919
    esac
1920
  fi
1921
  rm -rf conftest*
1922
  ;;
1923
1924
*-*-sco3.2v5*)
1925
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1926
  SAVE_CFLAGS="$CFLAGS"
1927
  CFLAGS="$CFLAGS -belf"
1928
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1929
    [AC_LANG_PUSH(C)
1930
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1931
     AC_LANG_POP])
1932
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1933
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1934
    CFLAGS="$SAVE_CFLAGS"
1935
  fi
1936
  ;;
1937
sparc*-*solaris*)
1938
  # Find out which ABI we are using.
1939
  echo 'int i;' > conftest.$ac_ext
1940
  if AC_TRY_EVAL(ac_compile); then
1941
    case `/usr/bin/file conftest.o` in
1942
    *64-bit*)
1943
      case $lt_cv_prog_gnu_ld in
1944
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1945
      *)
1946
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1947
	  LD="${LD-ld} -64"
1948
	fi
1949
	;;
1950
      esac
1951
      ;;
1952
    esac
1953
  fi
1954
  rm -rf conftest*
1955
  ;;
1956
esac
1957
1958
need_locks="$enable_libtool_lock"
1959
])# _LT_ENABLE_LOCK
1960
1961
1962
# _LT_CMD_OLD_ARCHIVE
1963
# -------------------
1964
m4_defun([_LT_CMD_OLD_ARCHIVE],
1965
[AC_CHECK_TOOL(AR, ar, false)
1966
test -z "$AR" && AR=ar
1967
test -z "$AR_FLAGS" && AR_FLAGS=cru
1968
_LT_DECL([], [AR], [1], [The archiver])
1969
_LT_DECL([], [AR_FLAGS], [1])
1970
1971
AC_CHECK_TOOL(STRIP, strip, :)
1972
test -z "$STRIP" && STRIP=:
1973
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1974
1975
AC_CHECK_TOOL(RANLIB, ranlib, :)
1976
test -z "$RANLIB" && RANLIB=:
1977
_LT_DECL([], [RANLIB], [1],
1978
    [Commands used to install an old-style archive])
1979
1980
# Determine commands to create old-style static archives.
1981
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1982
old_postinstall_cmds='chmod 644 $oldlib'
1983
old_postuninstall_cmds=
1984
1985
if test -n "$RANLIB"; then
1986
  case $host_os in
1987
  openbsd*)
1988
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1989
    ;;
1990
  *)
1991
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1992
    ;;
1993
  esac
1994
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1995
fi
1996
_LT_DECL([], [old_postinstall_cmds], [2])
1997
_LT_DECL([], [old_postuninstall_cmds], [2])
1998
_LT_TAGDECL([], [old_archive_cmds], [2],
1999
    [Commands used to build an old-style archive])
2000
])# _LT_CMD_OLD_ARCHIVE
2001
2002
2003
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2004
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2005
# ----------------------------------------------------------------
2006
# Check whether the given compiler option works
2007
AC_DEFUN([_LT_COMPILER_OPTION],
2008
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2009
m4_require([_LT_DECL_SED])dnl
2010
AC_CACHE_CHECK([$1], [$2],
2011
  [$2=no
2012
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2013
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2014
   lt_compiler_flag="$3"
2015
   # Insert the option either (1) after the last *FLAGS variable, or
2016
   # (2) before a word containing "conftest.", or (3) at the end.
2017
   # Note that $ac_compile itself does not contain backslashes and begins
2018
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2019
   # The option is referenced via a variable to avoid confusing sed.
2020
   lt_compile=`echo "$ac_compile" | $SED \
2021
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2022
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2023
   -e 's:$: $lt_compiler_flag:'`
2024
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2025
   (eval "$lt_compile" 2>conftest.err)
2026
   ac_status=$?
2027
   cat conftest.err >&AS_MESSAGE_LOG_FD
2028
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2029
   if (exit $ac_status) && test -s "$ac_outfile"; then
2030
     # The compiler can only warn and ignore the option if not recognized
2031
     # So say no if there are warnings other than the usual output.
2032
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2033
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2034
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2035
       $2=yes
2036
     fi
2037
   fi
2038
   $RM conftest*
2039
])
2040
2041
if test x"[$]$2" = xyes; then
2042
    m4_if([$5], , :, [$5])
2043
else
2044
    m4_if([$6], , :, [$6])
2045
fi
2046
])# _LT_COMPILER_OPTION
2047
2048
# Old name:
2049
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2050
dnl aclocal-1.4 backwards compatibility:
2051
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2052
2053
2054
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2055
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2056
# ----------------------------------------------------
2057
# Check whether the given linker option works
2058
AC_DEFUN([_LT_LINKER_OPTION],
2059
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2060
m4_require([_LT_DECL_SED])dnl
2061
AC_CACHE_CHECK([$1], [$2],
2062
  [$2=no
2063
   save_LDFLAGS="$LDFLAGS"
2064
   LDFLAGS="$LDFLAGS $3"
2065
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2066
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2067
     # The linker can only warn and ignore the option if not recognized
2068
     # So say no if there are warnings
2069
     if test -s conftest.err; then
2070
       # Append any errors to the config.log.
2071
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2072
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2073
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2074
       if diff conftest.exp conftest.er2 >/dev/null; then
2075
         $2=yes
2076
       fi
2077
     else
2078
       $2=yes
2079
     fi
2080
   fi
2081
   $RM -r conftest*
2082
   LDFLAGS="$save_LDFLAGS"
2083
])
2084
2085
if test x"[$]$2" = xyes; then
2086
    m4_if([$4], , :, [$4])
2087
else
2088
    m4_if([$5], , :, [$5])
2089
fi
2090
])# _LT_LINKER_OPTION
2091
2092
# Old name:
2093
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2094
dnl aclocal-1.4 backwards compatibility:
2095
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2096
2097
2098
# LT_CMD_MAX_LEN
2099
#---------------
2100
AC_DEFUN([LT_CMD_MAX_LEN],
2101
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2102
# find the maximum length of command line arguments
2103
AC_MSG_CHECKING([the maximum length of command line arguments])
2104
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2105
  i=0
2106
  teststring="ABCD"
2107
2108
  case $build_os in
2109
  msdosdjgpp*)
2110
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2111
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2112
    # during glob expansion).  Even if it were fixed, the result of this
2113
    # check would be larger than it should be.
2114
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2115
    ;;
2116
2117
  gnu*)
2118
    # Under GNU Hurd, this test is not required because there is
2119
    # no limit to the length of command line arguments.
2120
    # Libtool will interpret -1 as no limit whatsoever
2121
    lt_cv_sys_max_cmd_len=-1;
2122
    ;;
2123
2124
  cygwin* | mingw* | cegcc*)
2125
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2126
    # about 5 minutes as the teststring grows exponentially.
2127
    # Worse, since 9x/ME are not pre-emptively multitasking,
2128
    # you end up with a "frozen" computer, even though with patience
2129
    # the test eventually succeeds (with a max line length of 256k).
2130
    # Instead, let's just punt: use the minimum linelength reported by
2131
    # all of the supported platforms: 8192 (on NT/2K/XP).
2132
    lt_cv_sys_max_cmd_len=8192;
2133
    ;;
2134
2135
  amigaos*)
2136
    # On AmigaOS with pdksh, this test takes hours, literally.
2137
    # So we just punt and use a minimum line length of 8192.
2138
    lt_cv_sys_max_cmd_len=8192;
2139
    ;;
2140
2141
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2142
    # This has been around since 386BSD, at least.  Likely further.
2143
    if test -x /sbin/sysctl; then
2144
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2145
    elif test -x /usr/sbin/sysctl; then
2146
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2147
    else
2148
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2149
    fi
2150
    # And add a safety zone
2151
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2152
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2153
    ;;
2154
2155
  interix*)
2156
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2157
    lt_cv_sys_max_cmd_len=196608
2158
    ;;
2159
2160
  osf*)
2161
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2162
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2163
    # nice to cause kernel panics so lets avoid the loop below.
2164
    # First set a reasonable default.
2165
    lt_cv_sys_max_cmd_len=16384
2166
    #
2167
    if test -x /sbin/sysconfig; then
2168
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2169
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2170
      esac
2171
    fi
2172
    ;;
2173
  sco3.2v5*)
2174
    lt_cv_sys_max_cmd_len=102400
2175
    ;;
2176
  sysv5* | sco5v6* | sysv4.2uw2*)
2177
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2178
    if test -n "$kargmax"; then
2179
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2180
    else
2181
      lt_cv_sys_max_cmd_len=32768
2182
    fi
2183
    ;;
2184
  *)
2185
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2186
    if test -n "$lt_cv_sys_max_cmd_len"; then
2187
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2188
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2189
    else
2190
      # Make teststring a little bigger before we do anything with it.
2191
      # a 1K string should be a reasonable start.
2192
      for i in 1 2 3 4 5 6 7 8 ; do
2193
        teststring=$teststring$teststring
2194
      done
2195
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2196
      # If test is not a shell built-in, we'll probably end up computing a
2197
      # maximum length that is only half of the actual maximum length, but
2198
      # we can't tell.
2199
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2200
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2201
	      test $i != 17 # 1/2 MB should be enough
2202
      do
2203
        i=`expr $i + 1`
2204
        teststring=$teststring$teststring
2205
      done
2206
      # Only check the string length outside the loop.
2207
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2208
      teststring=
2209
      # Add a significant safety factor because C++ compilers can tack on
2210
      # massive amounts of additional arguments before passing them to the
2211
      # linker.  It appears as though 1/2 is a usable value.
2212
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2213
    fi
2214
    ;;
2215
  esac
2216
])
2217
if test -n $lt_cv_sys_max_cmd_len ; then
2218
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2219
else
2220
  AC_MSG_RESULT(none)
2221
fi
2222
max_cmd_len=$lt_cv_sys_max_cmd_len
2223
_LT_DECL([], [max_cmd_len], [0],
2224
    [What is the maximum length of a command?])
2225
])# LT_CMD_MAX_LEN
2226
2227
# Old name:
2228
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2229
dnl aclocal-1.4 backwards compatibility:
2230
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2231
2232
2233
# _LT_HEADER_DLFCN
2234
# ----------------
2235
m4_defun([_LT_HEADER_DLFCN],
2236
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2237
])# _LT_HEADER_DLFCN
2238
2239
2240
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2241
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2242
# ----------------------------------------------------------------
2243
m4_defun([_LT_TRY_DLOPEN_SELF],
2244
[m4_require([_LT_HEADER_DLFCN])dnl
2245
if test "$cross_compiling" = yes; then :
2246
  [$4]
2247
else
2248
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2249
  lt_status=$lt_dlunknown
2250
  cat > conftest.$ac_ext <<_LT_EOF
2251
[#line __oline__ "configure"
2252
#include "confdefs.h"
2253
2254
#if HAVE_DLFCN_H
2255
#include <dlfcn.h>
2256
#endif
2257
2258
#include <stdio.h>
2259
2260
#ifdef RTLD_GLOBAL
2261
#  define LT_DLGLOBAL		RTLD_GLOBAL
2262
#else
2263
#  ifdef DL_GLOBAL
2264
#    define LT_DLGLOBAL		DL_GLOBAL
2265
#  else
2266
#    define LT_DLGLOBAL		0
2267
#  endif
2268
#endif
2269
2270
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2271
   find out it does not work in some platform. */
2272
#ifndef LT_DLLAZY_OR_NOW
2273
#  ifdef RTLD_LAZY
2274
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2275
#  else
2276
#    ifdef DL_LAZY
2277
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2278
#    else
2279
#      ifdef RTLD_NOW
2280
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2281
#      else
2282
#        ifdef DL_NOW
2283
#          define LT_DLLAZY_OR_NOW	DL_NOW
2284
#        else
2285
#          define LT_DLLAZY_OR_NOW	0
2286
#        endif
2287
#      endif
2288
#    endif
2289
#  endif
2290
#endif
2291
2292
void fnord() { int i=42;}
2293
int main ()
2294
{
2295
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2296
  int status = $lt_dlunknown;
2297
2298
  if (self)
2299
    {
2300
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2301
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2302
      /* dlclose (self); */
2303
    }
2304
  else
2305
    puts (dlerror ());
2306
2307
  return status;
2308
}]
2309
_LT_EOF
2310
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2311
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2312
    lt_status=$?
2313
    case x$lt_status in
2314
      x$lt_dlno_uscore) $1 ;;
2315
      x$lt_dlneed_uscore) $2 ;;
2316
      x$lt_dlunknown|x*) $3 ;;
2317
    esac
2318
  else :
2319
    # compilation failed
2320
    $3
2321
  fi
2322
fi
2323
rm -fr conftest*
2324
])# _LT_TRY_DLOPEN_SELF
2325
2326
2327
# LT_SYS_DLOPEN_SELF
2328
# ------------------
2329
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2330
[m4_require([_LT_HEADER_DLFCN])dnl
2331
if test "x$enable_dlopen" != xyes; then
2332
  enable_dlopen=unknown
2333
  enable_dlopen_self=unknown
2334
  enable_dlopen_self_static=unknown
2335
else
2336
  lt_cv_dlopen=no
2337
  lt_cv_dlopen_libs=
2338
2339
  case $host_os in
2340
  beos*)
2341
    lt_cv_dlopen="load_add_on"
2342
    lt_cv_dlopen_libs=
2343
    lt_cv_dlopen_self=yes
2344
    ;;
2345
2346
  mingw* | pw32* | cegcc*)
2347
    lt_cv_dlopen="LoadLibrary"
2348
    lt_cv_dlopen_libs=
2349
    ;;
2350
2351
  cygwin*)
2352
    lt_cv_dlopen="dlopen"
2353
    lt_cv_dlopen_libs=
2354
    ;;
2355
2356
  darwin*)
2357
  # if libdl is installed we need to link against it
2358
    AC_CHECK_LIB([dl], [dlopen],
2359
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2360
    lt_cv_dlopen="dyld"
2361
    lt_cv_dlopen_libs=
2362
    lt_cv_dlopen_self=yes
2363
    ])
2364
    ;;
2365
2366
  *)
2367
    AC_CHECK_FUNC([shl_load],
2368
	  [lt_cv_dlopen="shl_load"],
2369
      [AC_CHECK_LIB([dld], [shl_load],
2370
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2371
	[AC_CHECK_FUNC([dlopen],
2372
	      [lt_cv_dlopen="dlopen"],
2373
	  [AC_CHECK_LIB([dl], [dlopen],
2374
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2375
	    [AC_CHECK_LIB([svld], [dlopen],
2376
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2377
	      [AC_CHECK_LIB([dld], [dld_link],
2378
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2379
	      ])
2380
	    ])
2381
	  ])
2382
	])
2383
      ])
2384
    ;;
2385
  esac
2386
2387
  if test "x$lt_cv_dlopen" != xno; then
2388
    enable_dlopen=yes
2389
  else
2390
    enable_dlopen=no
2391
  fi
2392
2393
  case $lt_cv_dlopen in
2394
  dlopen)
2395
    save_CPPFLAGS="$CPPFLAGS"
2396
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2397
2398
    save_LDFLAGS="$LDFLAGS"
2399
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2400
2401
    save_LIBS="$LIBS"
2402
    LIBS="$lt_cv_dlopen_libs $LIBS"
2403
2404
    AC_CACHE_CHECK([whether a program can dlopen itself],
2405
	  lt_cv_dlopen_self, [dnl
2406
	  _LT_TRY_DLOPEN_SELF(
2407
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2408
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2409
    ])
2410
2411
    if test "x$lt_cv_dlopen_self" = xyes; then
2412
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2413
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2414
	  lt_cv_dlopen_self_static, [dnl
2415
	  _LT_TRY_DLOPEN_SELF(
2416
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2417
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2418
      ])
2419
    fi
2420
2421
    CPPFLAGS="$save_CPPFLAGS"
2422
    LDFLAGS="$save_LDFLAGS"
2423
    LIBS="$save_LIBS"
2424
    ;;
2425
  esac
2426
2427
  case $lt_cv_dlopen_self in
2428
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2429
  *) enable_dlopen_self=unknown ;;
2430
  esac
2431
2432
  case $lt_cv_dlopen_self_static in
2433
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2434
  *) enable_dlopen_self_static=unknown ;;
2435
  esac
2436
fi
2437
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2438
	 [Whether dlopen is supported])
2439
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2440
	 [Whether dlopen of programs is supported])
2441
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2442
	 [Whether dlopen of statically linked programs is supported])
2443
])# LT_SYS_DLOPEN_SELF
2444
2445
# Old name:
2446
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2447
dnl aclocal-1.4 backwards compatibility:
2448
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2449
2450
2451
# _LT_COMPILER_C_O([TAGNAME])
2452
# ---------------------------
2453
# Check to see if options -c and -o are simultaneously supported by compiler.
2454
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2455
m4_defun([_LT_COMPILER_C_O],
2456
[m4_require([_LT_DECL_SED])dnl
2457
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2458
m4_require([_LT_TAG_COMPILER])dnl
2459
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2460
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2461
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2462
   $RM -r conftest 2>/dev/null
2463
   mkdir conftest
2464
   cd conftest
2465
   mkdir out
2466
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2467
2468
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2469
   # Insert the option either (1) after the last *FLAGS variable, or
2470
   # (2) before a word containing "conftest.", or (3) at the end.
2471
   # Note that $ac_compile itself does not contain backslashes and begins
2472
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2473
   lt_compile=`echo "$ac_compile" | $SED \
2474
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2475
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2476
   -e 's:$: $lt_compiler_flag:'`
2477
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2478
   (eval "$lt_compile" 2>out/conftest.err)
2479
   ac_status=$?
2480
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2481
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2482
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2483
   then
2484
     # The compiler can only warn and ignore the option if not recognized
2485
     # So say no if there are warnings
2486
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2487
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2488
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2489
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2490
     fi
2491
   fi
2492
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2493
   $RM conftest*
2494
   # SGI C++ compiler will create directory out/ii_files/ for
2495
   # template instantiation
2496
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2497
   $RM out/* && rmdir out
2498
   cd ..
2499
   $RM -r conftest
2500
   $RM conftest*
2501
])
2502
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2503
	[Does compiler simultaneously support -c and -o options?])
2504
])# _LT_COMPILER_C_O
2505
2506
2507
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2508
# ----------------------------------
2509
# Check to see if we can do hard links to lock some files if needed
2510
m4_defun([_LT_COMPILER_FILE_LOCKS],
2511
[m4_require([_LT_ENABLE_LOCK])dnl
2512
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2513
_LT_COMPILER_C_O([$1])
2514
2515
hard_links="nottested"
2516
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2517
  # do not overwrite the value of need_locks provided by the user
2518
  AC_MSG_CHECKING([if we can lock with hard links])
2519
  hard_links=yes
2520
  $RM conftest*
2521
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2522
  touch conftest.a
2523
  ln conftest.a conftest.b 2>&5 || hard_links=no
2524
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2525
  AC_MSG_RESULT([$hard_links])
2526
  if test "$hard_links" = no; then
2527
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2528
    need_locks=warn
2529
  fi
2530
else
2531
  need_locks=no
2532
fi
2533
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2534
])# _LT_COMPILER_FILE_LOCKS
2535
2536
2537
# _LT_CHECK_OBJDIR
2538
# ----------------
2539
m4_defun([_LT_CHECK_OBJDIR],
2540
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2541
[rm -f .libs 2>/dev/null
2542
mkdir .libs 2>/dev/null
2543
if test -d .libs; then
2544
  lt_cv_objdir=.libs
2545
else
2546
  # MS-DOS does not allow filenames that begin with a dot.
2547
  lt_cv_objdir=_libs
2548
fi
2549
rmdir .libs 2>/dev/null])
2550
objdir=$lt_cv_objdir
2551
_LT_DECL([], [objdir], [0],
2552
         [The name of the directory that contains temporary libtool files])dnl
2553
m4_pattern_allow([LT_OBJDIR])dnl
2554
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2555
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2556
])# _LT_CHECK_OBJDIR
2557
2558
2559
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2560
# --------------------------------------
2561
# Check hardcoding attributes.
2562
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2563
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2564
_LT_TAGVAR(hardcode_action, $1)=
2565
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2566
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2567
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2568
2569
  # We can hardcode non-existent directories.
2570
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2571
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2572
     # have to relink, otherwise we might link with an installed library
2573
     # when we should be linking with a yet-to-be-installed one
2574
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2575
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2576
    # Linking always hardcodes the temporary library directory.
2577
    _LT_TAGVAR(hardcode_action, $1)=relink
2578
  else
2579
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2580
    _LT_TAGVAR(hardcode_action, $1)=immediate
2581
  fi
2582
else
2583
  # We cannot hardcode anything, or else we can only hardcode existing
2584
  # directories.
2585
  _LT_TAGVAR(hardcode_action, $1)=unsupported
2586
fi
2587
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2588
2589
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2590
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2591
  # Fast installation is not supported
2592
  enable_fast_install=no
2593
elif test "$shlibpath_overrides_runpath" = yes ||
2594
     test "$enable_shared" = no; then
2595
  # Fast installation is not necessary
2596
  enable_fast_install=needless
2597
fi
2598
_LT_TAGDECL([], [hardcode_action], [0],
2599
    [How to hardcode a shared library path into an executable])
2600
])# _LT_LINKER_HARDCODE_LIBPATH
2601
2602
2603
# _LT_CMD_STRIPLIB
2604
# ----------------
2605
m4_defun([_LT_CMD_STRIPLIB],
2606
[m4_require([_LT_DECL_EGREP])
2607
striplib=
2608
old_striplib=
2609
AC_MSG_CHECKING([whether stripping libraries is possible])
2610
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2611
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2612
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2613
  AC_MSG_RESULT([yes])
2614
else
2615
# FIXME - insert some real tests, host_os isn't really good enough
2616
  case $host_os in
2617
  darwin*)
2618
    if test -n "$STRIP" ; then
2619
      striplib="$STRIP -x"
2620
      old_striplib="$STRIP -S"
2621
      AC_MSG_RESULT([yes])
2622
    else
2623
      AC_MSG_RESULT([no])
2624
    fi
2625
    ;;
2626
  *)
2627
    AC_MSG_RESULT([no])
2628
    ;;
2629
  esac
2630
fi
2631
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2632
_LT_DECL([], [striplib], [1])
2633
])# _LT_CMD_STRIPLIB
2634
2635
2636
# _LT_SYS_DYNAMIC_LINKER([TAG])
2637
# -----------------------------
2638
# PORTME Fill in your ld.so characteristics
2639
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2640
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2641
m4_require([_LT_DECL_EGREP])dnl
2642
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2643
m4_require([_LT_DECL_OBJDUMP])dnl
2644
m4_require([_LT_DECL_SED])dnl
2645
AC_MSG_CHECKING([dynamic linker characteristics])
2646
m4_if([$1],
2647
	[], [
2648
if test "$GCC" = yes; then
2649
  case $host_os in
2650
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2651
    *) lt_awk_arg="/^libraries:/" ;;
2652
  esac
2653
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2654
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2655
    # if the path contains ";" then we assume it to be the separator
2656
    # otherwise default to the standard path separator (i.e. ":") - it is
2657
    # assumed that no part of a normal pathname contains ";" but that should
2658
    # okay in the real world where ";" in dirpaths is itself problematic.
2659
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2660
  else
2661
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2662
  fi
2663
  # Ok, now we have the path, separated by spaces, we can step through it
2664
  # and add multilib dir if necessary.
2665
  lt_tmp_lt_search_path_spec=
2666
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2667
  for lt_sys_path in $lt_search_path_spec; do
2668
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2669
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2670
    else
2671
      test -d "$lt_sys_path" && \
2672
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2673
    fi
2674
  done
2675
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2676
BEGIN {RS=" "; FS="/|\n";} {
2677
  lt_foo="";
2678
  lt_count=0;
2679
  for (lt_i = NF; lt_i > 0; lt_i--) {
2680
    if ($lt_i != "" && $lt_i != ".") {
2681
      if ($lt_i == "..") {
2682
        lt_count++;
2683
      } else {
2684
        if (lt_count == 0) {
2685
          lt_foo="/" $lt_i lt_foo;
2686
        } else {
2687
          lt_count--;
2688
        }
2689
      }
2690
    }
2691
  }
2692
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2693
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2694
}'`
2695
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2696
else
2697
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2698
fi])
2699
library_names_spec=
2700
libname_spec='lib$name'
2701
soname_spec=
2702
shrext_cmds=".so"
2703
postinstall_cmds=
2704
postuninstall_cmds=
2705
finish_cmds=
2706
finish_eval=
2707
shlibpath_var=
2708
shlibpath_overrides_runpath=unknown
2709
version_type=none
2710
dynamic_linker="$host_os ld.so"
2711
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2712
need_lib_prefix=unknown
2713
hardcode_into_libs=no
2714
2715
# when you set need_version to no, make sure it does not cause -set_version
2716
# flags to be left without arguments
2717
need_version=unknown
2718
2719
case $host_os in
2720
aix3*)
2721
  version_type=linux
2722
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2723
  shlibpath_var=LIBPATH
2724
2725
  # AIX 3 has no versioning support, so we append a major version to the name.
2726
  soname_spec='${libname}${release}${shared_ext}$major'
2727
  ;;
2728
2729
aix[[4-9]]*)
2730
  version_type=linux
2731
  need_lib_prefix=no
2732
  need_version=no
2733
  hardcode_into_libs=yes
2734
  if test "$host_cpu" = ia64; then
2735
    # AIX 5 supports IA64
2736
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2737
    shlibpath_var=LD_LIBRARY_PATH
2738
  else
2739
    # With GCC up to 2.95.x, collect2 would create an import file
2740
    # for dependence libraries.  The import file would start with
2741
    # the line `#! .'.  This would cause the generated library to
2742
    # depend on `.', always an invalid library.  This was fixed in
2743
    # development snapshots of GCC prior to 3.0.
2744
    case $host_os in
2745
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2746
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2747
	   echo ' yes '
2748
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2749
	:
2750
      else
2751
	can_build_shared=no
2752
      fi
2753
      ;;
2754
    esac
2755
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2756
    # soname into executable. Probably we can add versioning support to
2757
    # collect2, so additional links can be useful in future.
2758
    if test "$aix_use_runtimelinking" = yes; then
2759
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2760
      # instead of lib<name>.a to let people know that these are not
2761
      # typical AIX shared libraries.
2762
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2763
    else
2764
      # We preserve .a as extension for shared libraries through AIX4.2
2765
      # and later when we are not doing run time linking.
2766
      library_names_spec='${libname}${release}.a $libname.a'
2767
      soname_spec='${libname}${release}${shared_ext}$major'
2768
    fi
2769
    shlibpath_var=LIBPATH
2770
  fi
2771
  ;;
2772
2773
amigaos*)
2774
  case $host_cpu in
2775
  powerpc)
2776
    # Since July 2007 AmigaOS4 officially supports .so libraries.
2777
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2778
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2779
    ;;
2780
  m68k)
2781
    library_names_spec='$libname.ixlibrary $libname.a'
2782
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2783
    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'
2784
    ;;
2785
  esac
2786
  ;;
2787
2788
beos*)
2789
  library_names_spec='${libname}${shared_ext}'
2790
  dynamic_linker="$host_os ld.so"
2791
  shlibpath_var=LIBRARY_PATH
2792
  ;;
2793
2794
bsdi[[45]]*)
2795
  version_type=linux
2796
  need_version=no
2797
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2798
  soname_spec='${libname}${release}${shared_ext}$major'
2799
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2800
  shlibpath_var=LD_LIBRARY_PATH
2801
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2802
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2803
  # the default ld.so.conf also contains /usr/contrib/lib and
2804
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2805
  # libtool to hard-code these into programs
2806
  ;;
2807
2808
cygwin* | mingw* | pw32* | cegcc*)
2809
  version_type=windows
2810
  shrext_cmds=".dll"
2811
  need_version=no
2812
  need_lib_prefix=no
2813
2814
  case $GCC,$host_os in
2815
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2816
    library_names_spec='$libname.dll.a'
2817
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2818
    postinstall_cmds='base_file=`basename \${file}`~
2819
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2820
      dldir=$destdir/`dirname \$dlpath`~
2821
      test -d \$dldir || mkdir -p \$dldir~
2822
      $install_prog $dir/$dlname \$dldir/$dlname~
2823
      chmod a+x \$dldir/$dlname~
2824
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2825
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2826
      fi'
2827
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2828
      dlpath=$dir/\$dldll~
2829
       $RM \$dlpath'
2830
    shlibpath_overrides_runpath=yes
2831
2832
    case $host_os in
2833
    cygwin*)
2834
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2835
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2836
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2837
      ;;
2838
    mingw* | cegcc*)
2839
      # MinGW DLLs use traditional 'lib' prefix
2840
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2841
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2842
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2843
        # It is most probably a Windows format PATH printed by
2844
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2845
        # path with ; separators, and with drive letters. We can handle the
2846
        # drive letters (cygwin fileutils understands them), so leave them,
2847
        # especially as we might pass files found there to a mingw objdump,
2848
        # which wouldn't understand a cygwinified path. Ahh.
2849
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2850
      else
2851
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2852
      fi
2853
      ;;
2854
    pw32*)
2855
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2856
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2857
      ;;
2858
    esac
2859
    ;;
2860
2861
  *)
2862
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2863
    ;;
2864
  esac
2865
  dynamic_linker='Win32 ld.exe'
2866
  # FIXME: first we should search . and the directory the executable is in
2867
  shlibpath_var=PATH
2868
  ;;
2869
2870
darwin* | rhapsody*)
2871
  dynamic_linker="$host_os dyld"
2872
  version_type=darwin
2873
  need_lib_prefix=no
2874
  need_version=no
2875
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2876
  soname_spec='${libname}${release}${major}$shared_ext'
2877
  shlibpath_overrides_runpath=yes
2878
  shlibpath_var=DYLD_LIBRARY_PATH
2879
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2880
m4_if([$1], [],[
2881
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2882
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2883
  ;;
2884
2885
dgux*)
2886
  version_type=linux
2887
  need_lib_prefix=no
2888
  need_version=no
2889
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2890
  soname_spec='${libname}${release}${shared_ext}$major'
2891
  shlibpath_var=LD_LIBRARY_PATH
2892
  ;;
2893
2894
freebsd1*)
2895
  dynamic_linker=no
2896
  ;;
2897
2898
freebsd* | dragonfly*)
2899
  # DragonFly does not have aout.  When/if they implement a new
2900
  # versioning mechanism, adjust this.
2901
  if test -x /usr/bin/objformat; then
2902
    objformat=`/usr/bin/objformat`
2903
  else
2904
    case $host_os in
2905
    freebsd[[123]]*) objformat=aout ;;
2906
    *) objformat=elf ;;
2907
    esac
2908
  fi
2909
  version_type=freebsd-$objformat
2910
  case $version_type in
2911
    freebsd-elf*)
2912
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2913
      need_version=no
2914
      need_lib_prefix=no
2915
      ;;
2916
    freebsd-*)
2917
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2918
      need_version=yes
2919
      ;;
2920
  esac
2921
  shlibpath_var=LD_LIBRARY_PATH
2922
  case $host_os in
2923
  freebsd2*)
2924
    shlibpath_overrides_runpath=yes
2925
    ;;
2926
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2927
    shlibpath_overrides_runpath=yes
2928
    hardcode_into_libs=yes
2929
    ;;
2930
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2931
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2932
    shlibpath_overrides_runpath=no
2933
    hardcode_into_libs=yes
2934
    ;;
2935
  *) # from 4.6 on, and DragonFly
2936
    shlibpath_overrides_runpath=yes
2937
    hardcode_into_libs=yes
2938
    ;;
2939
  esac
2940
  ;;
2941
2942
gnu*)
2943
  version_type=linux
2944
  need_lib_prefix=no
2945
  need_version=no
2946
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2947
  soname_spec='${libname}${release}${shared_ext}$major'
2948
  shlibpath_var=LD_LIBRARY_PATH
2949
  hardcode_into_libs=yes
2950
  ;;
2951
2952
hpux9* | hpux10* | hpux11*)
2953
  # Give a soname corresponding to the major version so that dld.sl refuses to
2954
  # link against other versions.
2955
  version_type=sunos
2956
  need_lib_prefix=no
2957
  need_version=no
2958
  case $host_cpu in
2959
  ia64*)
2960
    shrext_cmds='.so'
2961
    hardcode_into_libs=yes
2962
    dynamic_linker="$host_os dld.so"
2963
    shlibpath_var=LD_LIBRARY_PATH
2964
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2965
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2966
    soname_spec='${libname}${release}${shared_ext}$major'
2967
    if test "X$HPUX_IA64_MODE" = X32; then
2968
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2969
    else
2970
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2971
    fi
2972
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2973
    ;;
2974
  hppa*64*)
2975
    shrext_cmds='.sl'
2976
    hardcode_into_libs=yes
2977
    dynamic_linker="$host_os dld.sl"
2978
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2979
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2980
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2981
    soname_spec='${libname}${release}${shared_ext}$major'
2982
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2983
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2984
    ;;
2985
  *)
2986
    shrext_cmds='.sl'
2987
    dynamic_linker="$host_os dld.sl"
2988
    shlibpath_var=SHLIB_PATH
2989
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2990
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2991
    soname_spec='${libname}${release}${shared_ext}$major'
2992
    ;;
2993
  esac
2994
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2995
  postinstall_cmds='chmod 555 $lib'
2996
  ;;
2997
2998
interix[[3-9]]*)
2999
  version_type=linux
3000
  need_lib_prefix=no
3001
  need_version=no
3002
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3003
  soname_spec='${libname}${release}${shared_ext}$major'
3004
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3005
  shlibpath_var=LD_LIBRARY_PATH
3006
  shlibpath_overrides_runpath=no
3007
  hardcode_into_libs=yes
3008
  ;;
3009
3010
irix5* | irix6* | nonstopux*)
3011
  case $host_os in
3012
    nonstopux*) version_type=nonstopux ;;
3013
    *)
3014
	if test "$lt_cv_prog_gnu_ld" = yes; then
3015
		version_type=linux
3016
	else
3017
		version_type=irix
3018
	fi ;;
3019
  esac
3020
  need_lib_prefix=no
3021
  need_version=no
3022
  soname_spec='${libname}${release}${shared_ext}$major'
3023
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3024
  case $host_os in
3025
  irix5* | nonstopux*)
3026
    libsuff= shlibsuff=
3027
    ;;
3028
  *)
3029
    case $LD in # libtool.m4 will add one of these switches to LD
3030
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3031
      libsuff= shlibsuff= libmagic=32-bit;;
3032
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3033
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3034
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3035
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3036
    *) libsuff= shlibsuff= libmagic=never-match;;
3037
    esac
3038
    ;;
3039
  esac
3040
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3041
  shlibpath_overrides_runpath=no
3042
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3043
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3044
  hardcode_into_libs=yes
3045
  ;;
3046
3047
# No shared lib support for Linux oldld, aout, or coff.
3048
linux*oldld* | linux*aout* | linux*coff*)
3049
  dynamic_linker=no
3050
  ;;
3051
3052
# This must be Linux ELF.
37.1.5 by Ken VanDine
Import upstream version 0.2.100
3053
linux* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
3054
  version_type=linux
3055
  need_lib_prefix=no
3056
  need_version=no
3057
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3058
  soname_spec='${libname}${release}${shared_ext}$major'
3059
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3060
  shlibpath_var=LD_LIBRARY_PATH
3061
  shlibpath_overrides_runpath=no
3062
  # Some binutils ld are patched to set DT_RUNPATH
3063
  save_LDFLAGS=$LDFLAGS
3064
  save_libdir=$libdir
3065
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3066
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3067
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3068
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3069
       [shlibpath_overrides_runpath=yes])])
3070
  LDFLAGS=$save_LDFLAGS
3071
  libdir=$save_libdir
3072
3073
  # This implies no fast_install, which is unacceptable.
3074
  # Some rework will be needed to allow for fast_install
3075
  # before this can be enabled.
3076
  hardcode_into_libs=yes
3077
3078
  # Append ld.so.conf contents to the search path
3079
  if test -f /etc/ld.so.conf; then
3080
    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' ' '`
3081
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3082
  fi
3083
3084
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3085
  # powerpc, because MkLinux only supported shared libraries with the
3086
  # GNU dynamic linker.  Since this was broken with cross compilers,
3087
  # most powerpc-linux boxes support dynamic linking these days and
3088
  # people can always --disable-shared, the test was removed, and we
3089
  # assume the GNU/Linux dynamic linker is in use.
3090
  dynamic_linker='GNU/Linux ld.so'
3091
  ;;
3092
3093
netbsdelf*-gnu)
3094
  version_type=linux
3095
  need_lib_prefix=no
3096
  need_version=no
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
  shlibpath_var=LD_LIBRARY_PATH
3100
  shlibpath_overrides_runpath=no
3101
  hardcode_into_libs=yes
3102
  dynamic_linker='NetBSD ld.elf_so'
3103
  ;;
3104
3105
netbsd*)
3106
  version_type=sunos
3107
  need_lib_prefix=no
3108
  need_version=no
3109
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3110
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3111
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3112
    dynamic_linker='NetBSD (a.out) ld.so'
3113
  else
3114
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3115
    soname_spec='${libname}${release}${shared_ext}$major'
3116
    dynamic_linker='NetBSD ld.elf_so'
3117
  fi
3118
  shlibpath_var=LD_LIBRARY_PATH
3119
  shlibpath_overrides_runpath=yes
3120
  hardcode_into_libs=yes
3121
  ;;
3122
3123
newsos6)
3124
  version_type=linux
3125
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3126
  shlibpath_var=LD_LIBRARY_PATH
3127
  shlibpath_overrides_runpath=yes
3128
  ;;
3129
3130
*nto* | *qnx*)
3131
  version_type=qnx
3132
  need_lib_prefix=no
3133
  need_version=no
3134
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3135
  soname_spec='${libname}${release}${shared_ext}$major'
3136
  shlibpath_var=LD_LIBRARY_PATH
3137
  shlibpath_overrides_runpath=no
3138
  hardcode_into_libs=yes
3139
  dynamic_linker='ldqnx.so'
3140
  ;;
3141
3142
openbsd*)
3143
  version_type=sunos
3144
  sys_lib_dlsearch_path_spec="/usr/lib"
3145
  need_lib_prefix=no
3146
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3147
  case $host_os in
3148
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3149
    *)				need_version=no  ;;
3150
  esac
3151
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3152
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3153
  shlibpath_var=LD_LIBRARY_PATH
3154
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3155
    case $host_os in
3156
      openbsd2.[[89]] | openbsd2.[[89]].*)
3157
	shlibpath_overrides_runpath=no
3158
	;;
3159
      *)
3160
	shlibpath_overrides_runpath=yes
3161
	;;
3162
      esac
3163
  else
3164
    shlibpath_overrides_runpath=yes
3165
  fi
3166
  ;;
3167
3168
os2*)
3169
  libname_spec='$name'
3170
  shrext_cmds=".dll"
3171
  need_lib_prefix=no
3172
  library_names_spec='$libname${shared_ext} $libname.a'
3173
  dynamic_linker='OS/2 ld.exe'
3174
  shlibpath_var=LIBPATH
3175
  ;;
3176
3177
osf3* | osf4* | osf5*)
3178
  version_type=osf
3179
  need_lib_prefix=no
3180
  need_version=no
3181
  soname_spec='${libname}${release}${shared_ext}$major'
3182
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3183
  shlibpath_var=LD_LIBRARY_PATH
3184
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3185
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3186
  ;;
3187
3188
rdos*)
3189
  dynamic_linker=no
3190
  ;;
3191
3192
solaris*)
3193
  version_type=linux
3194
  need_lib_prefix=no
3195
  need_version=no
3196
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3197
  soname_spec='${libname}${release}${shared_ext}$major'
3198
  shlibpath_var=LD_LIBRARY_PATH
3199
  shlibpath_overrides_runpath=yes
3200
  hardcode_into_libs=yes
3201
  # ldd complains unless libraries are executable
3202
  postinstall_cmds='chmod +x $lib'
3203
  ;;
3204
3205
sunos4*)
3206
  version_type=sunos
3207
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3208
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3209
  shlibpath_var=LD_LIBRARY_PATH
3210
  shlibpath_overrides_runpath=yes
3211
  if test "$with_gnu_ld" = yes; then
3212
    need_lib_prefix=no
3213
  fi
3214
  need_version=yes
3215
  ;;
3216
3217
sysv4 | sysv4.3*)
3218
  version_type=linux
3219
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3220
  soname_spec='${libname}${release}${shared_ext}$major'
3221
  shlibpath_var=LD_LIBRARY_PATH
3222
  case $host_vendor in
3223
    sni)
3224
      shlibpath_overrides_runpath=no
3225
      need_lib_prefix=no
3226
      runpath_var=LD_RUN_PATH
3227
      ;;
3228
    siemens)
3229
      need_lib_prefix=no
3230
      ;;
3231
    motorola)
3232
      need_lib_prefix=no
3233
      need_version=no
3234
      shlibpath_overrides_runpath=no
3235
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3236
      ;;
3237
  esac
3238
  ;;
3239
3240
sysv4*MP*)
3241
  if test -d /usr/nec ;then
3242
    version_type=linux
3243
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3244
    soname_spec='$libname${shared_ext}.$major'
3245
    shlibpath_var=LD_LIBRARY_PATH
3246
  fi
3247
  ;;
3248
3249
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3250
  version_type=freebsd-elf
3251
  need_lib_prefix=no
3252
  need_version=no
3253
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3254
  soname_spec='${libname}${release}${shared_ext}$major'
3255
  shlibpath_var=LD_LIBRARY_PATH
3256
  shlibpath_overrides_runpath=yes
3257
  hardcode_into_libs=yes
3258
  if test "$with_gnu_ld" = yes; then
3259
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3260
  else
3261
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3262
    case $host_os in
3263
      sco3.2v5*)
3264
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3265
	;;
3266
    esac
3267
  fi
3268
  sys_lib_dlsearch_path_spec='/usr/lib'
3269
  ;;
3270
3271
tpf*)
3272
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3273
  version_type=linux
3274
  need_lib_prefix=no
3275
  need_version=no
3276
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3277
  shlibpath_var=LD_LIBRARY_PATH
3278
  shlibpath_overrides_runpath=no
3279
  hardcode_into_libs=yes
3280
  ;;
3281
3282
uts4*)
3283
  version_type=linux
3284
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3285
  soname_spec='${libname}${release}${shared_ext}$major'
3286
  shlibpath_var=LD_LIBRARY_PATH
3287
  ;;
3288
3289
*)
3290
  dynamic_linker=no
3291
  ;;
3292
esac
3293
AC_MSG_RESULT([$dynamic_linker])
3294
test "$dynamic_linker" = no && can_build_shared=no
3295
3296
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3297
if test "$GCC" = yes; then
3298
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3299
fi
3300
3301
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3302
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3303
fi
3304
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3305
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3306
fi
3307
3308
_LT_DECL([], [variables_saved_for_relink], [1],
3309
    [Variables whose values should be saved in libtool wrapper scripts and
3310
    restored at link time])
3311
_LT_DECL([], [need_lib_prefix], [0],
3312
    [Do we need the "lib" prefix for modules?])
3313
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3314
_LT_DECL([], [version_type], [0], [Library versioning type])
3315
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3316
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3317
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3318
    [Is shlibpath searched before the hard-coded library search path?])
3319
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3320
_LT_DECL([], [library_names_spec], [1],
3321
    [[List of archive names.  First name is the real one, the rest are links.
3322
    The last name is the one that the linker finds with -lNAME]])
3323
_LT_DECL([], [soname_spec], [1],
3324
    [[The coded name of the library, if different from the real name]])
3325
_LT_DECL([], [postinstall_cmds], [2],
3326
    [Command to use after installation of a shared archive])
3327
_LT_DECL([], [postuninstall_cmds], [2],
3328
    [Command to use after uninstallation of a shared archive])
3329
_LT_DECL([], [finish_cmds], [2],
3330
    [Commands used to finish a libtool library installation in a directory])
3331
_LT_DECL([], [finish_eval], [1],
3332
    [[As "finish_cmds", except a single script fragment to be evaled but
3333
    not shown]])
3334
_LT_DECL([], [hardcode_into_libs], [0],
3335
    [Whether we should hardcode library paths into libraries])
3336
_LT_DECL([], [sys_lib_search_path_spec], [2],
3337
    [Compile-time system search path for libraries])
3338
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3339
    [Run-time system search path for libraries])
3340
])# _LT_SYS_DYNAMIC_LINKER
3341
3342
3343
# _LT_PATH_TOOL_PREFIX(TOOL)
3344
# --------------------------
3345
# find a file program which can recognize shared library
3346
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3347
[m4_require([_LT_DECL_EGREP])dnl
3348
AC_MSG_CHECKING([for $1])
3349
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3350
[case $MAGIC_CMD in
3351
[[\\/*] |  ?:[\\/]*])
3352
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3353
  ;;
3354
*)
3355
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3356
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3357
dnl $ac_dummy forces splitting on constant user-supplied paths.
3358
dnl POSIX.2 word splitting is done only on the output of word expansions,
3359
dnl not every word.  This closes a longstanding sh security hole.
3360
  ac_dummy="m4_if([$2], , $PATH, [$2])"
3361
  for ac_dir in $ac_dummy; do
3362
    IFS="$lt_save_ifs"
3363
    test -z "$ac_dir" && ac_dir=.
3364
    if test -f $ac_dir/$1; then
3365
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3366
      if test -n "$file_magic_test_file"; then
3367
	case $deplibs_check_method in
3368
	"file_magic "*)
3369
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3370
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3371
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3372
	    $EGREP "$file_magic_regex" > /dev/null; then
3373
	    :
3374
	  else
3375
	    cat <<_LT_EOF 1>&2
3376
3377
*** Warning: the command libtool uses to detect shared libraries,
3378
*** $file_magic_cmd, produces output that libtool cannot recognize.
3379
*** The result is that libtool may fail to recognize shared libraries
3380
*** as such.  This will affect the creation of libtool libraries that
3381
*** depend on shared libraries, but programs linked with such libtool
3382
*** libraries will work regardless of this problem.  Nevertheless, you
3383
*** may want to report the problem to your system manager and/or to
3384
*** bug-libtool@gnu.org
3385
3386
_LT_EOF
3387
	  fi ;;
3388
	esac
3389
      fi
3390
      break
3391
    fi
3392
  done
3393
  IFS="$lt_save_ifs"
3394
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3395
  ;;
3396
esac])
3397
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3398
if test -n "$MAGIC_CMD"; then
3399
  AC_MSG_RESULT($MAGIC_CMD)
3400
else
3401
  AC_MSG_RESULT(no)
3402
fi
3403
_LT_DECL([], [MAGIC_CMD], [0],
3404
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3405
])# _LT_PATH_TOOL_PREFIX
3406
3407
# Old name:
3408
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3409
dnl aclocal-1.4 backwards compatibility:
3410
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3411
3412
3413
# _LT_PATH_MAGIC
3414
# --------------
3415
# find a file program which can recognize a shared library
3416
m4_defun([_LT_PATH_MAGIC],
3417
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3418
if test -z "$lt_cv_path_MAGIC_CMD"; then
3419
  if test -n "$ac_tool_prefix"; then
3420
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3421
  else
3422
    MAGIC_CMD=:
3423
  fi
3424
fi
3425
])# _LT_PATH_MAGIC
3426
3427
3428
# LT_PATH_LD
3429
# ----------
3430
# find the pathname to the GNU or non-GNU linker
3431
AC_DEFUN([LT_PATH_LD],
3432
[AC_REQUIRE([AC_PROG_CC])dnl
3433
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3434
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3435
m4_require([_LT_DECL_SED])dnl
3436
m4_require([_LT_DECL_EGREP])dnl
3437
3438
AC_ARG_WITH([gnu-ld],
3439
    [AS_HELP_STRING([--with-gnu-ld],
3440
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3441
    [test "$withval" = no || with_gnu_ld=yes],
3442
    [with_gnu_ld=no])dnl
3443
3444
ac_prog=ld
3445
if test "$GCC" = yes; then
3446
  # Check if gcc -print-prog-name=ld gives a path.
3447
  AC_MSG_CHECKING([for ld used by $CC])
3448
  case $host in
3449
  *-*-mingw*)
3450
    # gcc leaves a trailing carriage return which upsets mingw
3451
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3452
  *)
3453
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3454
  esac
3455
  case $ac_prog in
3456
    # Accept absolute paths.
3457
    [[\\/]]* | ?:[[\\/]]*)
3458
      re_direlt='/[[^/]][[^/]]*/\.\./'
3459
      # Canonicalize the pathname of ld
3460
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3461
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3462
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3463
      done
3464
      test -z "$LD" && LD="$ac_prog"
3465
      ;;
3466
  "")
3467
    # If it fails, then pretend we aren't using GCC.
3468
    ac_prog=ld
3469
    ;;
3470
  *)
3471
    # If it is relative, then search for the first ld in PATH.
3472
    with_gnu_ld=unknown
3473
    ;;
3474
  esac
3475
elif test "$with_gnu_ld" = yes; then
3476
  AC_MSG_CHECKING([for GNU ld])
3477
else
3478
  AC_MSG_CHECKING([for non-GNU ld])
3479
fi
3480
AC_CACHE_VAL(lt_cv_path_LD,
3481
[if test -z "$LD"; then
3482
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3483
  for ac_dir in $PATH; do
3484
    IFS="$lt_save_ifs"
3485
    test -z "$ac_dir" && ac_dir=.
3486
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3487
      lt_cv_path_LD="$ac_dir/$ac_prog"
3488
      # Check to see if the program is GNU ld.  I'd rather use --version,
3489
      # but apparently some variants of GNU ld only accept -v.
3490
      # Break only if it was the GNU/non-GNU ld that we prefer.
3491
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3492
      *GNU* | *'with BFD'*)
3493
	test "$with_gnu_ld" != no && break
3494
	;;
3495
      *)
3496
	test "$with_gnu_ld" != yes && break
3497
	;;
3498
      esac
3499
    fi
3500
  done
3501
  IFS="$lt_save_ifs"
3502
else
3503
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3504
fi])
3505
LD="$lt_cv_path_LD"
3506
if test -n "$LD"; then
3507
  AC_MSG_RESULT($LD)
3508
else
3509
  AC_MSG_RESULT(no)
3510
fi
3511
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3512
_LT_PATH_LD_GNU
3513
AC_SUBST([LD])
3514
3515
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3516
])# LT_PATH_LD
3517
3518
# Old names:
3519
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3520
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3521
dnl aclocal-1.4 backwards compatibility:
3522
dnl AC_DEFUN([AM_PROG_LD], [])
3523
dnl AC_DEFUN([AC_PROG_LD], [])
3524
3525
3526
# _LT_PATH_LD_GNU
3527
#- --------------
3528
m4_defun([_LT_PATH_LD_GNU],
3529
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3530
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3531
case `$LD -v 2>&1 </dev/null` in
3532
*GNU* | *'with BFD'*)
3533
  lt_cv_prog_gnu_ld=yes
3534
  ;;
3535
*)
3536
  lt_cv_prog_gnu_ld=no
3537
  ;;
3538
esac])
3539
with_gnu_ld=$lt_cv_prog_gnu_ld
3540
])# _LT_PATH_LD_GNU
3541
3542
3543
# _LT_CMD_RELOAD
3544
# --------------
3545
# find reload flag for linker
3546
#   -- PORTME Some linkers may need a different reload flag.
3547
m4_defun([_LT_CMD_RELOAD],
3548
[AC_CACHE_CHECK([for $LD option to reload object files],
3549
  lt_cv_ld_reload_flag,
3550
  [lt_cv_ld_reload_flag='-r'])
3551
reload_flag=$lt_cv_ld_reload_flag
3552
case $reload_flag in
3553
"" | " "*) ;;
3554
*) reload_flag=" $reload_flag" ;;
3555
esac
3556
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3557
case $host_os in
3558
  darwin*)
3559
    if test "$GCC" = yes; then
3560
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3561
    else
3562
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3563
    fi
3564
    ;;
3565
esac
3566
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3567
_LT_DECL([], [reload_cmds], [2])dnl
3568
])# _LT_CMD_RELOAD
3569
3570
3571
# _LT_CHECK_MAGIC_METHOD
3572
# ----------------------
3573
# how to check for library dependencies
3574
#  -- PORTME fill in with the dynamic library characteristics
3575
m4_defun([_LT_CHECK_MAGIC_METHOD],
3576
[m4_require([_LT_DECL_EGREP])
3577
m4_require([_LT_DECL_OBJDUMP])
3578
AC_CACHE_CHECK([how to recognize dependent libraries],
3579
lt_cv_deplibs_check_method,
3580
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3581
lt_cv_file_magic_test_file=
3582
lt_cv_deplibs_check_method='unknown'
3583
# Need to set the preceding variable on all platforms that support
3584
# interlibrary dependencies.
3585
# 'none' -- dependencies not supported.
3586
# `unknown' -- same as none, but documents that we really don't know.
3587
# 'pass_all' -- all dependencies passed with no checks.
3588
# 'test_compile' -- check by making test program.
3589
# 'file_magic [[regex]]' -- check by looking for files in library path
3590
# which responds to the $file_magic_cmd with a given extended regex.
3591
# If you have `file' or equivalent on your system and you're not sure
3592
# whether `pass_all' will *always* work, you probably want this one.
3593
3594
case $host_os in
3595
aix[[4-9]]*)
3596
  lt_cv_deplibs_check_method=pass_all
3597
  ;;
3598
3599
beos*)
3600
  lt_cv_deplibs_check_method=pass_all
3601
  ;;
3602
3603
bsdi[[45]]*)
3604
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3605
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3606
  lt_cv_file_magic_test_file=/shlib/libc.so
3607
  ;;
3608
3609
cygwin*)
3610
  # func_win32_libid is a shell function defined in ltmain.sh
3611
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3612
  lt_cv_file_magic_cmd='func_win32_libid'
3613
  ;;
3614
3615
mingw* | pw32*)
3616
  # Base MSYS/MinGW do not provide the 'file' command needed by
3617
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3618
  # unless we find 'file', for example because we are cross-compiling.
3619
  if ( file / ) >/dev/null 2>&1; then
3620
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3621
    lt_cv_file_magic_cmd='func_win32_libid'
3622
  else
3623
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3624
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3625
  fi
3626
  ;;
3627
3628
cegcc)
3629
  # use the weaker test based on 'objdump'. See mingw*.
3630
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3631
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3632
  ;;
3633
3634
darwin* | rhapsody*)
3635
  lt_cv_deplibs_check_method=pass_all
3636
  ;;
3637
3638
freebsd* | dragonfly*)
3639
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3640
    case $host_cpu in
3641
    i*86 )
3642
      # Not sure whether the presence of OpenBSD here was a mistake.
3643
      # Let's accept both of them until this is cleared up.
3644
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3645
      lt_cv_file_magic_cmd=/usr/bin/file
3646
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3647
      ;;
3648
    esac
3649
  else
3650
    lt_cv_deplibs_check_method=pass_all
3651
  fi
3652
  ;;
3653
3654
gnu*)
3655
  lt_cv_deplibs_check_method=pass_all
3656
  ;;
3657
3658
hpux10.20* | hpux11*)
3659
  lt_cv_file_magic_cmd=/usr/bin/file
3660
  case $host_cpu in
3661
  ia64*)
3662
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3663
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3664
    ;;
3665
  hppa*64*)
3666
    [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]']
3667
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3668
    ;;
3669
  *)
3670
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3671
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3672
    ;;
3673
  esac
3674
  ;;
3675
3676
interix[[3-9]]*)
3677
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3678
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3679
  ;;
3680
3681
irix5* | irix6* | nonstopux*)
3682
  case $LD in
3683
  *-32|*"-32 ") libmagic=32-bit;;
3684
  *-n32|*"-n32 ") libmagic=N32;;
3685
  *-64|*"-64 ") libmagic=64-bit;;
3686
  *) libmagic=never-match;;
3687
  esac
3688
  lt_cv_deplibs_check_method=pass_all
3689
  ;;
3690
3691
# This must be Linux ELF.
37.1.5 by Ken VanDine
Import upstream version 0.2.100
3692
linux* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
3693
  lt_cv_deplibs_check_method=pass_all
3694
  ;;
3695
3696
netbsd* | netbsdelf*-gnu)
3697
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3698
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3699
  else
3700
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3701
  fi
3702
  ;;
3703
3704
newos6*)
3705
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3706
  lt_cv_file_magic_cmd=/usr/bin/file
3707
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3708
  ;;
3709
3710
*nto* | *qnx*)
3711
  lt_cv_deplibs_check_method=pass_all
3712
  ;;
3713
3714
openbsd*)
3715
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3716
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3717
  else
3718
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3719
  fi
3720
  ;;
3721
3722
osf3* | osf4* | osf5*)
3723
  lt_cv_deplibs_check_method=pass_all
3724
  ;;
3725
3726
rdos*)
3727
  lt_cv_deplibs_check_method=pass_all
3728
  ;;
3729
3730
solaris*)
3731
  lt_cv_deplibs_check_method=pass_all
3732
  ;;
3733
3734
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3735
  lt_cv_deplibs_check_method=pass_all
3736
  ;;
3737
3738
sysv4 | sysv4.3*)
3739
  case $host_vendor in
3740
  motorola)
3741
    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]]'
3742
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3743
    ;;
3744
  ncr)
3745
    lt_cv_deplibs_check_method=pass_all
3746
    ;;
3747
  sequent)
3748
    lt_cv_file_magic_cmd='/bin/file'
3749
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3750
    ;;
3751
  sni)
3752
    lt_cv_file_magic_cmd='/bin/file'
3753
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3754
    lt_cv_file_magic_test_file=/lib/libc.so
3755
    ;;
3756
  siemens)
3757
    lt_cv_deplibs_check_method=pass_all
3758
    ;;
3759
  pc)
3760
    lt_cv_deplibs_check_method=pass_all
3761
    ;;
3762
  esac
3763
  ;;
3764
3765
tpf*)
3766
  lt_cv_deplibs_check_method=pass_all
3767
  ;;
3768
esac
3769
])
3770
file_magic_cmd=$lt_cv_file_magic_cmd
3771
deplibs_check_method=$lt_cv_deplibs_check_method
3772
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3773
3774
_LT_DECL([], [deplibs_check_method], [1],
3775
    [Method to check whether dependent libraries are shared objects])
3776
_LT_DECL([], [file_magic_cmd], [1],
3777
    [Command to use when deplibs_check_method == "file_magic"])
3778
])# _LT_CHECK_MAGIC_METHOD
3779
3780
3781
# LT_PATH_NM
3782
# ----------
3783
# find the pathname to a BSD- or MS-compatible name lister
3784
AC_DEFUN([LT_PATH_NM],
3785
[AC_REQUIRE([AC_PROG_CC])dnl
3786
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3787
[if test -n "$NM"; then
3788
  # Let the user override the test.
3789
  lt_cv_path_NM="$NM"
3790
else
3791
  lt_nm_to_check="${ac_tool_prefix}nm"
3792
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3793
    lt_nm_to_check="$lt_nm_to_check nm"
3794
  fi
3795
  for lt_tmp_nm in $lt_nm_to_check; do
3796
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3797
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3798
      IFS="$lt_save_ifs"
3799
      test -z "$ac_dir" && ac_dir=.
3800
      tmp_nm="$ac_dir/$lt_tmp_nm"
3801
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3802
	# Check to see if the nm accepts a BSD-compat flag.
3803
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3804
	#   nm: unknown option "B" ignored
3805
	# Tru64's nm complains that /dev/null is an invalid object file
3806
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3807
	*/dev/null* | *'Invalid file or object type'*)
3808
	  lt_cv_path_NM="$tmp_nm -B"
3809
	  break
3810
	  ;;
3811
	*)
3812
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3813
	  */dev/null*)
3814
	    lt_cv_path_NM="$tmp_nm -p"
3815
	    break
3816
	    ;;
3817
	  *)
3818
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3819
	    continue # so that we can try to find one that supports BSD flags
3820
	    ;;
3821
	  esac
3822
	  ;;
3823
	esac
3824
      fi
3825
    done
3826
    IFS="$lt_save_ifs"
3827
  done
3828
  : ${lt_cv_path_NM=no}
3829
fi])
3830
if test "$lt_cv_path_NM" != "no"; then
3831
  NM="$lt_cv_path_NM"
3832
else
3833
  # Didn't find any BSD compatible name lister, look for dumpbin.
3834
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3835
  AC_SUBST([DUMPBIN])
3836
  if test "$DUMPBIN" != ":"; then
3837
    NM="$DUMPBIN"
3838
  fi
3839
fi
3840
test -z "$NM" && NM=nm
3841
AC_SUBST([NM])
3842
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3843
3844
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3845
  [lt_cv_nm_interface="BSD nm"
3846
  echo "int some_variable = 0;" > conftest.$ac_ext
3847
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3848
  (eval "$ac_compile" 2>conftest.err)
3849
  cat conftest.err >&AS_MESSAGE_LOG_FD
3850
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3851
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3852
  cat conftest.err >&AS_MESSAGE_LOG_FD
3853
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3854
  cat conftest.out >&AS_MESSAGE_LOG_FD
3855
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3856
    lt_cv_nm_interface="MS dumpbin"
3857
  fi
3858
  rm -f conftest*])
3859
])# LT_PATH_NM
3860
3861
# Old names:
3862
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3863
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3864
dnl aclocal-1.4 backwards compatibility:
3865
dnl AC_DEFUN([AM_PROG_NM], [])
3866
dnl AC_DEFUN([AC_PROG_NM], [])
3867
3868
3869
# LT_LIB_M
3870
# --------
3871
# check for math library
3872
AC_DEFUN([LT_LIB_M],
3873
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3874
LIBM=
3875
case $host in
3876
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3877
  # These system don't have libm, or don't need it
3878
  ;;
3879
*-ncr-sysv4.3*)
3880
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3881
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3882
  ;;
3883
*)
3884
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3885
  ;;
3886
esac
3887
AC_SUBST([LIBM])
3888
])# LT_LIB_M
3889
3890
# Old name:
3891
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3892
dnl aclocal-1.4 backwards compatibility:
3893
dnl AC_DEFUN([AC_CHECK_LIBM], [])
3894
3895
3896
# _LT_COMPILER_NO_RTTI([TAGNAME])
3897
# -------------------------------
3898
m4_defun([_LT_COMPILER_NO_RTTI],
3899
[m4_require([_LT_TAG_COMPILER])dnl
3900
3901
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3902
3903
if test "$GCC" = yes; then
3904
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3905
3906
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3907
    lt_cv_prog_compiler_rtti_exceptions,
3908
    [-fno-rtti -fno-exceptions], [],
3909
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3910
fi
3911
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3912
	[Compiler flag to turn off builtin functions])
3913
])# _LT_COMPILER_NO_RTTI
3914
3915
3916
# _LT_CMD_GLOBAL_SYMBOLS
3917
# ----------------------
3918
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3919
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3920
AC_REQUIRE([AC_PROG_CC])dnl
3921
AC_REQUIRE([LT_PATH_NM])dnl
3922
AC_REQUIRE([LT_PATH_LD])dnl
3923
m4_require([_LT_DECL_SED])dnl
3924
m4_require([_LT_DECL_EGREP])dnl
3925
m4_require([_LT_TAG_COMPILER])dnl
3926
3927
# Check for command to grab the raw symbol name followed by C symbol from nm.
3928
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3929
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3930
[
3931
# These are sane defaults that work on at least a few old systems.
3932
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3933
3934
# Character class describing NM global symbol codes.
3935
symcode='[[BCDEGRST]]'
3936
3937
# Regexp to match symbols that can be accessed directly from C.
3938
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3939
3940
# Define system-specific variables.
3941
case $host_os in
3942
aix*)
3943
  symcode='[[BCDT]]'
3944
  ;;
3945
cygwin* | mingw* | pw32* | cegcc*)
3946
  symcode='[[ABCDGISTW]]'
3947
  ;;
3948
hpux*)
3949
  if test "$host_cpu" = ia64; then
3950
    symcode='[[ABCDEGRST]]'
3951
  fi
3952
  ;;
3953
irix* | nonstopux*)
3954
  symcode='[[BCDEGRST]]'
3955
  ;;
3956
osf*)
3957
  symcode='[[BCDEGQRST]]'
3958
  ;;
3959
solaris*)
3960
  symcode='[[BDRT]]'
3961
  ;;
3962
sco3.2v5*)
3963
  symcode='[[DT]]'
3964
  ;;
3965
sysv4.2uw2*)
3966
  symcode='[[DT]]'
3967
  ;;
3968
sysv5* | sco5v6* | unixware* | OpenUNIX*)
3969
  symcode='[[ABDT]]'
3970
  ;;
3971
sysv4)
3972
  symcode='[[DFNSTU]]'
3973
  ;;
3974
esac
3975
3976
# If we're using GNU nm, then use its standard symbol codes.
3977
case `$NM -V 2>&1` in
3978
*GNU* | *'with BFD'*)
3979
  symcode='[[ABCDGIRSTW]]' ;;
3980
esac
3981
3982
# Transform an extracted symbol line into a proper C declaration.
3983
# Some systems (esp. on ia64) link data and code symbols differently,
3984
# so use this general approach.
3985
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3986
3987
# Transform an extracted symbol line into symbol name and symbol address
3988
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3989
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'"
3990
3991
# Handle CRLF in mingw tool chain
3992
opt_cr=
3993
case $build_os in
3994
mingw*)
3995
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3996
  ;;
3997
esac
3998
3999
# Try without a prefix underscore, then with it.
4000
for ac_symprfx in "" "_"; do
4001
4002
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4003
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4004
4005
  # Write the raw and C identifiers.
4006
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4007
    # Fake it for dumpbin and say T for any non-static function
4008
    # and D for any global variable.
4009
    # Also find C++ and __fastcall symbols from MSVC++,
4010
    # which start with @ or ?.
4011
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4012
"     {last_section=section; section=\$ 3};"\
4013
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4014
"     \$ 0!~/External *\|/{next};"\
4015
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4016
"     {if(hide[section]) next};"\
4017
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4018
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4019
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4020
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4021
"     ' prfx=^$ac_symprfx]"
4022
  else
4023
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4024
  fi
4025
4026
  # Check to see that the pipe works correctly.
4027
  pipe_works=no
4028
4029
  rm -f conftest*
4030
  cat > conftest.$ac_ext <<_LT_EOF
4031
#ifdef __cplusplus
4032
extern "C" {
4033
#endif
4034
char nm_test_var;
4035
void nm_test_func(void);
4036
void nm_test_func(void){}
4037
#ifdef __cplusplus
4038
}
4039
#endif
4040
int main(){nm_test_var='a';nm_test_func();return(0);}
4041
_LT_EOF
4042
4043
  if AC_TRY_EVAL(ac_compile); then
4044
    # Now try to grab the symbols.
4045
    nlist=conftest.nm
4046
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4047
      # Try sorting and uniquifying the output.
4048
      if sort "$nlist" | uniq > "$nlist"T; then
4049
	mv -f "$nlist"T "$nlist"
4050
      else
4051
	rm -f "$nlist"T
4052
      fi
4053
4054
      # Make sure that we snagged all the symbols we need.
4055
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4056
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4057
	  cat <<_LT_EOF > conftest.$ac_ext
4058
#ifdef __cplusplus
4059
extern "C" {
4060
#endif
4061
4062
_LT_EOF
4063
	  # Now generate the symbol file.
4064
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4065
4066
	  cat <<_LT_EOF >> conftest.$ac_ext
4067
4068
/* The mapping between symbol names and symbols.  */
4069
const struct {
4070
  const char *name;
4071
  void       *address;
4072
}
4073
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4074
{
4075
  { "@PROGRAM@", (void *) 0 },
4076
_LT_EOF
4077
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4078
	  cat <<\_LT_EOF >> conftest.$ac_ext
4079
  {0, (void *) 0}
4080
};
4081
4082
/* This works around a problem in FreeBSD linker */
4083
#ifdef FREEBSD_WORKAROUND
4084
static const void *lt_preloaded_setup() {
4085
  return lt__PROGRAM__LTX_preloaded_symbols;
4086
}
4087
#endif
4088
4089
#ifdef __cplusplus
4090
}
4091
#endif
4092
_LT_EOF
4093
	  # Now try linking the two files.
4094
	  mv conftest.$ac_objext conftstm.$ac_objext
4095
	  lt_save_LIBS="$LIBS"
4096
	  lt_save_CFLAGS="$CFLAGS"
4097
	  LIBS="conftstm.$ac_objext"
4098
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4099
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4100
	    pipe_works=yes
4101
	  fi
4102
	  LIBS="$lt_save_LIBS"
4103
	  CFLAGS="$lt_save_CFLAGS"
4104
	else
4105
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4106
	fi
4107
      else
4108
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4109
      fi
4110
    else
4111
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4112
    fi
4113
  else
4114
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4115
    cat conftest.$ac_ext >&5
4116
  fi
4117
  rm -rf conftest* conftst*
4118
4119
  # Do not use the global_symbol_pipe unless it works.
4120
  if test "$pipe_works" = yes; then
4121
    break
4122
  else
4123
    lt_cv_sys_global_symbol_pipe=
4124
  fi
4125
done
4126
])
4127
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4128
  lt_cv_sys_global_symbol_to_cdecl=
4129
fi
4130
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4131
  AC_MSG_RESULT(failed)
4132
else
4133
  AC_MSG_RESULT(ok)
4134
fi
4135
4136
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4137
    [Take the output of nm and produce a listing of raw symbols and C names])
4138
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4139
    [Transform the output of nm in a proper C declaration])
4140
_LT_DECL([global_symbol_to_c_name_address],
4141
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4142
    [Transform the output of nm in a C name address pair])
4143
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4144
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4145
    [Transform the output of nm in a C name address pair when lib prefix is needed])
4146
]) # _LT_CMD_GLOBAL_SYMBOLS
4147
4148
4149
# _LT_COMPILER_PIC([TAGNAME])
4150
# ---------------------------
4151
m4_defun([_LT_COMPILER_PIC],
4152
[m4_require([_LT_TAG_COMPILER])dnl
4153
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4154
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4155
_LT_TAGVAR(lt_prog_compiler_static, $1)=
4156
4157
AC_MSG_CHECKING([for $compiler option to produce PIC])
4158
m4_if([$1], [CXX], [
4159
  # C++ specific cases for pic, static, wl, etc.
4160
  if test "$GXX" = yes; then
4161
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4162
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4163
4164
    case $host_os in
4165
    aix*)
4166
      # All AIX code is PIC.
4167
      if test "$host_cpu" = ia64; then
4168
	# AIX 5 now supports IA64 processor
4169
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4170
      fi
4171
      ;;
4172
4173
    amigaos*)
4174
      case $host_cpu in
4175
      powerpc)
4176
            # see comment about AmigaOS4 .so support
4177
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4178
        ;;
4179
      m68k)
4180
            # FIXME: we need at least 68020 code to build shared libraries, but
4181
            # adding the `-m68020' flag to GCC prevents building anything better,
4182
            # like `-m68040'.
4183
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4184
        ;;
4185
      esac
4186
      ;;
4187
4188
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4189
      # PIC is the default for these OSes.
4190
      ;;
4191
    mingw* | cygwin* | os2* | pw32* | cegcc*)
4192
      # This hack is so that the source file can tell whether it is being
4193
      # built for inclusion in a dll (and should export symbols for example).
4194
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4195
      # (--disable-auto-import) libraries
4196
      m4_if([$1], [GCJ], [],
4197
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4198
      ;;
4199
    darwin* | rhapsody*)
4200
      # PIC is the default on this platform
4201
      # Common symbols not allowed in MH_DYLIB files
4202
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4203
      ;;
4204
    *djgpp*)
4205
      # DJGPP does not support shared libraries at all
4206
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4207
      ;;
4208
    interix[[3-9]]*)
4209
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4210
      # Instead, we relocate shared libraries at runtime.
4211
      ;;
4212
    sysv4*MP*)
4213
      if test -d /usr/nec; then
4214
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4215
      fi
4216
      ;;
4217
    hpux*)
4218
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4219
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4220
      # sets the default TLS model and affects inlining.
4221
      case $host_cpu in
4222
      hppa*64*)
4223
	;;
4224
      *)
4225
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4226
	;;
4227
      esac
4228
      ;;
4229
    *qnx* | *nto*)
4230
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4231
      # it will coredump.
4232
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4233
      ;;
4234
    *)
4235
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4236
      ;;
4237
    esac
4238
  else
4239
    case $host_os in
4240
      aix[[4-9]]*)
4241
	# All AIX code is PIC.
4242
	if test "$host_cpu" = ia64; then
4243
	  # AIX 5 now supports IA64 processor
4244
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4245
	else
4246
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4247
	fi
4248
	;;
4249
      chorus*)
4250
	case $cc_basename in
4251
	cxch68*)
4252
	  # Green Hills C++ Compiler
4253
	  # _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"
4254
	  ;;
4255
	esac
4256
	;;
4257
      dgux*)
4258
	case $cc_basename in
4259
	  ec++*)
4260
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4261
	    ;;
4262
	  ghcx*)
4263
	    # Green Hills C++ Compiler
4264
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4265
	    ;;
4266
	  *)
4267
	    ;;
4268
	esac
4269
	;;
4270
      freebsd* | dragonfly*)
4271
	# FreeBSD uses GNU C++
4272
	;;
4273
      hpux9* | hpux10* | hpux11*)
4274
	case $cc_basename in
4275
	  CC*)
4276
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4277
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4278
	    if test "$host_cpu" != ia64; then
4279
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4280
	    fi
4281
	    ;;
4282
	  aCC*)
4283
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4284
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4285
	    case $host_cpu in
4286
	    hppa*64*|ia64*)
4287
	      # +Z the default
4288
	      ;;
4289
	    *)
4290
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4291
	      ;;
4292
	    esac
4293
	    ;;
4294
	  *)
4295
	    ;;
4296
	esac
4297
	;;
4298
      interix*)
4299
	# This is c89, which is MS Visual C++ (no shared libs)
4300
	# Anyone wants to do a port?
4301
	;;
4302
      irix5* | irix6* | nonstopux*)
4303
	case $cc_basename in
4304
	  CC*)
4305
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4306
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4307
	    # CC pic flag -KPIC is the default.
4308
	    ;;
4309
	  *)
4310
	    ;;
4311
	esac
4312
	;;
37.1.5 by Ken VanDine
Import upstream version 0.2.100
4313
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
4314
	case $cc_basename in
4315
	  KCC*)
4316
	    # KAI C++ Compiler
4317
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4318
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4319
	    ;;
4320
	  ecpc* )
4321
	    # old Intel C++ for x86_64 which still supported -KPIC.
4322
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4323
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4324
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4325
	    ;;
4326
	  icpc* )
4327
	    # Intel C++, used to be incompatible with GCC.
4328
	    # ICC 10 doesn't accept -KPIC any more.
4329
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4330
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4331
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4332
	    ;;
4333
	  pgCC* | pgcpp*)
4334
	    # Portland Group C++ compiler
4335
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4336
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4337
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4338
	    ;;
4339
	  cxx*)
4340
	    # Compaq C++
4341
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4342
	    # Linux and Compaq Tru64 Unix objects are PIC.
4343
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4344
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4345
	    ;;
4346
	  xlc* | xlC*)
4347
	    # IBM XL 8.0 on PPC
4348
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4349
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4350
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4351
	    ;;
4352
	  *)
4353
	    case `$CC -V 2>&1 | sed 5q` in
4354
	    *Sun\ C*)
4355
	      # Sun C++ 5.9
4356
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4357
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4358
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4359
	      ;;
4360
	    esac
4361
	    ;;
4362
	esac
4363
	;;
4364
      lynxos*)
4365
	;;
4366
      m88k*)
4367
	;;
4368
      mvs*)
4369
	case $cc_basename in
4370
	  cxx*)
4371
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4372
	    ;;
4373
	  *)
4374
	    ;;
4375
	esac
4376
	;;
4377
      netbsd* | netbsdelf*-gnu)
4378
	;;
4379
      *qnx* | *nto*)
4380
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4381
        # it will coredump.
4382
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4383
        ;;
4384
      osf3* | osf4* | osf5*)
4385
	case $cc_basename in
4386
	  KCC*)
4387
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4388
	    ;;
4389
	  RCC*)
4390
	    # Rational C++ 2.4.1
4391
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4392
	    ;;
4393
	  cxx*)
4394
	    # Digital/Compaq C++
4395
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4396
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4397
	    # Linux and Compaq Tru64 Unix objects are PIC.
4398
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4399
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4400
	    ;;
4401
	  *)
4402
	    ;;
4403
	esac
4404
	;;
4405
      psos*)
4406
	;;
4407
      solaris*)
4408
	case $cc_basename in
4409
	  CC*)
4410
	    # Sun C++ 4.2, 5.x and Centerline C++
4411
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4412
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4413
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4414
	    ;;
4415
	  gcx*)
4416
	    # Green Hills C++ Compiler
4417
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4418
	    ;;
4419
	  *)
4420
	    ;;
4421
	esac
4422
	;;
4423
      sunos4*)
4424
	case $cc_basename in
4425
	  CC*)
4426
	    # Sun C++ 4.x
4427
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4428
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4429
	    ;;
4430
	  lcc*)
4431
	    # Lucid
4432
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4433
	    ;;
4434
	  *)
4435
	    ;;
4436
	esac
4437
	;;
4438
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4439
	case $cc_basename in
4440
	  CC*)
4441
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4442
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4443
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4444
	    ;;
4445
	esac
4446
	;;
4447
      tandem*)
4448
	case $cc_basename in
4449
	  NCC*)
4450
	    # NonStop-UX NCC 3.20
4451
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4452
	    ;;
4453
	  *)
4454
	    ;;
4455
	esac
4456
	;;
4457
      vxworks*)
4458
	;;
4459
      *)
4460
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4461
	;;
4462
    esac
4463
  fi
4464
],
4465
[
4466
  if test "$GCC" = yes; then
4467
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4468
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4469
4470
    case $host_os in
4471
      aix*)
4472
      # All AIX code is PIC.
4473
      if test "$host_cpu" = ia64; then
4474
	# AIX 5 now supports IA64 processor
4475
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4476
      fi
4477
      ;;
4478
4479
    amigaos*)
4480
      case $host_cpu in
4481
      powerpc)
4482
            # see comment about AmigaOS4 .so support
4483
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4484
        ;;
4485
      m68k)
4486
            # FIXME: we need at least 68020 code to build shared libraries, but
4487
            # adding the `-m68020' flag to GCC prevents building anything better,
4488
            # like `-m68040'.
4489
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4490
        ;;
4491
      esac
4492
      ;;
4493
4494
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4495
      # PIC is the default for these OSes.
4496
      ;;
4497
4498
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4499
      # This hack is so that the source file can tell whether it is being
4500
      # built for inclusion in a dll (and should export symbols for example).
4501
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4502
      # (--disable-auto-import) libraries
4503
      m4_if([$1], [GCJ], [],
4504
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4505
      ;;
4506
4507
    darwin* | rhapsody*)
4508
      # PIC is the default on this platform
4509
      # Common symbols not allowed in MH_DYLIB files
4510
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4511
      ;;
4512
4513
    hpux*)
4514
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4515
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4516
      # sets the default TLS model and affects inlining.
4517
      case $host_cpu in
4518
      hppa*64*)
4519
	# +Z the default
4520
	;;
4521
      *)
4522
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4523
	;;
4524
      esac
4525
      ;;
4526
4527
    interix[[3-9]]*)
4528
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4529
      # Instead, we relocate shared libraries at runtime.
4530
      ;;
4531
4532
    msdosdjgpp*)
4533
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4534
      # on systems that don't support them.
4535
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4536
      enable_shared=no
4537
      ;;
4538
4539
    *nto* | *qnx*)
4540
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4541
      # it will coredump.
4542
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4543
      ;;
4544
4545
    sysv4*MP*)
4546
      if test -d /usr/nec; then
4547
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4548
      fi
4549
      ;;
4550
4551
    *)
4552
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4553
      ;;
4554
    esac
4555
  else
4556
    # PORTME Check for flag to pass linker flags through the system compiler.
4557
    case $host_os in
4558
    aix*)
4559
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4560
      if test "$host_cpu" = ia64; then
4561
	# AIX 5 now supports IA64 processor
4562
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4563
      else
4564
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4565
      fi
4566
      ;;
4567
4568
    mingw* | cygwin* | pw32* | os2* | cegcc*)
4569
      # This hack is so that the source file can tell whether it is being
4570
      # built for inclusion in a dll (and should export symbols for example).
4571
      m4_if([$1], [GCJ], [],
4572
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4573
      ;;
4574
4575
    hpux9* | hpux10* | hpux11*)
4576
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4577
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4578
      # not for PA HP-UX.
4579
      case $host_cpu in
4580
      hppa*64*|ia64*)
4581
	# +Z the default
4582
	;;
4583
      *)
4584
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4585
	;;
4586
      esac
4587
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4588
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4589
      ;;
4590
4591
    irix5* | irix6* | nonstopux*)
4592
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4593
      # PIC (with -KPIC) is the default.
4594
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4595
      ;;
4596
37.1.5 by Ken VanDine
Import upstream version 0.2.100
4597
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
4598
      case $cc_basename in
4599
      # old Intel for x86_64 which still supported -KPIC.
4600
      ecc*)
4601
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4602
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4603
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4604
        ;;
4605
      # icc used to be incompatible with GCC.
4606
      # ICC 10 doesn't accept -KPIC any more.
4607
      icc* | ifort*)
4608
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4609
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4610
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4611
        ;;
4612
      # Lahey Fortran 8.1.
4613
      lf95*)
4614
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4615
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4616
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4617
	;;
4618
      pgcc* | pgf77* | pgf90* | pgf95*)
4619
        # Portland Group compilers (*not* the Pentium gcc compiler,
4620
	# which looks to be a dead project)
4621
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4622
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4623
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4624
        ;;
4625
      ccc*)
4626
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4627
        # All Alpha code is PIC.
4628
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4629
        ;;
4630
      xl*)
4631
	# IBM XL C 8.0/Fortran 10.1 on PPC
4632
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4633
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4634
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4635
	;;
4636
      *)
4637
	case `$CC -V 2>&1 | sed 5q` in
4638
	*Sun\ C*)
4639
	  # Sun C 5.9
4640
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4641
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4642
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4643
	  ;;
4644
	*Sun\ F*)
4645
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4646
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4647
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4648
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4649
	  ;;
4650
	esac
4651
	;;
4652
      esac
4653
      ;;
4654
4655
    newsos6)
4656
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4657
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4658
      ;;
4659
4660
    *nto* | *qnx*)
4661
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4662
      # it will coredump.
4663
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4664
      ;;
4665
4666
    osf3* | osf4* | osf5*)
4667
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4668
      # All OSF/1 code is PIC.
4669
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4670
      ;;
4671
4672
    rdos*)
4673
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4674
      ;;
4675
4676
    solaris*)
4677
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4678
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4679
      case $cc_basename in
4680
      f77* | f90* | f95*)
4681
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4682
      *)
4683
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4684
      esac
4685
      ;;
4686
4687
    sunos4*)
4688
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4689
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4690
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4691
      ;;
4692
4693
    sysv4 | sysv4.2uw2* | sysv4.3*)
4694
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4695
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4696
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4697
      ;;
4698
4699
    sysv4*MP*)
4700
      if test -d /usr/nec ;then
4701
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4702
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4703
      fi
4704
      ;;
4705
4706
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4707
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4708
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4709
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4710
      ;;
4711
4712
    unicos*)
4713
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4714
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4715
      ;;
4716
4717
    uts4*)
4718
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4719
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4720
      ;;
4721
4722
    *)
4723
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4724
      ;;
4725
    esac
4726
  fi
4727
])
4728
case $host_os in
4729
  # For platforms which do not support PIC, -DPIC is meaningless:
4730
  *djgpp*)
4731
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4732
    ;;
4733
  *)
4734
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4735
    ;;
4736
esac
4737
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4738
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4739
	[How to pass a linker flag through the compiler])
4740
4741
#
4742
# Check to make sure the PIC flag actually works.
4743
#
4744
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4745
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4746
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4747
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4748
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4749
     "" | " "*) ;;
4750
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4751
     esac],
4752
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4753
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4754
fi
4755
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4756
	[Additional compiler flags for building library objects])
4757
4758
#
4759
# Check to make sure the static flag actually works.
4760
#
4761
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4762
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4763
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4764
  $lt_tmp_static_flag,
4765
  [],
4766
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4767
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4768
	[Compiler flag to prevent dynamic linking])
4769
])# _LT_COMPILER_PIC
4770
4771
4772
# _LT_LINKER_SHLIBS([TAGNAME])
4773
# ----------------------------
4774
# See if the linker supports building shared libraries.
4775
m4_defun([_LT_LINKER_SHLIBS],
4776
[AC_REQUIRE([LT_PATH_LD])dnl
4777
AC_REQUIRE([LT_PATH_NM])dnl
4778
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4779
m4_require([_LT_DECL_EGREP])dnl
4780
m4_require([_LT_DECL_SED])dnl
4781
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4782
m4_require([_LT_TAG_COMPILER])dnl
4783
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4784
m4_if([$1], [CXX], [
4785
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4786
  case $host_os in
4787
  aix[[4-9]]*)
4788
    # If we're using GNU nm, then we don't want the "-C" option.
4789
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4790
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4791
      _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'
4792
    else
4793
      _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'
4794
    fi
4795
    ;;
4796
  pw32*)
4797
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4798
  ;;
4799
  cygwin* | mingw* | cegcc*)
4800
    _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'
4801
  ;;
4802
  linux* | k*bsd*-gnu)
4803
    _LT_TAGVAR(link_all_deplibs, $1)=no
4804
  ;;
4805
  *)
4806
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4807
  ;;
4808
  esac
4809
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4810
], [
4811
  runpath_var=
4812
  _LT_TAGVAR(allow_undefined_flag, $1)=
4813
  _LT_TAGVAR(always_export_symbols, $1)=no
4814
  _LT_TAGVAR(archive_cmds, $1)=
4815
  _LT_TAGVAR(archive_expsym_cmds, $1)=
4816
  _LT_TAGVAR(compiler_needs_object, $1)=no
4817
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4818
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4819
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4820
  _LT_TAGVAR(hardcode_automatic, $1)=no
4821
  _LT_TAGVAR(hardcode_direct, $1)=no
4822
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4823
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4824
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4825
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4826
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4827
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4828
  _LT_TAGVAR(inherit_rpath, $1)=no
4829
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4830
  _LT_TAGVAR(module_cmds, $1)=
4831
  _LT_TAGVAR(module_expsym_cmds, $1)=
4832
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4833
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4834
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4835
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4836
  # include_expsyms should be a list of space-separated symbols to be *always*
4837
  # included in the symbol list
4838
  _LT_TAGVAR(include_expsyms, $1)=
4839
  # exclude_expsyms can be an extended regexp of symbols to exclude
4840
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4841
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4842
  # as well as any symbol that contains `d'.
4843
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4844
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4845
  # platforms (ab)use it in PIC code, but their linkers get confused if
4846
  # the symbol is explicitly referenced.  Since portable code cannot
4847
  # rely on this symbol name, it's probably fine to never include it in
4848
  # preloaded symbol tables.
4849
  # Exclude shared library initialization/finalization symbols.
4850
dnl Note also adjust exclude_expsyms for C++ above.
4851
  extract_expsyms_cmds=
4852
4853
  case $host_os in
4854
  cygwin* | mingw* | pw32* | cegcc*)
4855
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4856
    # When not using gcc, we currently assume that we are using
4857
    # Microsoft Visual C++.
4858
    if test "$GCC" != yes; then
4859
      with_gnu_ld=no
4860
    fi
4861
    ;;
4862
  interix*)
4863
    # we just hope/assume this is gcc and not c89 (= MSVC++)
4864
    with_gnu_ld=yes
4865
    ;;
4866
  openbsd*)
4867
    with_gnu_ld=no
4868
    ;;
4869
  linux* | k*bsd*-gnu)
4870
    _LT_TAGVAR(link_all_deplibs, $1)=no
4871
    ;;
4872
  esac
4873
4874
  _LT_TAGVAR(ld_shlibs, $1)=yes
4875
  if test "$with_gnu_ld" = yes; then
4876
    # If archive_cmds runs LD, not CC, wlarc should be empty
4877
    wlarc='${wl}'
4878
4879
    # Set some defaults for GNU ld with shared library support. These
4880
    # are reset later if shared libraries are not supported. Putting them
4881
    # here allows them to be overridden if necessary.
4882
    runpath_var=LD_RUN_PATH
4883
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4884
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4885
    # ancient GNU ld didn't support --whole-archive et. al.
4886
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4887
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4888
    else
4889
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4890
    fi
4891
    supports_anon_versioning=no
4892
    case `$LD -v 2>&1` in
37.1.5 by Ken VanDine
Import upstream version 0.2.100
4893
      *GNU\ gold*) supports_anon_versioning=yes ;;
37 by Ken VanDine
Import upstream version 0.2.1
4894
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4895
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4896
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4897
      *\ 2.11.*) ;; # other 2.11 versions
4898
      *) supports_anon_versioning=yes ;;
4899
    esac
4900
4901
    # See if GNU ld supports shared libraries.
4902
    case $host_os in
4903
    aix[[3-9]]*)
4904
      # On AIX/PPC, the GNU linker is very broken
4905
      if test "$host_cpu" != ia64; then
4906
	_LT_TAGVAR(ld_shlibs, $1)=no
4907
	cat <<_LT_EOF 1>&2
4908
4909
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4910
*** to be unable to reliably create shared libraries on AIX.
4911
*** Therefore, libtool is disabling shared libraries support.  If you
4912
*** really care for shared libraries, you may want to modify your PATH
4913
*** so that a non-GNU linker is found, and then restart.
4914
4915
_LT_EOF
4916
      fi
4917
      ;;
4918
4919
    amigaos*)
4920
      case $host_cpu in
4921
      powerpc)
4922
            # see comment about AmigaOS4 .so support
4923
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4924
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4925
        ;;
4926
      m68k)
4927
            _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)'
4928
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4929
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4930
        ;;
4931
      esac
4932
      ;;
4933
4934
    beos*)
4935
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4936
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4937
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4938
	# support --undefined.  This deserves some investigation.  FIXME
4939
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4940
      else
4941
	_LT_TAGVAR(ld_shlibs, $1)=no
4942
      fi
4943
      ;;
4944
4945
    cygwin* | mingw* | pw32* | cegcc*)
4946
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4947
      # as there is no search path for DLLs.
4948
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4949
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4950
      _LT_TAGVAR(always_export_symbols, $1)=no
4951
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4952
      _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'
4953
4954
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4955
        _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'
4956
	# If the export-symbols file already is a .def file (1st line
4957
	# is EXPORTS), use it as is; otherwise, prepend...
4958
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4959
	  cp $export_symbols $output_objdir/$soname.def;
4960
	else
4961
	  echo EXPORTS > $output_objdir/$soname.def;
4962
	  cat $export_symbols >> $output_objdir/$soname.def;
4963
	fi~
4964
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4965
      else
4966
	_LT_TAGVAR(ld_shlibs, $1)=no
4967
      fi
4968
      ;;
4969
4970
    interix[[3-9]]*)
4971
      _LT_TAGVAR(hardcode_direct, $1)=no
4972
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4973
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4974
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4975
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4976
      # Instead, shared libraries are loaded at an image base (0x10000000 by
4977
      # default) and relocated if they conflict, which is a slow very memory
4978
      # consuming and fragmenting process.  To avoid this, we pick a random,
4979
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4980
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4981
      _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'
4982
      _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'
4983
      ;;
4984
37.1.5 by Ken VanDine
Import upstream version 0.2.100
4985
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
4986
      tmp_diet=no
4987
      if test "$host_os" = linux-dietlibc; then
4988
	case $cc_basename in
4989
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4990
	esac
4991
      fi
4992
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4993
	 && test "$tmp_diet" = no
4994
      then
4995
	tmp_addflag=
4996
	tmp_sharedflag='-shared'
4997
	case $cc_basename,$host_cpu in
4998
        pgcc*)				# Portland Group C compiler
4999
	  _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'
5000
	  tmp_addflag=' $pic_flag'
5001
	  ;;
5002
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5003
	  _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'
5004
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5005
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5006
	  tmp_addflag=' -i_dynamic' ;;
5007
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5008
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5009
	ifc* | ifort*)			# Intel Fortran compiler
5010
	  tmp_addflag=' -nofor_main' ;;
5011
	lf95*)				# Lahey Fortran 8.1
5012
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5013
	  tmp_sharedflag='--shared' ;;
5014
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5015
	  tmp_sharedflag='-qmkshrobj'
5016
	  tmp_addflag= ;;
5017
	esac
5018
	case `$CC -V 2>&1 | sed 5q` in
5019
	*Sun\ C*)			# Sun C 5.9
5020
	  _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'
5021
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5022
	  tmp_sharedflag='-G' ;;
5023
	*Sun\ F*)			# Sun Fortran 8.3
5024
	  tmp_sharedflag='-G' ;;
5025
	esac
5026
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5027
5028
        if test "x$supports_anon_versioning" = xyes; then
5029
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5030
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5031
	    echo "local: *; };" >> $output_objdir/$libname.ver~
5032
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5033
        fi
5034
5035
	case $cc_basename in
5036
	xlf*)
5037
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5038
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5039
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5040
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5041
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5042
	  if test "x$supports_anon_versioning" = xyes; then
5043
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5044
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5045
	      echo "local: *; };" >> $output_objdir/$libname.ver~
5046
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5047
	  fi
5048
	  ;;
5049
	esac
5050
      else
5051
        _LT_TAGVAR(ld_shlibs, $1)=no
5052
      fi
5053
      ;;
5054
5055
    netbsd* | netbsdelf*-gnu)
5056
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5057
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5058
	wlarc=
5059
      else
5060
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5061
	_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'
5062
      fi
5063
      ;;
5064
5065
    solaris*)
5066
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5067
	_LT_TAGVAR(ld_shlibs, $1)=no
5068
	cat <<_LT_EOF 1>&2
5069
5070
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5071
*** create shared libraries on Solaris systems.  Therefore, libtool
5072
*** is disabling shared libraries support.  We urge you to upgrade GNU
5073
*** binutils to release 2.9.1 or newer.  Another option is to modify
5074
*** your PATH or compiler configuration so that the native linker is
5075
*** used, and then restart.
5076
5077
_LT_EOF
5078
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5079
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5080
	_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'
5081
      else
5082
	_LT_TAGVAR(ld_shlibs, $1)=no
5083
      fi
5084
      ;;
5085
5086
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5087
      case `$LD -v 2>&1` in
5088
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5089
	_LT_TAGVAR(ld_shlibs, $1)=no
5090
	cat <<_LT_EOF 1>&2
5091
5092
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5093
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5094
*** is disabling shared libraries support.  We urge you to upgrade GNU
5095
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5096
*** your PATH or compiler configuration so that the native linker is
5097
*** used, and then restart.
5098
5099
_LT_EOF
5100
	;;
5101
	*)
5102
	  # For security reasons, it is highly recommended that you always
5103
	  # use absolute paths for naming shared libraries, and exclude the
5104
	  # DT_RUNPATH tag from executables and libraries.  But doing so
5105
	  # requires that you compile everything twice, which is a pain.
5106
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5107
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5108
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5109
	    _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'
5110
	  else
5111
	    _LT_TAGVAR(ld_shlibs, $1)=no
5112
	  fi
5113
	;;
5114
      esac
5115
      ;;
5116
5117
    sunos4*)
5118
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5119
      wlarc=
5120
      _LT_TAGVAR(hardcode_direct, $1)=yes
5121
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5122
      ;;
5123
5124
    *)
5125
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5126
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5127
	_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'
5128
      else
5129
	_LT_TAGVAR(ld_shlibs, $1)=no
5130
      fi
5131
      ;;
5132
    esac
5133
5134
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5135
      runpath_var=
5136
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5137
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5138
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5139
    fi
5140
  else
5141
    # PORTME fill in a description of your system's linker (not GNU ld)
5142
    case $host_os in
5143
    aix3*)
5144
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5145
      _LT_TAGVAR(always_export_symbols, $1)=yes
5146
      _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'
5147
      # Note: this linker hardcodes the directories in LIBPATH if there
5148
      # are no directories specified by -L.
5149
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5150
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5151
	# Neither direct hardcoding nor static linking is supported with a
5152
	# broken collect2.
5153
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5154
      fi
5155
      ;;
5156
5157
    aix[[4-9]]*)
5158
      if test "$host_cpu" = ia64; then
5159
	# On IA64, the linker does run time linking by default, so we don't
5160
	# have to do anything special.
5161
	aix_use_runtimelinking=no
5162
	exp_sym_flag='-Bexport'
5163
	no_entry_flag=""
5164
      else
5165
	# If we're using GNU nm, then we don't want the "-C" option.
5166
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5167
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5168
	  _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'
5169
	else
5170
	  _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'
5171
	fi
5172
	aix_use_runtimelinking=no
5173
5174
	# Test if we are trying to use run time linking or normal
5175
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5176
	# need to do runtime linking.
5177
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5178
	  for ld_flag in $LDFLAGS; do
5179
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5180
	    aix_use_runtimelinking=yes
5181
	    break
5182
	  fi
5183
	  done
5184
	  ;;
5185
	esac
5186
5187
	exp_sym_flag='-bexport'
5188
	no_entry_flag='-bnoentry'
5189
      fi
5190
5191
      # When large executables or shared objects are built, AIX ld can
5192
      # have problems creating the table of contents.  If linking a library
5193
      # or program results in "error TOC overflow" add -mminimal-toc to
5194
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5195
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5196
5197
      _LT_TAGVAR(archive_cmds, $1)=''
5198
      _LT_TAGVAR(hardcode_direct, $1)=yes
5199
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5200
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5201
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5202
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5203
5204
      if test "$GCC" = yes; then
5205
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5206
	# We only want to do this on AIX 4.2 and lower, the check
5207
	# below for broken collect2 doesn't work under 4.3+
5208
	  collect2name=`${CC} -print-prog-name=collect2`
5209
	  if test -f "$collect2name" &&
5210
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5211
	  then
5212
	  # We have reworked collect2
5213
	  :
5214
	  else
5215
	  # We have old collect2
5216
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5217
	  # It fails to find uninstalled libraries when the uninstalled
5218
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5219
	  # to unsupported forces relinking
5220
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5221
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5222
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5223
	  fi
5224
	  ;;
5225
	esac
5226
	shared_flag='-shared'
5227
	if test "$aix_use_runtimelinking" = yes; then
5228
	  shared_flag="$shared_flag "'${wl}-G'
5229
	fi
5230
	_LT_TAGVAR(link_all_deplibs, $1)=no
5231
      else
5232
	# not using gcc
5233
	if test "$host_cpu" = ia64; then
5234
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5235
	# chokes on -Wl,-G. The following line is correct:
5236
	  shared_flag='-G'
5237
	else
5238
	  if test "$aix_use_runtimelinking" = yes; then
5239
	    shared_flag='${wl}-G'
5240
	  else
5241
	    shared_flag='${wl}-bM:SRE'
5242
	  fi
5243
	fi
5244
      fi
5245
5246
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5247
      # It seems that -bexpall does not export symbols beginning with
5248
      # underscore (_), so it is better to generate a list of symbols to export.
5249
      _LT_TAGVAR(always_export_symbols, $1)=yes
5250
      if test "$aix_use_runtimelinking" = yes; then
5251
	# Warning - without using the other runtime loading flags (-brtl),
5252
	# -berok will link without error, but may produce a broken library.
5253
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5254
        # Determine the default libpath from the value encoded in an
5255
        # empty executable.
5256
        _LT_SYS_MODULE_PATH_AIX
5257
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5258
        _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"
5259
      else
5260
	if test "$host_cpu" = ia64; then
5261
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5262
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5263
	  _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"
5264
	else
5265
	 # Determine the default libpath from the value encoded in an
5266
	 # empty executable.
5267
	 _LT_SYS_MODULE_PATH_AIX
5268
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5269
	  # Warning - without using the other run time loading flags,
5270
	  # -berok will link without error, but may produce a broken library.
5271
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5272
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5273
	  # Exported symbols can be pulled into shared objects from archives
5274
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5275
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5276
	  # This is similar to how AIX traditionally builds its shared libraries.
5277
	  _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'
5278
	fi
5279
      fi
5280
      ;;
5281
5282
    amigaos*)
5283
      case $host_cpu in
5284
      powerpc)
5285
            # see comment about AmigaOS4 .so support
5286
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5287
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5288
        ;;
5289
      m68k)
5290
            _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)'
5291
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5292
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5293
        ;;
5294
      esac
5295
      ;;
5296
5297
    bsdi[[45]]*)
5298
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5299
      ;;
5300
5301
    cygwin* | mingw* | pw32* | cegcc*)
5302
      # When not using gcc, we currently assume that we are using
5303
      # Microsoft Visual C++.
5304
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5305
      # no search path for DLLs.
5306
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5307
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5308
      # Tell ltmain to make .lib files, not .a files.
5309
      libext=lib
5310
      # Tell ltmain to make .dll files, not .so files.
5311
      shrext_cmds=".dll"
5312
      # FIXME: Setting linknames here is a bad hack.
5313
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5314
      # The linker will automatically build a .lib file if we build a DLL.
5315
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5316
      # FIXME: Should let the user specify the lib program.
5317
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5318
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5319
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5320
      ;;
5321
5322
    darwin* | rhapsody*)
5323
      _LT_DARWIN_LINKER_FEATURES($1)
5324
      ;;
5325
5326
    dgux*)
5327
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5328
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5329
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5330
      ;;
5331
5332
    freebsd1*)
5333
      _LT_TAGVAR(ld_shlibs, $1)=no
5334
      ;;
5335
5336
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5337
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5338
    # does not break anything, and helps significantly (at the cost of a little
5339
    # extra space).
5340
    freebsd2.2*)
5341
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5342
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5343
      _LT_TAGVAR(hardcode_direct, $1)=yes
5344
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5345
      ;;
5346
5347
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5348
    freebsd2*)
5349
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5350
      _LT_TAGVAR(hardcode_direct, $1)=yes
5351
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5352
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5353
      ;;
5354
5355
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5356
    freebsd* | dragonfly*)
5357
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5358
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5359
      _LT_TAGVAR(hardcode_direct, $1)=yes
5360
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5361
      ;;
5362
5363
    hpux9*)
5364
      if test "$GCC" = yes; then
5365
	_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'
5366
      else
5367
	_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'
5368
      fi
5369
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5370
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5371
      _LT_TAGVAR(hardcode_direct, $1)=yes
5372
5373
      # hardcode_minus_L: Not really in the search PATH,
5374
      # but as the default location of the library.
5375
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5376
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5377
      ;;
5378
5379
    hpux10*)
5380
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5381
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5382
      else
5383
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5384
      fi
5385
      if test "$with_gnu_ld" = no; then
5386
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5387
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5388
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5389
	_LT_TAGVAR(hardcode_direct, $1)=yes
5390
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5391
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5392
	# hardcode_minus_L: Not really in the search PATH,
5393
	# but as the default location of the library.
5394
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5395
      fi
5396
      ;;
5397
5398
    hpux11*)
5399
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5400
	case $host_cpu in
5401
	hppa*64*)
5402
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5403
	  ;;
5404
	ia64*)
5405
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5406
	  ;;
5407
	*)
5408
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5409
	  ;;
5410
	esac
5411
      else
5412
	case $host_cpu in
5413
	hppa*64*)
5414
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5415
	  ;;
5416
	ia64*)
5417
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5418
	  ;;
5419
	*)
5420
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5421
	  ;;
5422
	esac
5423
      fi
5424
      if test "$with_gnu_ld" = no; then
5425
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5426
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5427
5428
	case $host_cpu in
5429
	hppa*64*|ia64*)
5430
	  _LT_TAGVAR(hardcode_direct, $1)=no
5431
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5432
	  ;;
5433
	*)
5434
	  _LT_TAGVAR(hardcode_direct, $1)=yes
5435
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5436
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5437
5438
	  # hardcode_minus_L: Not really in the search PATH,
5439
	  # but as the default location of the library.
5440
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5441
	  ;;
5442
	esac
5443
      fi
5444
      ;;
5445
5446
    irix5* | irix6* | nonstopux*)
5447
      if test "$GCC" = yes; then
5448
	_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'
5449
	# Try to use the -exported_symbol ld option, if it does not
5450
	# work, assume that -exports_file does not work either and
5451
	# implicitly export all symbols.
5452
        save_LDFLAGS="$LDFLAGS"
5453
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5454
        AC_LINK_IFELSE(int foo(void) {},
5455
          _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'
5456
        )
5457
        LDFLAGS="$save_LDFLAGS"
5458
      else
5459
	_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'
5460
	_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'
5461
      fi
5462
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5463
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5464
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5465
      _LT_TAGVAR(inherit_rpath, $1)=yes
5466
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5467
      ;;
5468
5469
    netbsd* | netbsdelf*-gnu)
5470
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5471
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5472
      else
5473
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5474
      fi
5475
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5476
      _LT_TAGVAR(hardcode_direct, $1)=yes
5477
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5478
      ;;
5479
5480
    newsos6)
5481
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5482
      _LT_TAGVAR(hardcode_direct, $1)=yes
5483
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5484
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5485
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5486
      ;;
5487
5488
    *nto* | *qnx*)
5489
      ;;
5490
5491
    openbsd*)
5492
      if test -f /usr/libexec/ld.so; then
5493
	_LT_TAGVAR(hardcode_direct, $1)=yes
5494
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5495
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5496
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5497
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5498
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5499
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5500
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5501
	else
5502
	  case $host_os in
5503
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5504
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5505
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5506
	     ;;
5507
	   *)
5508
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5509
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5510
	     ;;
5511
	  esac
5512
	fi
5513
      else
5514
	_LT_TAGVAR(ld_shlibs, $1)=no
5515
      fi
5516
      ;;
5517
5518
    os2*)
5519
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5520
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5521
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5522
      _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'
5523
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5524
      ;;
5525
5526
    osf3*)
5527
      if test "$GCC" = yes; then
5528
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5529
	_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'
5530
      else
5531
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5532
	_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'
5533
      fi
5534
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5535
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5536
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5537
      ;;
5538
5539
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5540
      if test "$GCC" = yes; then
5541
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5542
	_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'
5543
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5544
      else
5545
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5546
	_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'
5547
	_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~
5548
	$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'
5549
5550
	# Both c and cxx compiler support -rpath directly
5551
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5552
      fi
5553
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5554
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5555
      ;;
5556
5557
    solaris*)
5558
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5559
      if test "$GCC" = yes; then
5560
	wlarc='${wl}'
5561
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5562
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5563
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5564
      else
5565
	case `$CC -V 2>&1` in
5566
	*"Compilers 5.0"*)
5567
	  wlarc=''
5568
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5569
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5570
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5571
	  ;;
5572
	*)
5573
	  wlarc='${wl}'
5574
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5575
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5576
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5577
	  ;;
5578
	esac
5579
      fi
5580
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5581
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5582
      case $host_os in
5583
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5584
      *)
5585
	# The compiler driver will combine and reorder linker options,
5586
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5587
	# but is careful enough not to reorder.
5588
	# Supported since Solaris 2.6 (maybe 2.5.1?)
5589
	if test "$GCC" = yes; then
5590
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5591
	else
5592
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5593
	fi
5594
	;;
5595
      esac
5596
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5597
      ;;
5598
5599
    sunos4*)
5600
      if test "x$host_vendor" = xsequent; then
5601
	# Use $CC to link under sequent, because it throws in some extra .o
5602
	# files that make .init and .fini sections work.
5603
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5604
      else
5605
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5606
      fi
5607
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5608
      _LT_TAGVAR(hardcode_direct, $1)=yes
5609
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5610
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5611
      ;;
5612
5613
    sysv4)
5614
      case $host_vendor in
5615
	sni)
5616
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5617
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5618
	;;
5619
	siemens)
5620
	  ## LD is ld it makes a PLAMLIB
5621
	  ## CC just makes a GrossModule.
5622
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5623
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5624
	  _LT_TAGVAR(hardcode_direct, $1)=no
5625
        ;;
5626
	motorola)
5627
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5628
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5629
	;;
5630
      esac
5631
      runpath_var='LD_RUN_PATH'
5632
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5633
      ;;
5634
5635
    sysv4.3*)
5636
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5637
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5638
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5639
      ;;
5640
5641
    sysv4*MP*)
5642
      if test -d /usr/nec; then
5643
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5644
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5645
	runpath_var=LD_RUN_PATH
5646
	hardcode_runpath_var=yes
5647
	_LT_TAGVAR(ld_shlibs, $1)=yes
5648
      fi
5649
      ;;
5650
5651
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5652
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5653
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5654
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5655
      runpath_var='LD_RUN_PATH'
5656
5657
      if test "$GCC" = yes; then
5658
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5659
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5660
      else
5661
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5662
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5663
      fi
5664
      ;;
5665
5666
    sysv5* | sco3.2v5* | sco5v6*)
5667
      # Note: We can NOT use -z defs as we might desire, because we do not
5668
      # link with -lc, and that would cause any symbols used from libc to
5669
      # always be unresolved, which means just about no library would
5670
      # ever link correctly.  If we're not using GNU ld we use -z text
5671
      # though, which does catch some bad symbols but isn't as heavy-handed
5672
      # as -z defs.
5673
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5674
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5675
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5676
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5677
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5678
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5679
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5680
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5681
      runpath_var='LD_RUN_PATH'
5682
5683
      if test "$GCC" = yes; then
5684
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5685
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5686
      else
5687
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5688
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5689
      fi
5690
      ;;
5691
5692
    uts4*)
5693
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5694
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5695
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5696
      ;;
5697
5698
    *)
5699
      _LT_TAGVAR(ld_shlibs, $1)=no
5700
      ;;
5701
    esac
5702
5703
    if test x$host_vendor = xsni; then
5704
      case $host in
5705
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5706
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5707
	;;
5708
      esac
5709
    fi
5710
  fi
5711
])
5712
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5713
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5714
5715
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5716
5717
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5718
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5719
_LT_DECL([], [extract_expsyms_cmds], [2],
5720
    [The commands to extract the exported symbol list from a shared archive])
5721
5722
#
5723
# Do we need to explicitly link libc?
5724
#
5725
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5726
x|xyes)
5727
  # Assume -lc should be added
5728
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5729
5730
  if test "$enable_shared" = yes && test "$GCC" = yes; then
5731
    case $_LT_TAGVAR(archive_cmds, $1) in
5732
    *'~'*)
5733
      # FIXME: we may have to deal with multi-command sequences.
5734
      ;;
5735
    '$CC '*)
5736
      # Test whether the compiler implicitly links with -lc since on some
5737
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5738
      # to ld, don't add -lc before -lgcc.
5739
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5740
      $RM conftest*
5741
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5742
5743
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5744
        soname=conftest
5745
        lib=conftest
5746
        libobjs=conftest.$ac_objext
5747
        deplibs=
5748
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5749
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5750
        compiler_flags=-v
5751
        linker_flags=-v
5752
        verstring=
5753
        output_objdir=.
5754
        libname=conftest
5755
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5756
        _LT_TAGVAR(allow_undefined_flag, $1)=
5757
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5758
        then
5759
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5760
        else
5761
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5762
        fi
5763
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5764
      else
5765
        cat conftest.err 1>&5
5766
      fi
5767
      $RM conftest*
5768
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5769
      ;;
5770
    esac
5771
  fi
5772
  ;;
5773
esac
5774
5775
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5776
    [Whether or not to add -lc for building shared libraries])
5777
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5778
    [enable_shared_with_static_runtimes], [0],
5779
    [Whether or not to disallow shared libs when runtime libs are static])
5780
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5781
    [Compiler flag to allow reflexive dlopens])
5782
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5783
    [Compiler flag to generate shared objects directly from archives])
5784
_LT_TAGDECL([], [compiler_needs_object], [1],
5785
    [Whether the compiler copes with passing no objects directly])
5786
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5787
    [Create an old-style archive from a shared archive])
5788
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5789
    [Create a temporary old-style archive to link instead of a shared archive])
5790
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5791
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5792
_LT_TAGDECL([], [module_cmds], [2],
5793
    [Commands used to build a loadable module if different from building
5794
    a shared archive.])
5795
_LT_TAGDECL([], [module_expsym_cmds], [2])
5796
_LT_TAGDECL([], [with_gnu_ld], [1],
5797
    [Whether we are building with GNU ld or not])
5798
_LT_TAGDECL([], [allow_undefined_flag], [1],
5799
    [Flag that allows shared libraries with undefined symbols to be built])
5800
_LT_TAGDECL([], [no_undefined_flag], [1],
5801
    [Flag that enforces no undefined symbols])
5802
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5803
    [Flag to hardcode $libdir into a binary during linking.
5804
    This must work even if $libdir does not exist])
5805
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5806
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5807
    during linking.  This must work even if $libdir does not exist]])
5808
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5809
    [Whether we need a single "-rpath" flag with a separated argument])
5810
_LT_TAGDECL([], [hardcode_direct], [0],
5811
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5812
    DIR into the resulting binary])
5813
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5814
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5815
    DIR into the resulting binary and the resulting library dependency is
5816
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5817
    library is relocated])
5818
_LT_TAGDECL([], [hardcode_minus_L], [0],
5819
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5820
    into the resulting binary])
5821
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5822
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5823
    into the resulting binary])
5824
_LT_TAGDECL([], [hardcode_automatic], [0],
5825
    [Set to "yes" if building a shared library automatically hardcodes DIR
5826
    into the library and all subsequent libraries and executables linked
5827
    against it])
5828
_LT_TAGDECL([], [inherit_rpath], [0],
5829
    [Set to yes if linker adds runtime paths of dependent libraries
5830
    to runtime path list])
5831
_LT_TAGDECL([], [link_all_deplibs], [0],
5832
    [Whether libtool must link a program against all its dependency libraries])
5833
_LT_TAGDECL([], [fix_srcfile_path], [1],
5834
    [Fix the shell variable $srcfile for the compiler])
5835
_LT_TAGDECL([], [always_export_symbols], [0],
5836
    [Set to "yes" if exported symbols are required])
5837
_LT_TAGDECL([], [export_symbols_cmds], [2],
5838
    [The commands to list exported symbols])
5839
_LT_TAGDECL([], [exclude_expsyms], [1],
5840
    [Symbols that should not be listed in the preloaded symbols])
5841
_LT_TAGDECL([], [include_expsyms], [1],
5842
    [Symbols that must always be exported])
5843
_LT_TAGDECL([], [prelink_cmds], [2],
5844
    [Commands necessary for linking programs (against libraries) with templates])
5845
_LT_TAGDECL([], [file_list_spec], [1],
5846
    [Specify filename containing input files])
5847
dnl FIXME: Not yet implemented
5848
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5849
dnl    [Compiler flag to generate thread safe objects])
5850
])# _LT_LINKER_SHLIBS
5851
5852
5853
# _LT_LANG_C_CONFIG([TAG])
5854
# ------------------------
5855
# Ensure that the configuration variables for a C compiler are suitably
5856
# defined.  These variables are subsequently used by _LT_CONFIG to write
5857
# the compiler configuration to `libtool'.
5858
m4_defun([_LT_LANG_C_CONFIG],
5859
[m4_require([_LT_DECL_EGREP])dnl
5860
lt_save_CC="$CC"
5861
AC_LANG_PUSH(C)
5862
5863
# Source file extension for C test sources.
5864
ac_ext=c
5865
5866
# Object file extension for compiled C test sources.
5867
objext=o
5868
_LT_TAGVAR(objext, $1)=$objext
5869
5870
# Code to be used in simple compile tests
5871
lt_simple_compile_test_code="int some_variable = 0;"
5872
5873
# Code to be used in simple link tests
5874
lt_simple_link_test_code='int main(){return(0);}'
5875
5876
_LT_TAG_COMPILER
5877
# Save the default compiler, since it gets overwritten when the other
5878
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5879
compiler_DEFAULT=$CC
5880
5881
# save warnings/boilerplate of simple test code
5882
_LT_COMPILER_BOILERPLATE
5883
_LT_LINKER_BOILERPLATE
5884
5885
if test -n "$compiler"; then
5886
  _LT_COMPILER_NO_RTTI($1)
5887
  _LT_COMPILER_PIC($1)
5888
  _LT_COMPILER_C_O($1)
5889
  _LT_COMPILER_FILE_LOCKS($1)
5890
  _LT_LINKER_SHLIBS($1)
5891
  _LT_SYS_DYNAMIC_LINKER($1)
5892
  _LT_LINKER_HARDCODE_LIBPATH($1)
5893
  LT_SYS_DLOPEN_SELF
5894
  _LT_CMD_STRIPLIB
5895
5896
  # Report which library types will actually be built
5897
  AC_MSG_CHECKING([if libtool supports shared libraries])
5898
  AC_MSG_RESULT([$can_build_shared])
5899
5900
  AC_MSG_CHECKING([whether to build shared libraries])
5901
  test "$can_build_shared" = "no" && enable_shared=no
5902
5903
  # On AIX, shared libraries and static libraries use the same namespace, and
5904
  # are all built from PIC.
5905
  case $host_os in
5906
  aix3*)
5907
    test "$enable_shared" = yes && enable_static=no
5908
    if test -n "$RANLIB"; then
5909
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5910
      postinstall_cmds='$RANLIB $lib'
5911
    fi
5912
    ;;
5913
5914
  aix[[4-9]]*)
5915
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5916
      test "$enable_shared" = yes && enable_static=no
5917
    fi
5918
    ;;
5919
  esac
5920
  AC_MSG_RESULT([$enable_shared])
5921
5922
  AC_MSG_CHECKING([whether to build static libraries])
5923
  # Make sure either enable_shared or enable_static is yes.
5924
  test "$enable_shared" = yes || enable_static=yes
5925
  AC_MSG_RESULT([$enable_static])
5926
5927
  _LT_CONFIG($1)
5928
fi
5929
AC_LANG_POP
5930
CC="$lt_save_CC"
5931
])# _LT_LANG_C_CONFIG
5932
5933
5934
# _LT_PROG_CXX
5935
# ------------
5936
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5937
# compiler, we have our own version here.
5938
m4_defun([_LT_PROG_CXX],
5939
[
5940
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5941
AC_PROG_CXX
5942
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5943
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5944
    (test "X$CXX" != "Xg++"))) ; then
5945
  AC_PROG_CXXCPP
5946
else
5947
  _lt_caught_CXX_error=yes
5948
fi
5949
popdef([AC_MSG_ERROR])
5950
])# _LT_PROG_CXX
5951
5952
dnl aclocal-1.4 backwards compatibility:
5953
dnl AC_DEFUN([_LT_PROG_CXX], [])
5954
5955
5956
# _LT_LANG_CXX_CONFIG([TAG])
5957
# --------------------------
5958
# Ensure that the configuration variables for a C++ compiler are suitably
5959
# defined.  These variables are subsequently used by _LT_CONFIG to write
5960
# the compiler configuration to `libtool'.
5961
m4_defun([_LT_LANG_CXX_CONFIG],
5962
[AC_REQUIRE([_LT_PROG_CXX])dnl
5963
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5964
m4_require([_LT_DECL_EGREP])dnl
5965
5966
AC_LANG_PUSH(C++)
5967
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5968
_LT_TAGVAR(allow_undefined_flag, $1)=
5969
_LT_TAGVAR(always_export_symbols, $1)=no
5970
_LT_TAGVAR(archive_expsym_cmds, $1)=
5971
_LT_TAGVAR(compiler_needs_object, $1)=no
5972
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5973
_LT_TAGVAR(hardcode_direct, $1)=no
5974
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5975
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5976
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5977
_LT_TAGVAR(hardcode_libdir_separator, $1)=
5978
_LT_TAGVAR(hardcode_minus_L, $1)=no
5979
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5980
_LT_TAGVAR(hardcode_automatic, $1)=no
5981
_LT_TAGVAR(inherit_rpath, $1)=no
5982
_LT_TAGVAR(module_cmds, $1)=
5983
_LT_TAGVAR(module_expsym_cmds, $1)=
5984
_LT_TAGVAR(link_all_deplibs, $1)=unknown
5985
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5986
_LT_TAGVAR(no_undefined_flag, $1)=
5987
_LT_TAGVAR(whole_archive_flag_spec, $1)=
5988
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5989
5990
# Source file extension for C++ test sources.
5991
ac_ext=cpp
5992
5993
# Object file extension for compiled C++ test sources.
5994
objext=o
5995
_LT_TAGVAR(objext, $1)=$objext
5996
5997
# No sense in running all these tests if we already determined that
5998
# the CXX compiler isn't working.  Some variables (like enable_shared)
5999
# are currently assumed to apply to all compilers on this platform,
6000
# and will be corrupted by setting them based on a non-working compiler.
6001
if test "$_lt_caught_CXX_error" != yes; then
6002
  # Code to be used in simple compile tests
6003
  lt_simple_compile_test_code="int some_variable = 0;"
6004
6005
  # Code to be used in simple link tests
6006
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6007
6008
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6009
  _LT_TAG_COMPILER
6010
6011
  # save warnings/boilerplate of simple test code
6012
  _LT_COMPILER_BOILERPLATE
6013
  _LT_LINKER_BOILERPLATE
6014
6015
  # Allow CC to be a program name with arguments.
6016
  lt_save_CC=$CC
6017
  lt_save_LD=$LD
6018
  lt_save_GCC=$GCC
6019
  GCC=$GXX
6020
  lt_save_with_gnu_ld=$with_gnu_ld
6021
  lt_save_path_LD=$lt_cv_path_LD
6022
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6023
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6024
  else
6025
    $as_unset lt_cv_prog_gnu_ld
6026
  fi
6027
  if test -n "${lt_cv_path_LDCXX+set}"; then
6028
    lt_cv_path_LD=$lt_cv_path_LDCXX
6029
  else
6030
    $as_unset lt_cv_path_LD
6031
  fi
6032
  test -z "${LDCXX+set}" || LD=$LDCXX
6033
  CC=${CXX-"c++"}
6034
  compiler=$CC
6035
  _LT_TAGVAR(compiler, $1)=$CC
6036
  _LT_CC_BASENAME([$compiler])
6037
6038
  if test -n "$compiler"; then
6039
    # We don't want -fno-exception when compiling C++ code, so set the
6040
    # no_builtin_flag separately
6041
    if test "$GXX" = yes; then
6042
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6043
    else
6044
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6045
    fi
6046
6047
    if test "$GXX" = yes; then
6048
      # Set up default GNU C++ configuration
6049
6050
      LT_PATH_LD
6051
6052
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6053
      # archiving commands below assume that GNU ld is being used.
6054
      if test "$with_gnu_ld" = yes; then
6055
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6056
        _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'
6057
6058
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6059
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6060
6061
        # If archive_cmds runs LD, not CC, wlarc should be empty
6062
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6063
        #     investigate it a little bit more. (MM)
6064
        wlarc='${wl}'
6065
6066
        # ancient GNU ld didn't support --whole-archive et. al.
6067
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6068
	  $GREP 'no-whole-archive' > /dev/null; then
6069
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6070
        else
6071
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6072
        fi
6073
      else
6074
        with_gnu_ld=no
6075
        wlarc=
6076
6077
        # A generic and very simple default shared library creation
6078
        # command for GNU C++ for the case where it uses the native
6079
        # linker, instead of GNU ld.  If possible, this setting should
6080
        # overridden to take advantage of the native linker features on
6081
        # the platform it is being used on.
6082
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6083
      fi
6084
6085
      # Commands to make compiler produce verbose output that lists
6086
      # what "hidden" libraries, object files and flags are used when
6087
      # linking a shared library.
6088
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6089
6090
    else
6091
      GXX=no
6092
      with_gnu_ld=no
6093
      wlarc=
6094
    fi
6095
6096
    # PORTME: fill in a description of your system's C++ link characteristics
6097
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6098
    _LT_TAGVAR(ld_shlibs, $1)=yes
6099
    case $host_os in
6100
      aix3*)
6101
        # FIXME: insert proper C++ library support
6102
        _LT_TAGVAR(ld_shlibs, $1)=no
6103
        ;;
6104
      aix[[4-9]]*)
6105
        if test "$host_cpu" = ia64; then
6106
          # On IA64, the linker does run time linking by default, so we don't
6107
          # have to do anything special.
6108
          aix_use_runtimelinking=no
6109
          exp_sym_flag='-Bexport'
6110
          no_entry_flag=""
6111
        else
6112
          aix_use_runtimelinking=no
6113
6114
          # Test if we are trying to use run time linking or normal
6115
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6116
          # need to do runtime linking.
6117
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6118
	    for ld_flag in $LDFLAGS; do
6119
	      case $ld_flag in
6120
	      *-brtl*)
6121
	        aix_use_runtimelinking=yes
6122
	        break
6123
	        ;;
6124
	      esac
6125
	    done
6126
	    ;;
6127
          esac
6128
6129
          exp_sym_flag='-bexport'
6130
          no_entry_flag='-bnoentry'
6131
        fi
6132
6133
        # When large executables or shared objects are built, AIX ld can
6134
        # have problems creating the table of contents.  If linking a library
6135
        # or program results in "error TOC overflow" add -mminimal-toc to
6136
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6137
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6138
6139
        _LT_TAGVAR(archive_cmds, $1)=''
6140
        _LT_TAGVAR(hardcode_direct, $1)=yes
6141
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6142
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6143
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6144
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6145
6146
        if test "$GXX" = yes; then
6147
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6148
          # We only want to do this on AIX 4.2 and lower, the check
6149
          # below for broken collect2 doesn't work under 4.3+
6150
	  collect2name=`${CC} -print-prog-name=collect2`
6151
	  if test -f "$collect2name" &&
6152
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6153
	  then
6154
	    # We have reworked collect2
6155
	    :
6156
	  else
6157
	    # We have old collect2
6158
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6159
	    # It fails to find uninstalled libraries when the uninstalled
6160
	    # path is not listed in the libpath.  Setting hardcode_minus_L
6161
	    # to unsupported forces relinking
6162
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6163
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6164
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6165
	  fi
6166
          esac
6167
          shared_flag='-shared'
6168
	  if test "$aix_use_runtimelinking" = yes; then
6169
	    shared_flag="$shared_flag "'${wl}-G'
6170
	  fi
6171
        else
6172
          # not using gcc
6173
          if test "$host_cpu" = ia64; then
6174
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6175
	  # chokes on -Wl,-G. The following line is correct:
6176
	  shared_flag='-G'
6177
          else
6178
	    if test "$aix_use_runtimelinking" = yes; then
6179
	      shared_flag='${wl}-G'
6180
	    else
6181
	      shared_flag='${wl}-bM:SRE'
6182
	    fi
6183
          fi
6184
        fi
6185
6186
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6187
        # It seems that -bexpall does not export symbols beginning with
6188
        # underscore (_), so it is better to generate a list of symbols to
6189
	# export.
6190
        _LT_TAGVAR(always_export_symbols, $1)=yes
6191
        if test "$aix_use_runtimelinking" = yes; then
6192
          # Warning - without using the other runtime loading flags (-brtl),
6193
          # -berok will link without error, but may produce a broken library.
6194
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6195
          # Determine the default libpath from the value encoded in an empty
6196
          # executable.
6197
          _LT_SYS_MODULE_PATH_AIX
6198
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6199
6200
          _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"
6201
        else
6202
          if test "$host_cpu" = ia64; then
6203
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6204
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6205
	    _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"
6206
          else
6207
	    # Determine the default libpath from the value encoded in an
6208
	    # empty executable.
6209
	    _LT_SYS_MODULE_PATH_AIX
6210
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6211
	    # Warning - without using the other run time loading flags,
6212
	    # -berok will link without error, but may produce a broken library.
6213
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6214
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6215
	    # Exported symbols can be pulled into shared objects from archives
6216
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6217
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6218
	    # This is similar to how AIX traditionally builds its shared
6219
	    # libraries.
6220
	    _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'
6221
          fi
6222
        fi
6223
        ;;
6224
6225
      beos*)
6226
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6227
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6228
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6229
	  # support --undefined.  This deserves some investigation.  FIXME
6230
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6231
	else
6232
	  _LT_TAGVAR(ld_shlibs, $1)=no
6233
	fi
6234
	;;
6235
6236
      chorus*)
6237
        case $cc_basename in
6238
          *)
6239
	  # FIXME: insert proper C++ library support
6240
	  _LT_TAGVAR(ld_shlibs, $1)=no
6241
	  ;;
6242
        esac
6243
        ;;
6244
6245
      cygwin* | mingw* | pw32* | cegcc*)
6246
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6247
        # as there is no search path for DLLs.
6248
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6249
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6250
        _LT_TAGVAR(always_export_symbols, $1)=no
6251
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6252
6253
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6254
          _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'
6255
          # If the export-symbols file already is a .def file (1st line
6256
          # is EXPORTS), use it as is; otherwise, prepend...
6257
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6258
	    cp $export_symbols $output_objdir/$soname.def;
6259
          else
6260
	    echo EXPORTS > $output_objdir/$soname.def;
6261
	    cat $export_symbols >> $output_objdir/$soname.def;
6262
          fi~
6263
          $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'
6264
        else
6265
          _LT_TAGVAR(ld_shlibs, $1)=no
6266
        fi
6267
        ;;
6268
      darwin* | rhapsody*)
6269
        _LT_DARWIN_LINKER_FEATURES($1)
6270
	;;
6271
6272
      dgux*)
6273
        case $cc_basename in
6274
          ec++*)
6275
	    # FIXME: insert proper C++ library support
6276
	    _LT_TAGVAR(ld_shlibs, $1)=no
6277
	    ;;
6278
          ghcx*)
6279
	    # Green Hills C++ Compiler
6280
	    # FIXME: insert proper C++ library support
6281
	    _LT_TAGVAR(ld_shlibs, $1)=no
6282
	    ;;
6283
          *)
6284
	    # FIXME: insert proper C++ library support
6285
	    _LT_TAGVAR(ld_shlibs, $1)=no
6286
	    ;;
6287
        esac
6288
        ;;
6289
6290
      freebsd[[12]]*)
6291
        # C++ shared libraries reported to be fairly broken before
6292
	# switch to ELF
6293
        _LT_TAGVAR(ld_shlibs, $1)=no
6294
        ;;
6295
6296
      freebsd-elf*)
6297
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6298
        ;;
6299
6300
      freebsd* | dragonfly*)
6301
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6302
        # conventions
6303
        _LT_TAGVAR(ld_shlibs, $1)=yes
6304
        ;;
6305
6306
      gnu*)
6307
        ;;
6308
6309
      hpux9*)
6310
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6311
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6312
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6313
        _LT_TAGVAR(hardcode_direct, $1)=yes
6314
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6315
				             # but as the default
6316
				             # location of the library.
6317
6318
        case $cc_basename in
6319
          CC*)
6320
            # FIXME: insert proper C++ library support
6321
            _LT_TAGVAR(ld_shlibs, $1)=no
6322
            ;;
6323
          aCC*)
6324
            _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'
6325
            # Commands to make compiler produce verbose output that lists
6326
            # what "hidden" libraries, object files and flags are used when
6327
            # linking a shared library.
6328
            #
6329
            # There doesn't appear to be a way to prevent this compiler from
6330
            # explicitly linking system object files so we need to strip them
6331
            # from the output so that they don't get included in the library
6332
            # dependencies.
6333
            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'
6334
            ;;
6335
          *)
6336
            if test "$GXX" = yes; then
6337
              _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'
6338
            else
6339
              # FIXME: insert proper C++ library support
6340
              _LT_TAGVAR(ld_shlibs, $1)=no
6341
            fi
6342
            ;;
6343
        esac
6344
        ;;
6345
6346
      hpux10*|hpux11*)
6347
        if test $with_gnu_ld = no; then
6348
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6349
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6350
6351
          case $host_cpu in
6352
            hppa*64*|ia64*)
6353
              ;;
6354
            *)
6355
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6356
              ;;
6357
          esac
6358
        fi
6359
        case $host_cpu in
6360
          hppa*64*|ia64*)
6361
            _LT_TAGVAR(hardcode_direct, $1)=no
6362
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6363
            ;;
6364
          *)
6365
            _LT_TAGVAR(hardcode_direct, $1)=yes
6366
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6367
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6368
					         # but as the default
6369
					         # location of the library.
6370
            ;;
6371
        esac
6372
6373
        case $cc_basename in
6374
          CC*)
6375
	    # FIXME: insert proper C++ library support
6376
	    _LT_TAGVAR(ld_shlibs, $1)=no
6377
	    ;;
6378
          aCC*)
6379
	    case $host_cpu in
6380
	      hppa*64*)
6381
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6382
	        ;;
6383
	      ia64*)
6384
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6385
	        ;;
6386
	      *)
6387
	        _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'
6388
	        ;;
6389
	    esac
6390
	    # Commands to make compiler produce verbose output that lists
6391
	    # what "hidden" libraries, object files and flags are used when
6392
	    # linking a shared library.
6393
	    #
6394
	    # There doesn't appear to be a way to prevent this compiler from
6395
	    # explicitly linking system object files so we need to strip them
6396
	    # from the output so that they don't get included in the library
6397
	    # dependencies.
6398
	    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'
6399
	    ;;
6400
          *)
6401
	    if test "$GXX" = yes; then
6402
	      if test $with_gnu_ld = no; then
6403
	        case $host_cpu in
6404
	          hppa*64*)
6405
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6406
	            ;;
6407
	          ia64*)
6408
	            _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'
6409
	            ;;
6410
	          *)
6411
	            _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'
6412
	            ;;
6413
	        esac
6414
	      fi
6415
	    else
6416
	      # FIXME: insert proper C++ library support
6417
	      _LT_TAGVAR(ld_shlibs, $1)=no
6418
	    fi
6419
	    ;;
6420
        esac
6421
        ;;
6422
6423
      interix[[3-9]]*)
6424
	_LT_TAGVAR(hardcode_direct, $1)=no
6425
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6426
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6427
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6428
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6429
	# Instead, shared libraries are loaded at an image base (0x10000000 by
6430
	# default) and relocated if they conflict, which is a slow very memory
6431
	# consuming and fragmenting process.  To avoid this, we pick a random,
6432
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6433
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6434
	_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'
6435
	_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'
6436
	;;
6437
      irix5* | irix6*)
6438
        case $cc_basename in
6439
          CC*)
6440
	    # SGI C++
6441
	    _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'
6442
6443
	    # Archives containing C++ object files must be created using
6444
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6445
	    # necessary to make sure instantiated templates are included
6446
	    # in the archive.
6447
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6448
	    ;;
6449
          *)
6450
	    if test "$GXX" = yes; then
6451
	      if test "$with_gnu_ld" = no; then
6452
	        _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'
6453
	      else
6454
	        _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'
6455
	      fi
6456
	    fi
6457
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6458
	    ;;
6459
        esac
6460
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6461
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6462
        _LT_TAGVAR(inherit_rpath, $1)=yes
6463
        ;;
6464
37.1.5 by Ken VanDine
Import upstream version 0.2.100
6465
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
37 by Ken VanDine
Import upstream version 0.2.1
6466
        case $cc_basename in
6467
          KCC*)
6468
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6469
6470
	    # KCC will only create a shared library if the output file
6471
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6472
	    # to its proper name (with version) after linking.
6473
	    _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'
6474
	    _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'
6475
	    # Commands to make compiler produce verbose output that lists
6476
	    # what "hidden" libraries, object files and flags are used when
6477
	    # linking a shared library.
6478
	    #
6479
	    # There doesn't appear to be a way to prevent this compiler from
6480
	    # explicitly linking system object files so we need to strip them
6481
	    # from the output so that they don't get included in the library
6482
	    # dependencies.
6483
	    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'
6484
6485
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6486
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6487
6488
	    # Archives containing C++ object files must be created using
6489
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6490
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6491
	    ;;
6492
	  icpc* | ecpc* )
6493
	    # Intel C++
6494
	    with_gnu_ld=yes
6495
	    # version 8.0 and above of icpc choke on multiply defined symbols
6496
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6497
	    # earlier do not add the objects themselves.
6498
	    case `$CC -V 2>&1` in
6499
	      *"Version 7."*)
6500
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6501
		_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'
6502
		;;
6503
	      *)  # Version 8.0 or newer
6504
	        tmp_idyn=
6505
	        case $host_cpu in
6506
		  ia64*) tmp_idyn=' -i_dynamic';;
6507
		esac
6508
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6509
		_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'
6510
		;;
6511
	    esac
6512
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6513
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6514
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6515
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6516
	    ;;
6517
          pgCC* | pgcpp*)
6518
            # Portland Group C++ compiler
6519
	    case `$CC -V` in
6520
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6521
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6522
		rm -rf $tpldir~
6523
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6524
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6525
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6526
		rm -rf $tpldir~
6527
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6528
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6529
		$RANLIB $oldlib'
6530
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6531
		rm -rf $tpldir~
6532
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6533
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6534
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6535
		rm -rf $tpldir~
6536
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6537
		$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'
6538
	      ;;
6539
	    *) # Version 6 will use weak symbols
6540
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6541
	      _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'
6542
	      ;;
6543
	    esac
6544
6545
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6546
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6547
	    _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'
6548
            ;;
6549
	  cxx*)
6550
	    # Compaq C++
6551
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6552
	    _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'
6553
6554
	    runpath_var=LD_RUN_PATH
6555
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6556
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6557
6558
	    # Commands to make compiler produce verbose output that lists
6559
	    # what "hidden" libraries, object files and flags are used when
6560
	    # linking a shared library.
6561
	    #
6562
	    # There doesn't appear to be a way to prevent this compiler from
6563
	    # explicitly linking system object files so we need to strip them
6564
	    # from the output so that they don't get included in the library
6565
	    # dependencies.
6566
	    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'
6567
	    ;;
6568
	  xl*)
6569
	    # IBM XL 8.0 on PPC, with GNU ld
6570
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6571
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6572
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6573
	    if test "x$supports_anon_versioning" = xyes; then
6574
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6575
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6576
		echo "local: *; };" >> $output_objdir/$libname.ver~
6577
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6578
	    fi
6579
	    ;;
6580
	  *)
6581
	    case `$CC -V 2>&1 | sed 5q` in
6582
	    *Sun\ C*)
6583
	      # Sun C++ 5.9
6584
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6585
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6586
	      _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'
6587
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6588
	      _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'
6589
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6590
6591
	      # Not sure whether something based on
6592
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6593
	      # would be better.
6594
	      output_verbose_link_cmd='echo'
6595
6596
	      # Archives containing C++ object files must be created using
6597
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6598
	      # necessary to make sure instantiated templates are included
6599
	      # in the archive.
6600
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6601
	      ;;
6602
	    esac
6603
	    ;;
6604
	esac
6605
	;;
6606
6607
      lynxos*)
6608
        # FIXME: insert proper C++ library support
6609
	_LT_TAGVAR(ld_shlibs, $1)=no
6610
	;;
6611
6612
      m88k*)
6613
        # FIXME: insert proper C++ library support
6614
        _LT_TAGVAR(ld_shlibs, $1)=no
6615
	;;
6616
6617
      mvs*)
6618
        case $cc_basename in
6619
          cxx*)
6620
	    # FIXME: insert proper C++ library support
6621
	    _LT_TAGVAR(ld_shlibs, $1)=no
6622
	    ;;
6623
	  *)
6624
	    # FIXME: insert proper C++ library support
6625
	    _LT_TAGVAR(ld_shlibs, $1)=no
6626
	    ;;
6627
	esac
6628
	;;
6629
6630
      netbsd*)
6631
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6632
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6633
	  wlarc=
6634
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6635
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6636
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6637
	fi
6638
	# Workaround some broken pre-1.5 toolchains
6639
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6640
	;;
6641
6642
      *nto* | *qnx*)
6643
        _LT_TAGVAR(ld_shlibs, $1)=yes
6644
	;;
6645
6646
      openbsd2*)
6647
        # C++ shared libraries are fairly broken
6648
	_LT_TAGVAR(ld_shlibs, $1)=no
6649
	;;
6650
6651
      openbsd*)
6652
	if test -f /usr/libexec/ld.so; then
6653
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6654
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6655
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6656
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6657
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6658
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6659
	    _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'
6660
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6661
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6662
	  fi
6663
	  output_verbose_link_cmd=echo
6664
	else
6665
	  _LT_TAGVAR(ld_shlibs, $1)=no
6666
	fi
6667
	;;
6668
6669
      osf3* | osf4* | osf5*)
6670
        case $cc_basename in
6671
          KCC*)
6672
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6673
6674
	    # KCC will only create a shared library if the output file
6675
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6676
	    # to its proper name (with version) after linking.
6677
	    _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'
6678
6679
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6680
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6681
6682
	    # Archives containing C++ object files must be created using
6683
	    # the KAI C++ compiler.
6684
	    case $host in
6685
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6686
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6687
	    esac
6688
	    ;;
6689
          RCC*)
6690
	    # Rational C++ 2.4.1
6691
	    # FIXME: insert proper C++ library support
6692
	    _LT_TAGVAR(ld_shlibs, $1)=no
6693
	    ;;
6694
          cxx*)
6695
	    case $host in
6696
	      osf3*)
6697
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6698
	        _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'
6699
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6700
		;;
6701
	      *)
6702
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6703
	        _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'
6704
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6705
	          echo "-hidden">> $lib.exp~
6706
	          $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~
6707
	          $RM $lib.exp'
6708
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6709
		;;
6710
	    esac
6711
6712
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6713
6714
	    # Commands to make compiler produce verbose output that lists
6715
	    # what "hidden" libraries, object files and flags are used when
6716
	    # linking a shared library.
6717
	    #
6718
	    # There doesn't appear to be a way to prevent this compiler from
6719
	    # explicitly linking system object files so we need to strip them
6720
	    # from the output so that they don't get included in the library
6721
	    # dependencies.
6722
	    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'
6723
	    ;;
6724
	  *)
6725
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6726
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6727
	      case $host in
6728
	        osf3*)
6729
	          _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'
6730
		  ;;
6731
	        *)
6732
	          _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'
6733
		  ;;
6734
	      esac
6735
6736
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6737
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6738
6739
	      # Commands to make compiler produce verbose output that lists
6740
	      # what "hidden" libraries, object files and flags are used when
6741
	      # linking a shared library.
6742
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6743
6744
	    else
6745
	      # FIXME: insert proper C++ library support
6746
	      _LT_TAGVAR(ld_shlibs, $1)=no
6747
	    fi
6748
	    ;;
6749
        esac
6750
        ;;
6751
6752
      psos*)
6753
        # FIXME: insert proper C++ library support
6754
        _LT_TAGVAR(ld_shlibs, $1)=no
6755
        ;;
6756
6757
      sunos4*)
6758
        case $cc_basename in
6759
          CC*)
6760
	    # Sun C++ 4.x
6761
	    # FIXME: insert proper C++ library support
6762
	    _LT_TAGVAR(ld_shlibs, $1)=no
6763
	    ;;
6764
          lcc*)
6765
	    # Lucid
6766
	    # FIXME: insert proper C++ library support
6767
	    _LT_TAGVAR(ld_shlibs, $1)=no
6768
	    ;;
6769
          *)
6770
	    # FIXME: insert proper C++ library support
6771
	    _LT_TAGVAR(ld_shlibs, $1)=no
6772
	    ;;
6773
        esac
6774
        ;;
6775
6776
      solaris*)
6777
        case $cc_basename in
6778
          CC*)
6779
	    # Sun C++ 4.2, 5.x and Centerline C++
6780
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6781
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6782
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6783
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6784
	      $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'
6785
6786
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6787
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6788
	    case $host_os in
6789
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6790
	      *)
6791
		# The compiler driver will combine and reorder linker options,
6792
		# but understands `-z linker_flag'.
6793
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6794
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6795
	        ;;
6796
	    esac
6797
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6798
6799
	    output_verbose_link_cmd='echo'
6800
6801
	    # Archives containing C++ object files must be created using
6802
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6803
	    # necessary to make sure instantiated templates are included
6804
	    # in the archive.
6805
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6806
	    ;;
6807
          gcx*)
6808
	    # Green Hills C++ Compiler
6809
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6810
6811
	    # The C++ compiler must be used to create the archive.
6812
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6813
	    ;;
6814
          *)
6815
	    # GNU C++ compiler with Solaris linker
6816
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6817
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6818
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6819
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6820
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6821
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6822
6823
	        # Commands to make compiler produce verbose output that lists
6824
	        # what "hidden" libraries, object files and flags are used when
6825
	        # linking a shared library.
6826
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6827
	      else
6828
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6829
	        # platform.
6830
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6831
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6832
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6833
6834
	        # Commands to make compiler produce verbose output that lists
6835
	        # what "hidden" libraries, object files and flags are used when
6836
	        # linking a shared library.
6837
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6838
	      fi
6839
6840
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6841
	      case $host_os in
6842
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6843
		*)
6844
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6845
		  ;;
6846
	      esac
6847
	    fi
6848
	    ;;
6849
        esac
6850
        ;;
6851
6852
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6853
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6854
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6855
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6856
      runpath_var='LD_RUN_PATH'
6857
6858
      case $cc_basename in
6859
        CC*)
6860
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6861
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6862
	  ;;
6863
	*)
6864
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6865
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6866
	  ;;
6867
      esac
6868
      ;;
6869
6870
      sysv5* | sco3.2v5* | sco5v6*)
6871
	# Note: We can NOT use -z defs as we might desire, because we do not
6872
	# link with -lc, and that would cause any symbols used from libc to
6873
	# always be unresolved, which means just about no library would
6874
	# ever link correctly.  If we're not using GNU ld we use -z text
6875
	# though, which does catch some bad symbols but isn't as heavy-handed
6876
	# as -z defs.
6877
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6878
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6879
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6880
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6881
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6882
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6883
	_LT_TAGVAR(link_all_deplibs, $1)=yes
6884
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6885
	runpath_var='LD_RUN_PATH'
6886
6887
	case $cc_basename in
6888
          CC*)
6889
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6890
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6891
	    ;;
6892
	  *)
6893
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6894
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6895
	    ;;
6896
	esac
6897
      ;;
6898
6899
      tandem*)
6900
        case $cc_basename in
6901
          NCC*)
6902
	    # NonStop-UX NCC 3.20
6903
	    # FIXME: insert proper C++ library support
6904
	    _LT_TAGVAR(ld_shlibs, $1)=no
6905
	    ;;
6906
          *)
6907
	    # FIXME: insert proper C++ library support
6908
	    _LT_TAGVAR(ld_shlibs, $1)=no
6909
	    ;;
6910
        esac
6911
        ;;
6912
6913
      vxworks*)
6914
        # FIXME: insert proper C++ library support
6915
        _LT_TAGVAR(ld_shlibs, $1)=no
6916
        ;;
6917
6918
      *)
6919
        # FIXME: insert proper C++ library support
6920
        _LT_TAGVAR(ld_shlibs, $1)=no
6921
        ;;
6922
    esac
6923
6924
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6925
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6926
6927
    _LT_TAGVAR(GCC, $1)="$GXX"
6928
    _LT_TAGVAR(LD, $1)="$LD"
6929
6930
    ## CAVEAT EMPTOR:
6931
    ## There is no encapsulation within the following macros, do not change
6932
    ## the running order or otherwise move them around unless you know exactly
6933
    ## what you are doing...
6934
    _LT_SYS_HIDDEN_LIBDEPS($1)
6935
    _LT_COMPILER_PIC($1)
6936
    _LT_COMPILER_C_O($1)
6937
    _LT_COMPILER_FILE_LOCKS($1)
6938
    _LT_LINKER_SHLIBS($1)
6939
    _LT_SYS_DYNAMIC_LINKER($1)
6940
    _LT_LINKER_HARDCODE_LIBPATH($1)
6941
6942
    _LT_CONFIG($1)
6943
  fi # test -n "$compiler"
6944
6945
  CC=$lt_save_CC
6946
  LDCXX=$LD
6947
  LD=$lt_save_LD
6948
  GCC=$lt_save_GCC
6949
  with_gnu_ld=$lt_save_with_gnu_ld
6950
  lt_cv_path_LDCXX=$lt_cv_path_LD
6951
  lt_cv_path_LD=$lt_save_path_LD
6952
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6953
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6954
fi # test "$_lt_caught_CXX_error" != yes
6955
6956
AC_LANG_POP
6957
])# _LT_LANG_CXX_CONFIG
6958
6959
6960
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6961
# ---------------------------------
6962
# Figure out "hidden" library dependencies from verbose
6963
# compiler output when linking a shared library.
6964
# Parse the compiler output and extract the necessary
6965
# objects, libraries and library flags.
6966
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6967
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6968
# Dependencies to place before and after the object being linked:
6969
_LT_TAGVAR(predep_objects, $1)=
6970
_LT_TAGVAR(postdep_objects, $1)=
6971
_LT_TAGVAR(predeps, $1)=
6972
_LT_TAGVAR(postdeps, $1)=
6973
_LT_TAGVAR(compiler_lib_search_path, $1)=
6974
6975
dnl we can't use the lt_simple_compile_test_code here,
6976
dnl because it contains code intended for an executable,
6977
dnl not a library.  It's possible we should let each
6978
dnl tag define a new lt_????_link_test_code variable,
6979
dnl but it's only used here...
6980
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6981
int a;
6982
void foo (void) { a = 0; }
6983
_LT_EOF
6984
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6985
class Foo
6986
{
6987
public:
6988
  Foo (void) { a = 0; }
6989
private:
6990
  int a;
6991
};
6992
_LT_EOF
6993
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6994
      subroutine foo
6995
      implicit none
6996
      integer*4 a
6997
      a=0
6998
      return
6999
      end
7000
_LT_EOF
7001
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7002
      subroutine foo
7003
      implicit none
7004
      integer a
7005
      a=0
7006
      return
7007
      end
7008
_LT_EOF
7009
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7010
public class foo {
7011
  private int a;
7012
  public void bar (void) {
7013
    a = 0;
7014
  }
7015
};
7016
_LT_EOF
7017
])
7018
dnl Parse the compiler output and extract the necessary
7019
dnl objects, libraries and library flags.
7020
if AC_TRY_EVAL(ac_compile); then
7021
  # Parse the compiler output and extract the necessary
7022
  # objects, libraries and library flags.
7023
7024
  # Sentinel used to keep track of whether or not we are before
7025
  # the conftest object file.
7026
  pre_test_object_deps_done=no
7027
7028
  for p in `eval "$output_verbose_link_cmd"`; do
7029
    case $p in
7030
7031
    -L* | -R* | -l*)
7032
       # Some compilers place space between "-{L,R}" and the path.
7033
       # Remove the space.
7034
       if test $p = "-L" ||
7035
          test $p = "-R"; then
7036
	 prev=$p
7037
	 continue
7038
       else
7039
	 prev=
7040
       fi
7041
7042
       if test "$pre_test_object_deps_done" = no; then
7043
	 case $p in
7044
	 -L* | -R*)
7045
	   # Internal compiler library paths should come after those
7046
	   # provided the user.  The postdeps already come after the
7047
	   # user supplied libs so there is no need to process them.
7048
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7049
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7050
	   else
7051
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7052
	   fi
7053
	   ;;
7054
	 # The "-l" case would never come before the object being
7055
	 # linked, so don't bother handling this case.
7056
	 esac
7057
       else
7058
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7059
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7060
	 else
7061
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7062
	 fi
7063
       fi
7064
       ;;
7065
7066
    *.$objext)
7067
       # This assumes that the test object file only shows up
7068
       # once in the compiler output.
7069
       if test "$p" = "conftest.$objext"; then
7070
	 pre_test_object_deps_done=yes
7071
	 continue
7072
       fi
7073
7074
       if test "$pre_test_object_deps_done" = no; then
7075
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7076
	   _LT_TAGVAR(predep_objects, $1)="$p"
7077
	 else
7078
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7079
	 fi
7080
       else
7081
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7082
	   _LT_TAGVAR(postdep_objects, $1)="$p"
7083
	 else
7084
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7085
	 fi
7086
       fi
7087
       ;;
7088
7089
    *) ;; # Ignore the rest.
7090
7091
    esac
7092
  done
7093
7094
  # Clean up.
7095
  rm -f a.out a.exe
7096
else
7097
  echo "libtool.m4: error: problem compiling $1 test program"
7098
fi
7099
7100
$RM -f confest.$objext
7101
7102
# PORTME: override above test on systems where it is broken
7103
m4_if([$1], [CXX],
7104
[case $host_os in
7105
interix[[3-9]]*)
7106
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7107
  # hack all around it, let's just trust "g++" to DTRT.
7108
  _LT_TAGVAR(predep_objects,$1)=
7109
  _LT_TAGVAR(postdep_objects,$1)=
7110
  _LT_TAGVAR(postdeps,$1)=
7111
  ;;
7112
7113
linux*)
7114
  case `$CC -V 2>&1 | sed 5q` in
7115
  *Sun\ C*)
7116
    # Sun C++ 5.9
7117
7118
    # The more standards-conforming stlport4 library is
7119
    # incompatible with the Cstd library. Avoid specifying
7120
    # it if it's in CXXFLAGS. Ignore libCrun as
7121
    # -library=stlport4 depends on it.
7122
    case " $CXX $CXXFLAGS " in
7123
    *" -library=stlport4 "*)
7124
      solaris_use_stlport4=yes
7125
      ;;
7126
    esac
7127
7128
    if test "$solaris_use_stlport4" != yes; then
7129
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7130
    fi
7131
    ;;
7132
  esac
7133
  ;;
7134
7135
solaris*)
7136
  case $cc_basename in
7137
  CC*)
7138
    # The more standards-conforming stlport4 library is
7139
    # incompatible with the Cstd library. Avoid specifying
7140
    # it if it's in CXXFLAGS. Ignore libCrun as
7141
    # -library=stlport4 depends on it.
7142
    case " $CXX $CXXFLAGS " in
7143
    *" -library=stlport4 "*)
7144
      solaris_use_stlport4=yes
7145
      ;;
7146
    esac
7147
7148
    # Adding this requires a known-good setup of shared libraries for
7149
    # Sun compiler versions before 5.6, else PIC objects from an old
7150
    # archive will be linked into the output, leading to subtle bugs.
7151
    if test "$solaris_use_stlport4" != yes; then
7152
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7153
    fi
7154
    ;;
7155
  esac
7156
  ;;
7157
esac
7158
])
7159
7160
case " $_LT_TAGVAR(postdeps, $1) " in
7161
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7162
esac
7163
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7164
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7165
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7166
fi
7167
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7168
    [The directories searched by this compiler when creating a shared library])
7169
_LT_TAGDECL([], [predep_objects], [1],
7170
    [Dependencies to place before and after the objects being linked to
7171
    create a shared library])
7172
_LT_TAGDECL([], [postdep_objects], [1])
7173
_LT_TAGDECL([], [predeps], [1])
7174
_LT_TAGDECL([], [postdeps], [1])
7175
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7176
    [The library search path used internally by the compiler when linking
7177
    a shared library])
7178
])# _LT_SYS_HIDDEN_LIBDEPS
7179
7180
7181
# _LT_PROG_F77
7182
# ------------
7183
# Since AC_PROG_F77 is broken, in that it returns the empty string
7184
# if there is no fortran compiler, we have our own version here.
7185
m4_defun([_LT_PROG_F77],
7186
[
7187
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7188
AC_PROG_F77
7189
if test -z "$F77" || test "X$F77" = "Xno"; then
7190
  _lt_disable_F77=yes
7191
fi
7192
popdef([AC_MSG_ERROR])
7193
])# _LT_PROG_F77
7194
7195
dnl aclocal-1.4 backwards compatibility:
7196
dnl AC_DEFUN([_LT_PROG_F77], [])
7197
7198
7199
# _LT_LANG_F77_CONFIG([TAG])
7200
# --------------------------
7201
# Ensure that the configuration variables for a Fortran 77 compiler are
7202
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7203
# to write the compiler configuration to `libtool'.
7204
m4_defun([_LT_LANG_F77_CONFIG],
7205
[AC_REQUIRE([_LT_PROG_F77])dnl
7206
AC_LANG_PUSH(Fortran 77)
7207
7208
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7209
_LT_TAGVAR(allow_undefined_flag, $1)=
7210
_LT_TAGVAR(always_export_symbols, $1)=no
7211
_LT_TAGVAR(archive_expsym_cmds, $1)=
7212
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7213
_LT_TAGVAR(hardcode_direct, $1)=no
7214
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7215
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7216
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7217
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7218
_LT_TAGVAR(hardcode_minus_L, $1)=no
7219
_LT_TAGVAR(hardcode_automatic, $1)=no
7220
_LT_TAGVAR(inherit_rpath, $1)=no
7221
_LT_TAGVAR(module_cmds, $1)=
7222
_LT_TAGVAR(module_expsym_cmds, $1)=
7223
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7224
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7225
_LT_TAGVAR(no_undefined_flag, $1)=
7226
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7227
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7228
7229
# Source file extension for f77 test sources.
7230
ac_ext=f
7231
7232
# Object file extension for compiled f77 test sources.
7233
objext=o
7234
_LT_TAGVAR(objext, $1)=$objext
7235
7236
# No sense in running all these tests if we already determined that
7237
# the F77 compiler isn't working.  Some variables (like enable_shared)
7238
# are currently assumed to apply to all compilers on this platform,
7239
# and will be corrupted by setting them based on a non-working compiler.
7240
if test "$_lt_disable_F77" != yes; then
7241
  # Code to be used in simple compile tests
7242
  lt_simple_compile_test_code="\
7243
      subroutine t
7244
      return
7245
      end
7246
"
7247
7248
  # Code to be used in simple link tests
7249
  lt_simple_link_test_code="\
7250
      program t
7251
      end
7252
"
7253
7254
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7255
  _LT_TAG_COMPILER
7256
7257
  # save warnings/boilerplate of simple test code
7258
  _LT_COMPILER_BOILERPLATE
7259
  _LT_LINKER_BOILERPLATE
7260
7261
  # Allow CC to be a program name with arguments.
7262
  lt_save_CC="$CC"
7263
  lt_save_GCC=$GCC
7264
  CC=${F77-"f77"}
7265
  compiler=$CC
7266
  _LT_TAGVAR(compiler, $1)=$CC
7267
  _LT_CC_BASENAME([$compiler])
7268
  GCC=$G77
7269
  if test -n "$compiler"; then
7270
    AC_MSG_CHECKING([if libtool supports shared libraries])
7271
    AC_MSG_RESULT([$can_build_shared])
7272
7273
    AC_MSG_CHECKING([whether to build shared libraries])
7274
    test "$can_build_shared" = "no" && enable_shared=no
7275
7276
    # On AIX, shared libraries and static libraries use the same namespace, and
7277
    # are all built from PIC.
7278
    case $host_os in
7279
      aix3*)
7280
        test "$enable_shared" = yes && enable_static=no
7281
        if test -n "$RANLIB"; then
7282
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7283
          postinstall_cmds='$RANLIB $lib'
7284
        fi
7285
        ;;
7286
      aix[[4-9]]*)
7287
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7288
	  test "$enable_shared" = yes && enable_static=no
7289
	fi
7290
        ;;
7291
    esac
7292
    AC_MSG_RESULT([$enable_shared])
7293
7294
    AC_MSG_CHECKING([whether to build static libraries])
7295
    # Make sure either enable_shared or enable_static is yes.
7296
    test "$enable_shared" = yes || enable_static=yes
7297
    AC_MSG_RESULT([$enable_static])
7298
7299
    _LT_TAGVAR(GCC, $1)="$G77"
7300
    _LT_TAGVAR(LD, $1)="$LD"
7301
7302
    ## CAVEAT EMPTOR:
7303
    ## There is no encapsulation within the following macros, do not change
7304
    ## the running order or otherwise move them around unless you know exactly
7305
    ## what you are doing...
7306
    _LT_COMPILER_PIC($1)
7307
    _LT_COMPILER_C_O($1)
7308
    _LT_COMPILER_FILE_LOCKS($1)
7309
    _LT_LINKER_SHLIBS($1)
7310
    _LT_SYS_DYNAMIC_LINKER($1)
7311
    _LT_LINKER_HARDCODE_LIBPATH($1)
7312
7313
    _LT_CONFIG($1)
7314
  fi # test -n "$compiler"
7315
7316
  GCC=$lt_save_GCC
7317
  CC="$lt_save_CC"
7318
fi # test "$_lt_disable_F77" != yes
7319
7320
AC_LANG_POP
7321
])# _LT_LANG_F77_CONFIG
7322
7323
7324
# _LT_PROG_FC
7325
# -----------
7326
# Since AC_PROG_FC is broken, in that it returns the empty string
7327
# if there is no fortran compiler, we have our own version here.
7328
m4_defun([_LT_PROG_FC],
7329
[
7330
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7331
AC_PROG_FC
7332
if test -z "$FC" || test "X$FC" = "Xno"; then
7333
  _lt_disable_FC=yes
7334
fi
7335
popdef([AC_MSG_ERROR])
7336
])# _LT_PROG_FC
7337
7338
dnl aclocal-1.4 backwards compatibility:
7339
dnl AC_DEFUN([_LT_PROG_FC], [])
7340
7341
7342
# _LT_LANG_FC_CONFIG([TAG])
7343
# -------------------------
7344
# Ensure that the configuration variables for a Fortran compiler are
7345
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7346
# to write the compiler configuration to `libtool'.
7347
m4_defun([_LT_LANG_FC_CONFIG],
7348
[AC_REQUIRE([_LT_PROG_FC])dnl
7349
AC_LANG_PUSH(Fortran)
7350
7351
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7352
_LT_TAGVAR(allow_undefined_flag, $1)=
7353
_LT_TAGVAR(always_export_symbols, $1)=no
7354
_LT_TAGVAR(archive_expsym_cmds, $1)=
7355
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7356
_LT_TAGVAR(hardcode_direct, $1)=no
7357
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7358
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7359
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7360
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7361
_LT_TAGVAR(hardcode_minus_L, $1)=no
7362
_LT_TAGVAR(hardcode_automatic, $1)=no
7363
_LT_TAGVAR(inherit_rpath, $1)=no
7364
_LT_TAGVAR(module_cmds, $1)=
7365
_LT_TAGVAR(module_expsym_cmds, $1)=
7366
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7367
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7368
_LT_TAGVAR(no_undefined_flag, $1)=
7369
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7370
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7371
7372
# Source file extension for fc test sources.
7373
ac_ext=${ac_fc_srcext-f}
7374
7375
# Object file extension for compiled fc test sources.
7376
objext=o
7377
_LT_TAGVAR(objext, $1)=$objext
7378
7379
# No sense in running all these tests if we already determined that
7380
# the FC compiler isn't working.  Some variables (like enable_shared)
7381
# are currently assumed to apply to all compilers on this platform,
7382
# and will be corrupted by setting them based on a non-working compiler.
7383
if test "$_lt_disable_FC" != yes; then
7384
  # Code to be used in simple compile tests
7385
  lt_simple_compile_test_code="\
7386
      subroutine t
7387
      return
7388
      end
7389
"
7390
7391
  # Code to be used in simple link tests
7392
  lt_simple_link_test_code="\
7393
      program t
7394
      end
7395
"
7396
7397
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7398
  _LT_TAG_COMPILER
7399
7400
  # save warnings/boilerplate of simple test code
7401
  _LT_COMPILER_BOILERPLATE
7402
  _LT_LINKER_BOILERPLATE
7403
7404
  # Allow CC to be a program name with arguments.
7405
  lt_save_CC="$CC"
7406
  lt_save_GCC=$GCC
7407
  CC=${FC-"f95"}
7408
  compiler=$CC
7409
  GCC=$ac_cv_fc_compiler_gnu
7410
7411
  _LT_TAGVAR(compiler, $1)=$CC
7412
  _LT_CC_BASENAME([$compiler])
7413
7414
  if test -n "$compiler"; then
7415
    AC_MSG_CHECKING([if libtool supports shared libraries])
7416
    AC_MSG_RESULT([$can_build_shared])
7417
7418
    AC_MSG_CHECKING([whether to build shared libraries])
7419
    test "$can_build_shared" = "no" && enable_shared=no
7420
7421
    # On AIX, shared libraries and static libraries use the same namespace, and
7422
    # are all built from PIC.
7423
    case $host_os in
7424
      aix3*)
7425
        test "$enable_shared" = yes && enable_static=no
7426
        if test -n "$RANLIB"; then
7427
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7428
          postinstall_cmds='$RANLIB $lib'
7429
        fi
7430
        ;;
7431
      aix[[4-9]]*)
7432
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7433
	  test "$enable_shared" = yes && enable_static=no
7434
	fi
7435
        ;;
7436
    esac
7437
    AC_MSG_RESULT([$enable_shared])
7438
7439
    AC_MSG_CHECKING([whether to build static libraries])
7440
    # Make sure either enable_shared or enable_static is yes.
7441
    test "$enable_shared" = yes || enable_static=yes
7442
    AC_MSG_RESULT([$enable_static])
7443
7444
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7445
    _LT_TAGVAR(LD, $1)="$LD"
7446
7447
    ## CAVEAT EMPTOR:
7448
    ## There is no encapsulation within the following macros, do not change
7449
    ## the running order or otherwise move them around unless you know exactly
7450
    ## what you are doing...
7451
    _LT_SYS_HIDDEN_LIBDEPS($1)
7452
    _LT_COMPILER_PIC($1)
7453
    _LT_COMPILER_C_O($1)
7454
    _LT_COMPILER_FILE_LOCKS($1)
7455
    _LT_LINKER_SHLIBS($1)
7456
    _LT_SYS_DYNAMIC_LINKER($1)
7457
    _LT_LINKER_HARDCODE_LIBPATH($1)
7458
7459
    _LT_CONFIG($1)
7460
  fi # test -n "$compiler"
7461
7462
  GCC=$lt_save_GCC
7463
  CC="$lt_save_CC"
7464
fi # test "$_lt_disable_FC" != yes
7465
7466
AC_LANG_POP
7467
])# _LT_LANG_FC_CONFIG
7468
7469
7470
# _LT_LANG_GCJ_CONFIG([TAG])
7471
# --------------------------
7472
# Ensure that the configuration variables for the GNU Java Compiler compiler
7473
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7474
# to write the compiler configuration to `libtool'.
7475
m4_defun([_LT_LANG_GCJ_CONFIG],
7476
[AC_REQUIRE([LT_PROG_GCJ])dnl
7477
AC_LANG_SAVE
7478
7479
# Source file extension for Java test sources.
7480
ac_ext=java
7481
7482
# Object file extension for compiled Java test sources.
7483
objext=o
7484
_LT_TAGVAR(objext, $1)=$objext
7485
7486
# Code to be used in simple compile tests
7487
lt_simple_compile_test_code="class foo {}"
7488
7489
# Code to be used in simple link tests
7490
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7491
7492
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7493
_LT_TAG_COMPILER
7494
7495
# save warnings/boilerplate of simple test code
7496
_LT_COMPILER_BOILERPLATE
7497
_LT_LINKER_BOILERPLATE
7498
7499
# Allow CC to be a program name with arguments.
7500
lt_save_CC="$CC"
7501
lt_save_GCC=$GCC
7502
GCC=yes
7503
CC=${GCJ-"gcj"}
7504
compiler=$CC
7505
_LT_TAGVAR(compiler, $1)=$CC
7506
_LT_TAGVAR(LD, $1)="$LD"
7507
_LT_CC_BASENAME([$compiler])
7508
7509
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7510
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7511
7512
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7513
7514
if test -n "$compiler"; then
7515
  _LT_COMPILER_NO_RTTI($1)
7516
  _LT_COMPILER_PIC($1)
7517
  _LT_COMPILER_C_O($1)
7518
  _LT_COMPILER_FILE_LOCKS($1)
7519
  _LT_LINKER_SHLIBS($1)
7520
  _LT_LINKER_HARDCODE_LIBPATH($1)
7521
7522
  _LT_CONFIG($1)
7523
fi
7524
7525
AC_LANG_RESTORE
7526
7527
GCC=$lt_save_GCC
7528
CC="$lt_save_CC"
7529
])# _LT_LANG_GCJ_CONFIG
7530
7531
7532
# _LT_LANG_RC_CONFIG([TAG])
7533
# -------------------------
7534
# Ensure that the configuration variables for the Windows resource compiler
7535
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7536
# to write the compiler configuration to `libtool'.
7537
m4_defun([_LT_LANG_RC_CONFIG],
7538
[AC_REQUIRE([LT_PROG_RC])dnl
7539
AC_LANG_SAVE
7540
7541
# Source file extension for RC test sources.
7542
ac_ext=rc
7543
7544
# Object file extension for compiled RC test sources.
7545
objext=o
7546
_LT_TAGVAR(objext, $1)=$objext
7547
7548
# Code to be used in simple compile tests
7549
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7550
7551
# Code to be used in simple link tests
7552
lt_simple_link_test_code="$lt_simple_compile_test_code"
7553
7554
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7555
_LT_TAG_COMPILER
7556
7557
# save warnings/boilerplate of simple test code
7558
_LT_COMPILER_BOILERPLATE
7559
_LT_LINKER_BOILERPLATE
7560
7561
# Allow CC to be a program name with arguments.
7562
lt_save_CC="$CC"
7563
lt_save_GCC=$GCC
7564
GCC=
7565
CC=${RC-"windres"}
7566
compiler=$CC
7567
_LT_TAGVAR(compiler, $1)=$CC
7568
_LT_CC_BASENAME([$compiler])
7569
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7570
7571
if test -n "$compiler"; then
7572
  :
7573
  _LT_CONFIG($1)
7574
fi
7575
7576
GCC=$lt_save_GCC
7577
AC_LANG_RESTORE
7578
CC="$lt_save_CC"
7579
])# _LT_LANG_RC_CONFIG
7580
7581
7582
# LT_PROG_GCJ
7583
# -----------
7584
AC_DEFUN([LT_PROG_GCJ],
7585
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7586
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7587
    [AC_CHECK_TOOL(GCJ, gcj,)
7588
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7589
      AC_SUBST(GCJFLAGS)])])[]dnl
7590
])
7591
7592
# Old name:
7593
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7594
dnl aclocal-1.4 backwards compatibility:
7595
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7596
7597
7598
# LT_PROG_RC
7599
# ----------
7600
AC_DEFUN([LT_PROG_RC],
7601
[AC_CHECK_TOOL(RC, windres,)
7602
])
7603
7604
# Old name:
7605
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7606
dnl aclocal-1.4 backwards compatibility:
7607
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7608
7609
7610
# _LT_DECL_EGREP
7611
# --------------
7612
# If we don't have a new enough Autoconf to choose the best grep
7613
# available, choose the one first in the user's PATH.
7614
m4_defun([_LT_DECL_EGREP],
7615
[AC_REQUIRE([AC_PROG_EGREP])dnl
7616
AC_REQUIRE([AC_PROG_FGREP])dnl
7617
test -z "$GREP" && GREP=grep
7618
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7619
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7620
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7621
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7622
AC_SUBST([GREP])
7623
])
7624
7625
7626
# _LT_DECL_OBJDUMP
7627
# --------------
7628
# If we don't have a new enough Autoconf to choose the best objdump
7629
# available, choose the one first in the user's PATH.
7630
m4_defun([_LT_DECL_OBJDUMP],
7631
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7632
test -z "$OBJDUMP" && OBJDUMP=objdump
7633
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7634
AC_SUBST([OBJDUMP])
7635
])
7636
7637
7638
# _LT_DECL_SED
7639
# ------------
7640
# Check for a fully-functional sed program, that truncates
7641
# as few characters as possible.  Prefer GNU sed if found.
7642
m4_defun([_LT_DECL_SED],
7643
[AC_PROG_SED
7644
test -z "$SED" && SED=sed
7645
Xsed="$SED -e 1s/^X//"
7646
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7647
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7648
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7649
])# _LT_DECL_SED
7650
7651
m4_ifndef([AC_PROG_SED], [
7652
# NOTE: This macro has been submitted for inclusion into   #
7653
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7654
#  a released version of Autoconf we should remove this    #
7655
#  macro and use it instead.                               #
7656
7657
m4_defun([AC_PROG_SED],
7658
[AC_MSG_CHECKING([for a sed that does not truncate output])
7659
AC_CACHE_VAL(lt_cv_path_SED,
7660
[# Loop through the user's path and test for sed and gsed.
7661
# Then use that list of sed's as ones to test for truncation.
7662
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7663
for as_dir in $PATH
7664
do
7665
  IFS=$as_save_IFS
7666
  test -z "$as_dir" && as_dir=.
7667
  for lt_ac_prog in sed gsed; do
7668
    for ac_exec_ext in '' $ac_executable_extensions; do
7669
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7670
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7671
      fi
7672
    done
7673
  done
7674
done
7675
IFS=$as_save_IFS
7676
lt_ac_max=0
7677
lt_ac_count=0
7678
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7679
# along with /bin/sed that truncates output.
7680
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7681
  test ! -f $lt_ac_sed && continue
7682
  cat /dev/null > conftest.in
7683
  lt_ac_count=0
7684
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7685
  # Check for GNU sed and select it if it is found.
7686
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7687
    lt_cv_path_SED=$lt_ac_sed
7688
    break
7689
  fi
7690
  while true; do
7691
    cat conftest.in conftest.in >conftest.tmp
7692
    mv conftest.tmp conftest.in
7693
    cp conftest.in conftest.nl
7694
    echo >>conftest.nl
7695
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7696
    cmp -s conftest.out conftest.nl || break
7697
    # 10000 chars as input seems more than enough
7698
    test $lt_ac_count -gt 10 && break
7699
    lt_ac_count=`expr $lt_ac_count + 1`
7700
    if test $lt_ac_count -gt $lt_ac_max; then
7701
      lt_ac_max=$lt_ac_count
7702
      lt_cv_path_SED=$lt_ac_sed
7703
    fi
7704
  done
7705
done
7706
])
7707
SED=$lt_cv_path_SED
7708
AC_SUBST([SED])
7709
AC_MSG_RESULT([$SED])
7710
])#AC_PROG_SED
7711
])#m4_ifndef
7712
7713
# Old name:
7714
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7715
dnl aclocal-1.4 backwards compatibility:
7716
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7717
7718
7719
# _LT_CHECK_SHELL_FEATURES
7720
# ------------------------
7721
# Find out whether the shell is Bourne or XSI compatible,
7722
# or has some other useful features.
7723
m4_defun([_LT_CHECK_SHELL_FEATURES],
7724
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7725
# Try some XSI features
7726
xsi_shell=no
7727
( _lt_dummy="a/b/c"
7728
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7729
      = c,a/b,, \
7730
    && eval 'test $(( 1 + 1 )) -eq 2 \
7731
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7732
  && xsi_shell=yes
7733
AC_MSG_RESULT([$xsi_shell])
7734
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7735
7736
AC_MSG_CHECKING([whether the shell understands "+="])
7737
lt_shell_append=no
7738
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7739
    >/dev/null 2>&1 \
7740
  && lt_shell_append=yes
7741
AC_MSG_RESULT([$lt_shell_append])
7742
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7743
7744
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7745
  lt_unset=unset
7746
else
7747
  lt_unset=false
7748
fi
7749
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7750
7751
# test EBCDIC or ASCII
7752
case `echo X|tr X '\101'` in
7753
 A) # ASCII based system
7754
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7755
  lt_SP2NL='tr \040 \012'
7756
  lt_NL2SP='tr \015\012 \040\040'
7757
  ;;
7758
 *) # EBCDIC based system
7759
  lt_SP2NL='tr \100 \n'
7760
  lt_NL2SP='tr \r\n \100\100'
7761
  ;;
7762
esac
7763
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7764
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7765
])# _LT_CHECK_SHELL_FEATURES
7766
7767
7768
# _LT_PROG_XSI_SHELLFNS
7769
# ---------------------
7770
# Bourne and XSI compatible variants of some useful shell functions.
7771
m4_defun([_LT_PROG_XSI_SHELLFNS],
7772
[case $xsi_shell in
7773
  yes)
7774
    cat << \_LT_EOF >> "$cfgfile"
7775
7776
# func_dirname file append nondir_replacement
7777
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7778
# otherwise set result to NONDIR_REPLACEMENT.
7779
func_dirname ()
7780
{
7781
  case ${1} in
7782
    */*) func_dirname_result="${1%/*}${2}" ;;
7783
    *  ) func_dirname_result="${3}" ;;
7784
  esac
7785
}
7786
7787
# func_basename file
7788
func_basename ()
7789
{
7790
  func_basename_result="${1##*/}"
7791
}
7792
7793
# func_dirname_and_basename file append nondir_replacement
7794
# perform func_basename and func_dirname in a single function
7795
# call:
7796
#   dirname:  Compute the dirname of FILE.  If nonempty,
7797
#             add APPEND to the result, otherwise set result
7798
#             to NONDIR_REPLACEMENT.
7799
#             value returned in "$func_dirname_result"
7800
#   basename: Compute filename of FILE.
7801
#             value retuned in "$func_basename_result"
7802
# Implementation must be kept synchronized with func_dirname
7803
# and func_basename. For efficiency, we do not delegate to
7804
# those functions but instead duplicate the functionality here.
7805
func_dirname_and_basename ()
7806
{
7807
  case ${1} in
7808
    */*) func_dirname_result="${1%/*}${2}" ;;
7809
    *  ) func_dirname_result="${3}" ;;
7810
  esac
7811
  func_basename_result="${1##*/}"
7812
}
7813
7814
# func_stripname prefix suffix name
7815
# strip PREFIX and SUFFIX off of NAME.
7816
# PREFIX and SUFFIX must not contain globbing or regex special
7817
# characters, hashes, percent signs, but SUFFIX may contain a leading
7818
# dot (in which case that matches only a dot).
7819
func_stripname ()
7820
{
7821
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7822
  # positional parameters, so assign one to ordinary parameter first.
7823
  func_stripname_result=${3}
7824
  func_stripname_result=${func_stripname_result#"${1}"}
7825
  func_stripname_result=${func_stripname_result%"${2}"}
7826
}
7827
7828
# func_opt_split
7829
func_opt_split ()
7830
{
7831
  func_opt_split_opt=${1%%=*}
7832
  func_opt_split_arg=${1#*=}
7833
}
7834
7835
# func_lo2o object
7836
func_lo2o ()
7837
{
7838
  case ${1} in
7839
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7840
    *)    func_lo2o_result=${1} ;;
7841
  esac
7842
}
7843
7844
# func_xform libobj-or-source
7845
func_xform ()
7846
{
7847
  func_xform_result=${1%.*}.lo
7848
}
7849
7850
# func_arith arithmetic-term...
7851
func_arith ()
7852
{
7853
  func_arith_result=$(( $[*] ))
7854
}
7855
7856
# func_len string
7857
# STRING may not start with a hyphen.
7858
func_len ()
7859
{
7860
  func_len_result=${#1}
7861
}
7862
7863
_LT_EOF
7864
    ;;
7865
  *) # Bourne compatible functions.
7866
    cat << \_LT_EOF >> "$cfgfile"
7867
7868
# func_dirname file append nondir_replacement
7869
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7870
# otherwise set result to NONDIR_REPLACEMENT.
7871
func_dirname ()
7872
{
7873
  # Extract subdirectory from the argument.
7874
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7875
  if test "X$func_dirname_result" = "X${1}"; then
7876
    func_dirname_result="${3}"
7877
  else
7878
    func_dirname_result="$func_dirname_result${2}"
7879
  fi
7880
}
7881
7882
# func_basename file
7883
func_basename ()
7884
{
7885
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7886
}
7887
7888
dnl func_dirname_and_basename
7889
dnl A portable version of this function is already defined in general.m4sh
7890
dnl so there is no need for it here.
7891
7892
# func_stripname prefix suffix name
7893
# strip PREFIX and SUFFIX off of NAME.
7894
# PREFIX and SUFFIX must not contain globbing or regex special
7895
# characters, hashes, percent signs, but SUFFIX may contain a leading
7896
# dot (in which case that matches only a dot).
7897
# func_strip_suffix prefix name
7898
func_stripname ()
7899
{
7900
  case ${2} in
7901
    .*) func_stripname_result=`$ECHO "X${3}" \
7902
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7903
    *)  func_stripname_result=`$ECHO "X${3}" \
7904
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7905
  esac
7906
}
7907
7908
# sed scripts:
7909
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7910
my_sed_long_arg='1s/^-[[^=]]*=//'
7911
7912
# func_opt_split
7913
func_opt_split ()
7914
{
7915
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7916
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7917
}
7918
7919
# func_lo2o object
7920
func_lo2o ()
7921
{
7922
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7923
}
7924
7925
# func_xform libobj-or-source
7926
func_xform ()
7927
{
7928
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7929
}
7930
7931
# func_arith arithmetic-term...
7932
func_arith ()
7933
{
7934
  func_arith_result=`expr "$[@]"`
7935
}
7936
7937
# func_len string
7938
# STRING may not start with a hyphen.
7939
func_len ()
7940
{
7941
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7942
}
7943
7944
_LT_EOF
7945
esac
7946
7947
case $lt_shell_append in
7948
  yes)
7949
    cat << \_LT_EOF >> "$cfgfile"
7950
7951
# func_append var value
7952
# Append VALUE to the end of shell variable VAR.
7953
func_append ()
7954
{
7955
  eval "$[1]+=\$[2]"
7956
}
7957
_LT_EOF
7958
    ;;
7959
  *)
7960
    cat << \_LT_EOF >> "$cfgfile"
7961
7962
# func_append var value
7963
# Append VALUE to the end of shell variable VAR.
7964
func_append ()
7965
{
7966
  eval "$[1]=\$$[1]\$[2]"
7967
}
7968
7969
_LT_EOF
7970
    ;;
7971
  esac
7972
])
7973
7974
# Helper functions for option handling.                    -*- Autoconf -*-
7975
#
7976
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7977
#   Written by Gary V. Vaughan, 2004
7978
#
7979
# This file is free software; the Free Software Foundation gives
7980
# unlimited permission to copy and/or distribute it, with or without
7981
# modifications, as long as this notice is preserved.
7982
7983
# serial 6 ltoptions.m4
7984
7985
# This is to help aclocal find these macros, as it can't see m4_define.
7986
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7987
7988
7989
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7990
# ------------------------------------------
7991
m4_define([_LT_MANGLE_OPTION],
7992
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7993
7994
7995
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7996
# ---------------------------------------
7997
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7998
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7999
# saved as a flag.
8000
m4_define([_LT_SET_OPTION],
8001
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8002
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8003
        _LT_MANGLE_DEFUN([$1], [$2]),
8004
    [m4_warning([Unknown $1 option `$2'])])[]dnl
8005
])
8006
8007
8008
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8009
# ------------------------------------------------------------
8010
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8011
m4_define([_LT_IF_OPTION],
8012
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8013
8014
8015
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8016
# -------------------------------------------------------
8017
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8018
# are set.
8019
m4_define([_LT_UNLESS_OPTIONS],
8020
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8021
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8022
		      [m4_define([$0_found])])])[]dnl
8023
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8024
])[]dnl
8025
])
8026
8027
8028
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8029
# ----------------------------------------
8030
# OPTION-LIST is a space-separated list of Libtool options associated
8031
# with MACRO-NAME.  If any OPTION has a matching handler declared with
8032
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8033
# the unknown option and exit.
8034
m4_defun([_LT_SET_OPTIONS],
8035
[# Set options
8036
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8037
    [_LT_SET_OPTION([$1], _LT_Option)])
8038
8039
m4_if([$1],[LT_INIT],[
8040
  dnl
8041
  dnl Simply set some default values (i.e off) if boolean options were not
8042
  dnl specified:
8043
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8044
  ])
8045
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8046
  ])
8047
  dnl
8048
  dnl If no reference was made to various pairs of opposing options, then
8049
  dnl we run the default mode handler for the pair.  For example, if neither
8050
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8051
  dnl archives by default:
8052
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8053
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8054
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8055
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8056
  		   [_LT_ENABLE_FAST_INSTALL])
8057
  ])
8058
])# _LT_SET_OPTIONS
8059
8060
8061
8062
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8063
# -----------------------------------------
8064
m4_define([_LT_MANGLE_DEFUN],
8065
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8066
8067
8068
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8069
# -----------------------------------------------
8070
m4_define([LT_OPTION_DEFINE],
8071
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8072
])# LT_OPTION_DEFINE
8073
8074
8075
# dlopen
8076
# ------
8077
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8078
])
8079
8080
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8081
[_LT_SET_OPTION([LT_INIT], [dlopen])
8082
AC_DIAGNOSE([obsolete],
8083
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8084
put the `dlopen' option into LT_INIT's first parameter.])
8085
])
8086
8087
dnl aclocal-1.4 backwards compatibility:
8088
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8089
8090
8091
# win32-dll
8092
# ---------
8093
# Declare package support for building win32 dll's.
8094
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8095
[enable_win32_dll=yes
8096
8097
case $host in
8098
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8099
  AC_CHECK_TOOL(AS, as, false)
8100
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8101
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8102
  ;;
8103
esac
8104
8105
test -z "$AS" && AS=as
8106
_LT_DECL([], [AS],      [0], [Assembler program])dnl
8107
8108
test -z "$DLLTOOL" && DLLTOOL=dlltool
8109
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8110
8111
test -z "$OBJDUMP" && OBJDUMP=objdump
8112
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8113
])# win32-dll
8114
8115
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8116
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8117
_LT_SET_OPTION([LT_INIT], [win32-dll])
8118
AC_DIAGNOSE([obsolete],
8119
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8120
put the `win32-dll' option into LT_INIT's first parameter.])
8121
])
8122
8123
dnl aclocal-1.4 backwards compatibility:
8124
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8125
8126
8127
# _LT_ENABLE_SHARED([DEFAULT])
8128
# ----------------------------
8129
# implement the --enable-shared flag, and supports the `shared' and
8130
# `disable-shared' LT_INIT options.
8131
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8132
m4_define([_LT_ENABLE_SHARED],
8133
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8134
AC_ARG_ENABLE([shared],
8135
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8136
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8137
    [p=${PACKAGE-default}
8138
    case $enableval in
8139
    yes) enable_shared=yes ;;
8140
    no) enable_shared=no ;;
8141
    *)
8142
      enable_shared=no
8143
      # Look at the argument we got.  We use all the common list separators.
8144
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8145
      for pkg in $enableval; do
8146
	IFS="$lt_save_ifs"
8147
	if test "X$pkg" = "X$p"; then
8148
	  enable_shared=yes
8149
	fi
8150
      done
8151
      IFS="$lt_save_ifs"
8152
      ;;
8153
    esac],
8154
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8155
8156
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8157
	[Whether or not to build shared libraries])
8158
])# _LT_ENABLE_SHARED
8159
8160
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8161
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8162
8163
# Old names:
8164
AC_DEFUN([AC_ENABLE_SHARED],
8165
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8166
])
8167
8168
AC_DEFUN([AC_DISABLE_SHARED],
8169
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8170
])
8171
8172
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8173
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8174
8175
dnl aclocal-1.4 backwards compatibility:
8176
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8177
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8178
8179
8180
8181
# _LT_ENABLE_STATIC([DEFAULT])
8182
# ----------------------------
8183
# implement the --enable-static flag, and support the `static' and
8184
# `disable-static' LT_INIT options.
8185
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8186
m4_define([_LT_ENABLE_STATIC],
8187
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8188
AC_ARG_ENABLE([static],
8189
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8190
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8191
    [p=${PACKAGE-default}
8192
    case $enableval in
8193
    yes) enable_static=yes ;;
8194
    no) enable_static=no ;;
8195
    *)
8196
     enable_static=no
8197
      # Look at the argument we got.  We use all the common list separators.
8198
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8199
      for pkg in $enableval; do
8200
	IFS="$lt_save_ifs"
8201
	if test "X$pkg" = "X$p"; then
8202
	  enable_static=yes
8203
	fi
8204
      done
8205
      IFS="$lt_save_ifs"
8206
      ;;
8207
    esac],
8208
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8209
8210
    _LT_DECL([build_old_libs], [enable_static], [0],
8211
	[Whether or not to build static libraries])
8212
])# _LT_ENABLE_STATIC
8213
8214
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8215
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8216
8217
# Old names:
8218
AC_DEFUN([AC_ENABLE_STATIC],
8219
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8220
])
8221
8222
AC_DEFUN([AC_DISABLE_STATIC],
8223
[_LT_SET_OPTION([LT_INIT], [disable-static])
8224
])
8225
8226
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8227
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8228
8229
dnl aclocal-1.4 backwards compatibility:
8230
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8231
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8232
8233
8234
8235
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8236
# ----------------------------------
8237
# implement the --enable-fast-install flag, and support the `fast-install'
8238
# and `disable-fast-install' LT_INIT options.
8239
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8240
m4_define([_LT_ENABLE_FAST_INSTALL],
8241
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8242
AC_ARG_ENABLE([fast-install],
8243
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8244
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8245
    [p=${PACKAGE-default}
8246
    case $enableval in
8247
    yes) enable_fast_install=yes ;;
8248
    no) enable_fast_install=no ;;
8249
    *)
8250
      enable_fast_install=no
8251
      # Look at the argument we got.  We use all the common list separators.
8252
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8253
      for pkg in $enableval; do
8254
	IFS="$lt_save_ifs"
8255
	if test "X$pkg" = "X$p"; then
8256
	  enable_fast_install=yes
8257
	fi
8258
      done
8259
      IFS="$lt_save_ifs"
8260
      ;;
8261
    esac],
8262
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8263
8264
_LT_DECL([fast_install], [enable_fast_install], [0],
8265
	 [Whether or not to optimize for fast installation])dnl
8266
])# _LT_ENABLE_FAST_INSTALL
8267
8268
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8269
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8270
8271
# Old names:
8272
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8273
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8274
AC_DIAGNOSE([obsolete],
8275
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8276
the `fast-install' option into LT_INIT's first parameter.])
8277
])
8278
8279
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8280
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8281
AC_DIAGNOSE([obsolete],
8282
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8283
the `disable-fast-install' option into LT_INIT's first parameter.])
8284
])
8285
8286
dnl aclocal-1.4 backwards compatibility:
8287
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8288
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8289
8290
8291
# _LT_WITH_PIC([MODE])
8292
# --------------------
8293
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8294
# LT_INIT options.
8295
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8296
m4_define([_LT_WITH_PIC],
8297
[AC_ARG_WITH([pic],
8298
    [AS_HELP_STRING([--with-pic],
8299
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8300
    [pic_mode="$withval"],
8301
    [pic_mode=default])
8302
8303
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8304
8305
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8306
])# _LT_WITH_PIC
8307
8308
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8309
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8310
8311
# Old name:
8312
AU_DEFUN([AC_LIBTOOL_PICMODE],
8313
[_LT_SET_OPTION([LT_INIT], [pic-only])
8314
AC_DIAGNOSE([obsolete],
8315
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8316
put the `pic-only' option into LT_INIT's first parameter.])
8317
])
8318
8319
dnl aclocal-1.4 backwards compatibility:
8320
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8321
8322
8323
m4_define([_LTDL_MODE], [])
8324
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8325
		 [m4_define([_LTDL_MODE], [nonrecursive])])
8326
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8327
		 [m4_define([_LTDL_MODE], [recursive])])
8328
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8329
		 [m4_define([_LTDL_MODE], [subproject])])
8330
8331
m4_define([_LTDL_TYPE], [])
8332
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8333
		 [m4_define([_LTDL_TYPE], [installable])])
8334
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8335
		 [m4_define([_LTDL_TYPE], [convenience])])
8336
8337
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8338
#
8339
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8340
# Written by Gary V. Vaughan, 2004
8341
#
8342
# This file is free software; the Free Software Foundation gives
8343
# unlimited permission to copy and/or distribute it, with or without
8344
# modifications, as long as this notice is preserved.
8345
8346
# serial 6 ltsugar.m4
8347
8348
# This is to help aclocal find these macros, as it can't see m4_define.
8349
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8350
8351
8352
# lt_join(SEP, ARG1, [ARG2...])
8353
# -----------------------------
8354
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8355
# associated separator.
8356
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8357
# versions in m4sugar had bugs.
8358
m4_define([lt_join],
8359
[m4_if([$#], [1], [],
8360
       [$#], [2], [[$2]],
8361
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8362
m4_define([_lt_join],
8363
[m4_if([$#$2], [2], [],
8364
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8365
8366
8367
# lt_car(LIST)
8368
# lt_cdr(LIST)
8369
# ------------
8370
# Manipulate m4 lists.
8371
# These macros are necessary as long as will still need to support
8372
# Autoconf-2.59 which quotes differently.
8373
m4_define([lt_car], [[$1]])
8374
m4_define([lt_cdr],
8375
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8376
       [$#], 1, [],
8377
       [m4_dquote(m4_shift($@))])])
8378
m4_define([lt_unquote], $1)
8379
8380
8381
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8382
# ------------------------------------------
8383
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8384
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8385
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8386
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8387
# than defined and empty).
8388
#
8389
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8390
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8391
m4_define([lt_append],
8392
[m4_define([$1],
8393
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8394
8395
8396
8397
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8398
# ----------------------------------------------------------
8399
# Produce a SEP delimited list of all paired combinations of elements of
8400
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8401
# has the form PREFIXmINFIXSUFFIXn.
8402
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8403
m4_define([lt_combine],
8404
[m4_if(m4_eval([$# > 3]), [1],
8405
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8406
[[m4_foreach([_Lt_prefix], [$2],
8407
	     [m4_foreach([_Lt_suffix],
8408
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8409
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8410
8411
8412
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8413
# -----------------------------------------------------------------------
8414
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8415
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8416
m4_define([lt_if_append_uniq],
8417
[m4_ifdef([$1],
8418
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8419
		 [lt_append([$1], [$2], [$3])$4],
8420
		 [$5])],
8421
	  [lt_append([$1], [$2], [$3])$4])])
8422
8423
8424
# lt_dict_add(DICT, KEY, VALUE)
8425
# -----------------------------
8426
m4_define([lt_dict_add],
8427
[m4_define([$1($2)], [$3])])
8428
8429
8430
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8431
# --------------------------------------------
8432
m4_define([lt_dict_add_subkey],
8433
[m4_define([$1($2:$3)], [$4])])
8434
8435
8436
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8437
# ----------------------------------
8438
m4_define([lt_dict_fetch],
8439
[m4_ifval([$3],
8440
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8441
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8442
8443
8444
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8445
# -----------------------------------------------------------------
8446
m4_define([lt_if_dict_fetch],
8447
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8448
	[$5],
8449
    [$6])])
8450
8451
8452
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8453
# --------------------------------------------------------------
8454
m4_define([lt_dict_filter],
8455
[m4_if([$5], [], [],
8456
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8457
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8458
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8459
])
8460
8461
# ltversion.m4 -- version numbers			-*- Autoconf -*-
8462
#
8463
#   Copyright (C) 2004 Free Software Foundation, Inc.
8464
#   Written by Scott James Remnant, 2004
8465
#
8466
# This file is free software; the Free Software Foundation gives
8467
# unlimited permission to copy and/or distribute it, with or without
8468
# modifications, as long as this notice is preserved.
8469
8470
# Generated from ltversion.in.
8471
37.1.5 by Ken VanDine
Import upstream version 0.2.100
8472
# serial 3017 ltversion.m4
37 by Ken VanDine
Import upstream version 0.2.1
8473
# This file is part of GNU Libtool
8474
37.1.5 by Ken VanDine
Import upstream version 0.2.100
8475
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8476
m4_define([LT_PACKAGE_REVISION], [1.3017])
37 by Ken VanDine
Import upstream version 0.2.1
8477
8478
AC_DEFUN([LTVERSION_VERSION],
37.1.5 by Ken VanDine
Import upstream version 0.2.100
8479
[macro_version='2.2.6b'
8480
macro_revision='1.3017'
37 by Ken VanDine
Import upstream version 0.2.1
8481
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8482
_LT_DECL(, macro_revision, 0)
8483
])
8484
8485
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8486
#
8487
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8488
#   Written by Scott James Remnant, 2004.
8489
#
8490
# This file is free software; the Free Software Foundation gives
8491
# unlimited permission to copy and/or distribute it, with or without
8492
# modifications, as long as this notice is preserved.
8493
8494
# serial 4 lt~obsolete.m4
8495
8496
# These exist entirely to fool aclocal when bootstrapping libtool.
8497
#
8498
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8499
# which have later been changed to m4_define as they aren't part of the
8500
# exported API, or moved to Autoconf or Automake where they belong.
8501
#
8502
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8503
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8504
# using a macro with the same name in our local m4/libtool.m4 it'll
8505
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8506
# and doesn't know about Autoconf macros at all.)
8507
#
8508
# So we provide this file, which has a silly filename so it's always
8509
# included after everything else.  This provides aclocal with the
8510
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8511
# because those macros already exist, or will be overwritten later.
8512
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8513
#
8514
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8515
# Yes, that means every name once taken will need to remain here until
8516
# we give up compatibility with versions before 1.7, at which point
8517
# we need to keep only those names which we still refer to.
8518
8519
# This is to help aclocal find these macros, as it can't see m4_define.
8520
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8521
8522
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8523
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8524
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8525
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8526
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8527
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8528
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8529
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8530
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8531
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8532
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8533
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8534
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8535
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8536
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8537
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8538
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8539
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8540
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8541
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8542
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8543
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8544
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8545
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8546
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8547
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8548
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8549
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8550
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8551
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8552
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8553
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8554
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8555
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8556
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8557
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8558
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8559
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8560
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8561
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8562
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8563
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8564
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8565
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8566
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8567
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8568
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8569
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8570
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8571
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8572
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8573
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8574
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8575
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8576
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8577
37.1.11 by Rodrigo Moya
Import upstream version 0.3.3
8578
# nls.m4 serial 5 (gettext-0.18)
8579
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
8580
dnl Inc.
37 by Ken VanDine
Import upstream version 0.2.1
8581
dnl This file is free software; the Free Software Foundation
8582
dnl gives unlimited permission to copy and/or distribute it,
8583
dnl with or without modifications, as long as this notice is preserved.
8584
dnl
8585
dnl This file can can be used in projects which are not available under
8586
dnl the GNU General Public License or the GNU Library General Public
8587
dnl License but which still want to provide support for the GNU gettext
8588
dnl functionality.
8589
dnl Please note that the actual code of the GNU gettext library is covered
8590
dnl by the GNU Library General Public License, and the rest of the GNU
8591
dnl gettext package package is covered by the GNU General Public License.
8592
dnl They are *not* in the public domain.
8593
8594
dnl Authors:
8595
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8596
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8597
37.1.11 by Rodrigo Moya
Import upstream version 0.3.3
8598
AC_PREREQ([2.50])
37 by Ken VanDine
Import upstream version 0.2.1
8599
8600
AC_DEFUN([AM_NLS],
8601
[
8602
  AC_MSG_CHECKING([whether NLS is requested])
8603
  dnl Default is enabled NLS
37.1.11 by Rodrigo Moya
Import upstream version 0.3.3
8604
  AC_ARG_ENABLE([nls],
37 by Ken VanDine
Import upstream version 0.2.1
8605
    [  --disable-nls           do not use Native Language Support],
8606
    USE_NLS=$enableval, USE_NLS=yes)
37.1.11 by Rodrigo Moya
Import upstream version 0.3.3
8607
  AC_MSG_RESULT([$USE_NLS])
8608
  AC_SUBST([USE_NLS])
37 by Ken VanDine
Import upstream version 0.2.1
8609
])
8610
8611
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8612
# serial 1 (pkg-config-0.24)
37 by Ken VanDine
Import upstream version 0.2.1
8613
# 
8614
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8615
#
8616
# This program is free software; you can redistribute it and/or modify
8617
# it under the terms of the GNU General Public License as published by
8618
# the Free Software Foundation; either version 2 of the License, or
8619
# (at your option) any later version.
8620
#
8621
# This program is distributed in the hope that it will be useful, but
8622
# WITHOUT ANY WARRANTY; without even the implied warranty of
8623
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8624
# General Public License for more details.
8625
#
8626
# You should have received a copy of the GNU General Public License
8627
# along with this program; if not, write to the Free Software
8628
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8629
#
8630
# As a special exception to the GNU General Public License, if you
8631
# distribute this file as part of a program that contains a
8632
# configuration script generated by Autoconf, you may include it under
8633
# the same distribution terms that you use for the rest of that program.
8634
8635
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8636
# ----------------------------------
8637
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8638
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8639
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8640
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
8641
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
8642
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
8643
37 by Ken VanDine
Import upstream version 0.2.1
8644
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8645
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8646
fi
8647
if test -n "$PKG_CONFIG"; then
8648
	_pkg_min_version=m4_default([$1], [0.9.0])
8649
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8650
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8651
		AC_MSG_RESULT([yes])
8652
	else
8653
		AC_MSG_RESULT([no])
8654
		PKG_CONFIG=""
8655
	fi
8656
fi[]dnl
8657
])# PKG_PROG_PKG_CONFIG
8658
8659
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8660
#
8661
# Check to see whether a particular set of modules exists.  Similar
8662
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8663
#
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8664
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8665
# only at the first occurence in configure.ac, so if the first place
8666
# it's called might be skipped (such as if it is within an "if", you
8667
# have to call PKG_CHECK_EXISTS manually
37 by Ken VanDine
Import upstream version 0.2.1
8668
# --------------------------------------------------------------
8669
AC_DEFUN([PKG_CHECK_EXISTS],
8670
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8671
if test -n "$PKG_CONFIG" && \
8672
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8673
  m4_default([$2], [:])
37 by Ken VanDine
Import upstream version 0.2.1
8674
m4_ifvaln([$3], [else
8675
  $3])dnl
8676
fi])
8677
8678
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8679
# ---------------------------------------------
8680
m4_define([_PKG_CONFIG],
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8681
[if test -n "$$1"; then
8682
    pkg_cv_[]$1="$$1"
8683
 elif test -n "$PKG_CONFIG"; then
8684
    PKG_CHECK_EXISTS([$3],
8685
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8686
		     [pkg_failed=yes])
8687
 else
8688
    pkg_failed=untried
37 by Ken VanDine
Import upstream version 0.2.1
8689
fi[]dnl
8690
])# _PKG_CONFIG
8691
8692
# _PKG_SHORT_ERRORS_SUPPORTED
8693
# -----------------------------
8694
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8695
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8696
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8697
        _pkg_short_errors_supported=yes
8698
else
8699
        _pkg_short_errors_supported=no
8700
fi[]dnl
8701
])# _PKG_SHORT_ERRORS_SUPPORTED
8702
8703
8704
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8705
# [ACTION-IF-NOT-FOUND])
8706
#
8707
#
8708
# Note that if there is a possibility the first call to
8709
# PKG_CHECK_MODULES might not happen, you should be sure to include an
8710
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8711
#
8712
#
8713
# --------------------------------------------------------------
8714
AC_DEFUN([PKG_CHECK_MODULES],
8715
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8716
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8717
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8718
8719
pkg_failed=no
8720
AC_MSG_CHECKING([for $1])
8721
8722
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8723
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8724
8725
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8726
and $1[]_LIBS to avoid the need to call pkg-config.
8727
See the pkg-config man page for more details.])
8728
8729
if test $pkg_failed = yes; then
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8730
   	AC_MSG_RESULT([no])
37 by Ken VanDine
Import upstream version 0.2.1
8731
        _PKG_SHORT_ERRORS_SUPPORTED
8732
        if test $_pkg_short_errors_supported = yes; then
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8733
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
37 by Ken VanDine
Import upstream version 0.2.1
8734
        else 
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8735
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
37 by Ken VanDine
Import upstream version 0.2.1
8736
        fi
8737
	# Put the nasty error message in config.log where it belongs
8738
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8739
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8740
	m4_default([$4], [AC_MSG_ERROR(
37 by Ken VanDine
Import upstream version 0.2.1
8741
[Package requirements ($2) were not met:
8742
8743
$$1_PKG_ERRORS
8744
8745
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8746
installed software in a non-standard prefix.
8747
77 by Loïc Minier
bindings/mono/Makefile.am: if srcdir != builddir, copy mono.snk keyfile
8748
_PKG_TEXT])[]dnl
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8749
        ])
37 by Ken VanDine
Import upstream version 0.2.1
8750
elif test $pkg_failed = untried; then
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8751
     	AC_MSG_RESULT([no])
8752
	m4_default([$4], [AC_MSG_FAILURE(
37 by Ken VanDine
Import upstream version 0.2.1
8753
[The pkg-config script could not be found or is too old.  Make sure it
8754
is in your PATH or set the PKG_CONFIG environment variable to the full
8755
path to pkg-config.
8756
8757
_PKG_TEXT
8758
77 by Loïc Minier
bindings/mono/Makefile.am: if srcdir != builddir, copy mono.snk keyfile
8759
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8760
        ])
37 by Ken VanDine
Import upstream version 0.2.1
8761
else
8762
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8763
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8764
        AC_MSG_RESULT([yes])
37.1.10 by Rodrigo Moya
Import upstream version 0.3.2
8765
	$3
37 by Ken VanDine
Import upstream version 0.2.1
8766
fi[]dnl
8767
])# PKG_CHECK_MODULES
8768
8769
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8770
#
8771
# This file is free software; the Free Software Foundation
8772
# gives unlimited permission to copy and/or distribute it,
8773
# with or without modifications, as long as this notice is preserved.
8774
8775
# AM_AUTOMAKE_VERSION(VERSION)
8776
# ----------------------------
8777
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8778
# generated from the m4 files accompanying Automake X.Y.
8779
# (This private macro should not be called outside this file.)
8780
AC_DEFUN([AM_AUTOMAKE_VERSION],
8781
[am__api_version='1.11'
8782
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8783
dnl require some minimum version.  Point them to the right macro.
37.1.5 by Ken VanDine
Import upstream version 0.2.100
8784
m4_if([$1], [1.11.1], [],
37 by Ken VanDine
Import upstream version 0.2.1
8785
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8786
])
8787
8788
# _AM_AUTOCONF_VERSION(VERSION)
8789
# -----------------------------
8790
# aclocal traces this macro to find the Autoconf version.
8791
# This is a private macro too.  Using m4_define simplifies
8792
# the logic in aclocal, which can simply ignore this definition.
8793
m4_define([_AM_AUTOCONF_VERSION], [])
8794
8795
# AM_SET_CURRENT_AUTOMAKE_VERSION
8796
# -------------------------------
8797
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8798
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8799
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
37.1.5 by Ken VanDine
Import upstream version 0.2.100
8800
[AM_AUTOMAKE_VERSION([1.11.1])dnl
37 by Ken VanDine
Import upstream version 0.2.1
8801
m4_ifndef([AC_AUTOCONF_VERSION],
8802
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8803
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8804
8805
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8806
8807
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8808
#
8809
# This file is free software; the Free Software Foundation
8810
# gives unlimited permission to copy and/or distribute it,
8811
# with or without modifications, as long as this notice is preserved.
8812
8813
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8814
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8815
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8816
#
8817
# Of course, Automake must honor this variable whenever it calls a
8818
# tool from the auxiliary directory.  The problem is that $srcdir (and
8819
# therefore $ac_aux_dir as well) can be either absolute or relative,
8820
# depending on how configure is run.  This is pretty annoying, since
8821
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8822
# source directory, any form will work fine, but in subdirectories a
8823
# relative path needs to be adjusted first.
8824
#
8825
# $ac_aux_dir/missing
8826
#    fails when called from a subdirectory if $ac_aux_dir is relative
8827
# $top_srcdir/$ac_aux_dir/missing
8828
#    fails if $ac_aux_dir is absolute,
8829
#    fails when called from a subdirectory in a VPATH build with
8830
#          a relative $ac_aux_dir
8831
#
8832
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8833
# are both prefixed by $srcdir.  In an in-source build this is usually
8834
# harmless because $srcdir is `.', but things will broke when you
8835
# start a VPATH build or use an absolute $srcdir.
8836
#
8837
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8838
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8839
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8840
# and then we would define $MISSING as
8841
#   MISSING="\${SHELL} $am_aux_dir/missing"
8842
# This will work as long as MISSING is not called from configure, because
8843
# unfortunately $(top_srcdir) has no meaning in configure.
8844
# However there are other variables, like CC, which are often used in
8845
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8846
#
8847
# Another solution, used here, is to always expand $ac_aux_dir to an
8848
# absolute PATH.  The drawback is that using absolute paths prevent a
8849
# configured tree to be moved without reconfiguration.
8850
8851
AC_DEFUN([AM_AUX_DIR_EXPAND],
8852
[dnl Rely on autoconf to set up CDPATH properly.
8853
AC_PREREQ([2.50])dnl
8854
# expand $ac_aux_dir to an absolute path
8855
am_aux_dir=`cd $ac_aux_dir && pwd`
8856
])
8857
8858
# AM_CONDITIONAL                                            -*- Autoconf -*-
8859
8860
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8861
# Free Software Foundation, Inc.
8862
#
8863
# This file is free software; the Free Software Foundation
8864
# gives unlimited permission to copy and/or distribute it,
8865
# with or without modifications, as long as this notice is preserved.
8866
8867
# serial 9
8868
8869
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8870
# -------------------------------------
8871
# Define a conditional.
8872
AC_DEFUN([AM_CONDITIONAL],
8873
[AC_PREREQ(2.52)dnl
8874
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8875
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8876
AC_SUBST([$1_TRUE])dnl
8877
AC_SUBST([$1_FALSE])dnl
8878
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8879
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8880
m4_define([_AM_COND_VALUE_$1], [$2])dnl
8881
if $2; then
8882
  $1_TRUE=
8883
  $1_FALSE='#'
8884
else
8885
  $1_TRUE='#'
8886
  $1_FALSE=
8887
fi
8888
AC_CONFIG_COMMANDS_PRE(
8889
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8890
  AC_MSG_ERROR([[conditional "$1" was never defined.
8891
Usually this means the macro was only invoked conditionally.]])
8892
fi])])
8893
8894
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8895
# Free Software Foundation, Inc.
8896
#
8897
# This file is free software; the Free Software Foundation
8898
# gives unlimited permission to copy and/or distribute it,
8899
# with or without modifications, as long as this notice is preserved.
8900
8901
# serial 10
8902
8903
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8904
# written in clear, in which case automake, when reading aclocal.m4,
8905
# will think it sees a *use*, and therefore will trigger all it's
8906
# C support machinery.  Also note that it means that autoscan, seeing
8907
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8908
8909
8910
# _AM_DEPENDENCIES(NAME)
8911
# ----------------------
8912
# See how the compiler implements dependency checking.
8913
# NAME is "CC", "CXX", "GCJ", or "OBJC".
8914
# We try a few techniques and use that to set a single cache variable.
8915
#
8916
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8917
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8918
# dependency, and given that the user is not expected to run this macro,
8919
# just rely on AC_PROG_CC.
8920
AC_DEFUN([_AM_DEPENDENCIES],
8921
[AC_REQUIRE([AM_SET_DEPDIR])dnl
8922
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8923
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8924
AC_REQUIRE([AM_DEP_TRACK])dnl
8925
8926
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8927
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8928
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8929
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8930
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8931
                   [depcc="$$1"   am_compiler_list=])
8932
8933
AC_CACHE_CHECK([dependency style of $depcc],
8934
               [am_cv_$1_dependencies_compiler_type],
8935
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8936
  # We make a subdir and do the tests there.  Otherwise we can end up
8937
  # making bogus files that we don't know about and never remove.  For
8938
  # instance it was reported that on HP-UX the gcc test will end up
8939
  # making a dummy file named `D' -- because `-MD' means `put the output
8940
  # in D'.
8941
  mkdir conftest.dir
8942
  # Copy depcomp to subdir because otherwise we won't find it if we're
8943
  # using a relative directory.
8944
  cp "$am_depcomp" conftest.dir
8945
  cd conftest.dir
8946
  # We will build objects and dependencies in a subdirectory because
8947
  # it helps to detect inapplicable dependency modes.  For instance
8948
  # both Tru64's cc and ICC support -MD to output dependencies as a
8949
  # side effect of compilation, but ICC will put the dependencies in
8950
  # the current directory while Tru64 will put them in the object
8951
  # directory.
8952
  mkdir sub
8953
8954
  am_cv_$1_dependencies_compiler_type=none
8955
  if test "$am_compiler_list" = ""; then
8956
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8957
  fi
8958
  am__universal=false
8959
  m4_case([$1], [CC],
8960
    [case " $depcc " in #(
8961
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8962
     esac],
8963
    [CXX],
8964
    [case " $depcc " in #(
8965
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8966
     esac])
8967
8968
  for depmode in $am_compiler_list; do
8969
    # Setup a source with many dependencies, because some compilers
8970
    # like to wrap large dependency lists on column 80 (with \), and
8971
    # we should not choose a depcomp mode which is confused by this.
8972
    #
8973
    # We need to recreate these files for each test, as the compiler may
8974
    # overwrite some of them when testing with obscure command lines.
8975
    # This happens at least with the AIX C compiler.
8976
    : > sub/conftest.c
8977
    for i in 1 2 3 4 5 6; do
8978
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8979
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8980
      # Solaris 8's {/usr,}/bin/sh.
8981
      touch sub/conftst$i.h
8982
    done
8983
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8984
8985
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8986
    # mode.  It turns out that the SunPro C++ compiler does not properly
8987
    # handle `-M -o', and we need to detect this.  Also, some Intel
8988
    # versions had trouble with output in subdirs
8989
    am__obj=sub/conftest.${OBJEXT-o}
8990
    am__minus_obj="-o $am__obj"
8991
    case $depmode in
8992
    gcc)
8993
      # This depmode causes a compiler race in universal mode.
8994
      test "$am__universal" = false || continue
8995
      ;;
8996
    nosideeffect)
8997
      # after this tag, mechanisms are not by side-effect, so they'll
8998
      # only be used when explicitly requested
8999
      if test "x$enable_dependency_tracking" = xyes; then
9000
	continue
9001
      else
9002
	break
9003
      fi
9004
      ;;
9005
    msvisualcpp | msvcmsys)
9006
      # This compiler won't grok `-c -o', but also, the minuso test has
9007
      # not run yet.  These depmodes are late enough in the game, and
9008
      # so weak that their functioning should not be impacted.
9009
      am__obj=conftest.${OBJEXT-o}
9010
      am__minus_obj=
9011
      ;;
9012
    none) break ;;
9013
    esac
9014
    if depmode=$depmode \
9015
       source=sub/conftest.c object=$am__obj \
9016
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9017
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9018
         >/dev/null 2>conftest.err &&
9019
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9020
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9021
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9022
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9023
      # icc doesn't choke on unknown options, it will just issue warnings
9024
      # or remarks (even with -Werror).  So we grep stderr for any message
9025
      # that says an option was ignored or not supported.
9026
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9027
      #   icc: Command line warning: ignoring option '-M'; no argument required
9028
      # The diagnosis changed in icc 8.0:
9029
      #   icc: Command line remark: option '-MP' not supported
9030
      if (grep 'ignoring option' conftest.err ||
9031
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9032
        am_cv_$1_dependencies_compiler_type=$depmode
9033
        break
9034
      fi
9035
    fi
9036
  done
9037
9038
  cd ..
9039
  rm -rf conftest.dir
9040
else
9041
  am_cv_$1_dependencies_compiler_type=none
9042
fi
9043
])
9044
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9045
AM_CONDITIONAL([am__fastdep$1], [
9046
  test "x$enable_dependency_tracking" != xno \
9047
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9048
])
9049
9050
9051
# AM_SET_DEPDIR
9052
# -------------
9053
# Choose a directory name for dependency files.
9054
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9055
AC_DEFUN([AM_SET_DEPDIR],
9056
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9057
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9058
])
9059
9060
9061
# AM_DEP_TRACK
9062
# ------------
9063
AC_DEFUN([AM_DEP_TRACK],
9064
[AC_ARG_ENABLE(dependency-tracking,
9065
[  --disable-dependency-tracking  speeds up one-time build
9066
  --enable-dependency-tracking   do not reject slow dependency extractors])
9067
if test "x$enable_dependency_tracking" != xno; then
9068
  am_depcomp="$ac_aux_dir/depcomp"
9069
  AMDEPBACKSLASH='\'
9070
fi
9071
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9072
AC_SUBST([AMDEPBACKSLASH])dnl
9073
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9074
])
9075
9076
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9077
9078
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9079
# Free Software Foundation, Inc.
9080
#
9081
# This file is free software; the Free Software Foundation
9082
# gives unlimited permission to copy and/or distribute it,
9083
# with or without modifications, as long as this notice is preserved.
9084
9085
#serial 5
9086
9087
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9088
# ------------------------------
9089
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9090
[{
9091
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
9092
  # are listed without --file.  Let's play safe and only enable the eval
9093
  # if we detect the quoting.
9094
  case $CONFIG_FILES in
9095
  *\'*) eval set x "$CONFIG_FILES" ;;
9096
  *)   set x $CONFIG_FILES ;;
9097
  esac
9098
  shift
9099
  for mf
9100
  do
9101
    # Strip MF so we end up with the name of the file.
9102
    mf=`echo "$mf" | sed -e 's/:.*$//'`
9103
    # Check whether this is an Automake generated Makefile or not.
9104
    # We used to match only the files named `Makefile.in', but
9105
    # some people rename them; so instead we look at the file content.
9106
    # Grep'ing the first line is not enough: some people post-process
9107
    # each Makefile.in and add a new line on top of each file to say so.
9108
    # Grep'ing the whole file is not good either: AIX grep has a line
9109
    # limit of 2048, but all sed's we know have understand at least 4000.
9110
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9111
      dirpart=`AS_DIRNAME("$mf")`
9112
    else
9113
      continue
9114
    fi
9115
    # Extract the definition of DEPDIR, am__include, and am__quote
9116
    # from the Makefile without running `make'.
9117
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9118
    test -z "$DEPDIR" && continue
9119
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9120
    test -z "am__include" && continue
9121
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9122
    # When using ansi2knr, U may be empty or an underscore; expand it
9123
    U=`sed -n 's/^U = //p' < "$mf"`
9124
    # Find all dependency output files, they are included files with
9125
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9126
    # simplest approach to changing $(DEPDIR) to its actual value in the
9127
    # expansion.
9128
    for file in `sed -n "
9129
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9130
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9131
      # Make sure the directory exists.
9132
      test -f "$dirpart/$file" && continue
9133
      fdir=`AS_DIRNAME(["$file"])`
9134
      AS_MKDIR_P([$dirpart/$fdir])
9135
      # echo "creating $dirpart/$file"
9136
      echo '# dummy' > "$dirpart/$file"
9137
    done
9138
  done
9139
}
9140
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9141
9142
9143
# AM_OUTPUT_DEPENDENCY_COMMANDS
9144
# -----------------------------
9145
# This macro should only be invoked once -- use via AC_REQUIRE.
9146
#
9147
# This code is only required when automatic dependency tracking
9148
# is enabled.  FIXME.  This creates each `.P' file that we will
9149
# need in order to bootstrap the dependency handling code.
9150
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9151
[AC_CONFIG_COMMANDS([depfiles],
9152
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9153
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9154
])
9155
9156
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9157
# Free Software Foundation, Inc.
9158
#
9159
# This file is free software; the Free Software Foundation
9160
# gives unlimited permission to copy and/or distribute it,
9161
# with or without modifications, as long as this notice is preserved.
9162
9163
# serial 8
9164
9165
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9166
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9167
9168
# Do all the work for Automake.                             -*- Autoconf -*-
9169
9170
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9171
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9172
#
9173
# This file is free software; the Free Software Foundation
9174
# gives unlimited permission to copy and/or distribute it,
9175
# with or without modifications, as long as this notice is preserved.
9176
9177
# serial 16
9178
9179
# This macro actually does too much.  Some checks are only needed if
9180
# your package does certain things.  But this isn't really a big deal.
9181
9182
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9183
# AM_INIT_AUTOMAKE([OPTIONS])
9184
# -----------------------------------------------
9185
# The call with PACKAGE and VERSION arguments is the old style
9186
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9187
# and VERSION should now be passed to AC_INIT and removed from
9188
# the call to AM_INIT_AUTOMAKE.
9189
# We support both call styles for the transition.  After
9190
# the next Automake release, Autoconf can make the AC_INIT
9191
# arguments mandatory, and then we can depend on a new Autoconf
9192
# release and drop the old call support.
9193
AC_DEFUN([AM_INIT_AUTOMAKE],
9194
[AC_PREREQ([2.62])dnl
9195
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9196
dnl the ones we care about.
9197
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9198
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9199
AC_REQUIRE([AC_PROG_INSTALL])dnl
9200
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9201
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9202
  # is not polluted with repeated "-I."
9203
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9204
  # test to see if srcdir already configured
9205
  if test -f $srcdir/config.status; then
9206
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9207
  fi
9208
fi
9209
9210
# test whether we have cygpath
9211
if test -z "$CYGPATH_W"; then
9212
  if (cygpath --version) >/dev/null 2>/dev/null; then
9213
    CYGPATH_W='cygpath -w'
9214
  else
9215
    CYGPATH_W=echo
9216
  fi
9217
fi
9218
AC_SUBST([CYGPATH_W])
9219
9220
# Define the identity of the package.
9221
dnl Distinguish between old-style and new-style calls.
9222
m4_ifval([$2],
9223
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9224
 AC_SUBST([PACKAGE], [$1])dnl
9225
 AC_SUBST([VERSION], [$2])],
9226
[_AM_SET_OPTIONS([$1])dnl
9227
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9228
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9229
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9230
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9231
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9232
9233
_AM_IF_OPTION([no-define],,
9234
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9235
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9236
9237
# Some tools Automake needs.
9238
AC_REQUIRE([AM_SANITY_CHECK])dnl
9239
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9240
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9241
AM_MISSING_PROG(AUTOCONF, autoconf)
9242
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9243
AM_MISSING_PROG(AUTOHEADER, autoheader)
9244
AM_MISSING_PROG(MAKEINFO, makeinfo)
9245
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9246
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9247
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9248
# We need awk for the "check" target.  The system "awk" is bad on
9249
# some platforms.
9250
AC_REQUIRE([AC_PROG_AWK])dnl
9251
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9252
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9253
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9254
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9255
			     [_AM_PROG_TAR([v7])])])
9256
_AM_IF_OPTION([no-dependencies],,
9257
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9258
		  [_AM_DEPENDENCIES(CC)],
9259
		  [define([AC_PROG_CC],
9260
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9261
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9262
		  [_AM_DEPENDENCIES(CXX)],
9263
		  [define([AC_PROG_CXX],
9264
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9265
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9266
		  [_AM_DEPENDENCIES(OBJC)],
9267
		  [define([AC_PROG_OBJC],
9268
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9269
])
9270
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9271
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9272
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9273
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9274
AC_CONFIG_COMMANDS_PRE(dnl
9275
[m4_provide_if([_AM_COMPILER_EXEEXT],
9276
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9277
])
9278
9279
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9280
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9281
dnl mangled by Autoconf and run in a shell conditional statement.
9282
m4_define([_AC_COMPILER_EXEEXT],
9283
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9284
9285
9286
# When config.status generates a header, we must update the stamp-h file.
9287
# This file resides in the same directory as the config header
9288
# that is generated.  The stamp files are numbered to have different names.
9289
9290
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9291
# loop where config.status creates the headers, so we can generate
9292
# our stamp files there.
9293
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9294
[# Compute $1's index in $config_headers.
9295
_am_arg=$1
9296
_am_stamp_count=1
9297
for _am_header in $config_headers :; do
9298
  case $_am_header in
9299
    $_am_arg | $_am_arg:* )
9300
      break ;;
9301
    * )
9302
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9303
  esac
9304
done
9305
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9306
9307
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9308
#
9309
# This file is free software; the Free Software Foundation
9310
# gives unlimited permission to copy and/or distribute it,
9311
# with or without modifications, as long as this notice is preserved.
9312
9313
# AM_PROG_INSTALL_SH
9314
# ------------------
9315
# Define $install_sh.
9316
AC_DEFUN([AM_PROG_INSTALL_SH],
9317
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9318
if test x"${install_sh}" != xset; then
9319
  case $am_aux_dir in
9320
  *\ * | *\	*)
9321
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9322
  *)
9323
    install_sh="\${SHELL} $am_aux_dir/install-sh"
9324
  esac
9325
fi
9326
AC_SUBST(install_sh)])
9327
9328
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9329
#
9330
# This file is free software; the Free Software Foundation
9331
# gives unlimited permission to copy and/or distribute it,
9332
# with or without modifications, as long as this notice is preserved.
9333
9334
# serial 2
9335
9336
# Check whether the underlying file-system supports filenames
9337
# with a leading dot.  For instance MS-DOS doesn't.
9338
AC_DEFUN([AM_SET_LEADING_DOT],
9339
[rm -rf .tst 2>/dev/null
9340
mkdir .tst 2>/dev/null
9341
if test -d .tst; then
9342
  am__leading_dot=.
9343
else
9344
  am__leading_dot=_
9345
fi
9346
rmdir .tst 2>/dev/null
9347
AC_SUBST([am__leading_dot])])
9348
9349
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9350
9351
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9352
#
9353
# This file is free software; the Free Software Foundation
9354
# gives unlimited permission to copy and/or distribute it,
9355
# with or without modifications, as long as this notice is preserved.
9356
9357
# serial 4
9358
9359
# AM_MAKE_INCLUDE()
9360
# -----------------
9361
# Check to see how make treats includes.
9362
AC_DEFUN([AM_MAKE_INCLUDE],
9363
[am_make=${MAKE-make}
9364
cat > confinc << 'END'
9365
am__doit:
9366
	@echo this is the am__doit target
9367
.PHONY: am__doit
9368
END
9369
# If we don't find an include directive, just comment out the code.
9370
AC_MSG_CHECKING([for style of include used by $am_make])
9371
am__include="#"
9372
am__quote=
9373
_am_result=none
9374
# First try GNU make style include.
9375
echo "include confinc" > confmf
9376
# Ignore all kinds of additional output from `make'.
9377
case `$am_make -s -f confmf 2> /dev/null` in #(
9378
*the\ am__doit\ target*)
9379
  am__include=include
9380
  am__quote=
9381
  _am_result=GNU
9382
  ;;
9383
esac
9384
# Now try BSD make style include.
9385
if test "$am__include" = "#"; then
9386
   echo '.include "confinc"' > confmf
9387
   case `$am_make -s -f confmf 2> /dev/null` in #(
9388
   *the\ am__doit\ target*)
9389
     am__include=.include
9390
     am__quote="\""
9391
     _am_result=BSD
9392
     ;;
9393
   esac
9394
fi
9395
AC_SUBST([am__include])
9396
AC_SUBST([am__quote])
9397
AC_MSG_RESULT([$_am_result])
9398
rm -f confinc confmf
9399
])
9400
9401
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9402
9403
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9404
# Free Software Foundation, Inc.
9405
#
9406
# This file is free software; the Free Software Foundation
9407
# gives unlimited permission to copy and/or distribute it,
9408
# with or without modifications, as long as this notice is preserved.
9409
9410
# serial 6
9411
9412
# AM_MISSING_PROG(NAME, PROGRAM)
9413
# ------------------------------
9414
AC_DEFUN([AM_MISSING_PROG],
9415
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9416
$1=${$1-"${am_missing_run}$2"}
9417
AC_SUBST($1)])
9418
9419
9420
# AM_MISSING_HAS_RUN
9421
# ------------------
9422
# Define MISSING if not defined so far and test if it supports --run.
9423
# If it does, set am_missing_run to use it, otherwise, to nothing.
9424
AC_DEFUN([AM_MISSING_HAS_RUN],
9425
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9426
AC_REQUIRE_AUX_FILE([missing])dnl
9427
if test x"${MISSING+set}" != xset; then
9428
  case $am_aux_dir in
9429
  *\ * | *\	*)
9430
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9431
  *)
9432
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
9433
  esac
9434
fi
9435
# Use eval to expand $SHELL
9436
if eval "$MISSING --run true"; then
9437
  am_missing_run="$MISSING --run "
9438
else
9439
  am_missing_run=
9440
  AC_MSG_WARN([`missing' script is too old or missing])
9441
fi
9442
])
9443
9444
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9445
#
9446
# This file is free software; the Free Software Foundation
9447
# gives unlimited permission to copy and/or distribute it,
9448
# with or without modifications, as long as this notice is preserved.
9449
9450
# AM_PROG_MKDIR_P
9451
# ---------------
9452
# Check for `mkdir -p'.
9453
AC_DEFUN([AM_PROG_MKDIR_P],
9454
[AC_PREREQ([2.60])dnl
9455
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9456
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9457
dnl while keeping a definition of mkdir_p for backward compatibility.
9458
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9459
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9460
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9461
dnl adjustment using top_builddir (which is defined more often than
9462
dnl MKDIR_P).
9463
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9464
case $mkdir_p in
9465
  [[\\/$]]* | ?:[[\\/]]*) ;;
9466
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9467
esac
9468
])
9469
9470
# Helper functions for option handling.                     -*- Autoconf -*-
9471
9472
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9473
#
9474
# This file is free software; the Free Software Foundation
9475
# gives unlimited permission to copy and/or distribute it,
9476
# with or without modifications, as long as this notice is preserved.
9477
9478
# serial 4
9479
9480
# _AM_MANGLE_OPTION(NAME)
9481
# -----------------------
9482
AC_DEFUN([_AM_MANGLE_OPTION],
9483
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9484
9485
# _AM_SET_OPTION(NAME)
9486
# ------------------------------
9487
# Set option NAME.  Presently that only means defining a flag for this option.
9488
AC_DEFUN([_AM_SET_OPTION],
9489
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9490
9491
# _AM_SET_OPTIONS(OPTIONS)
9492
# ----------------------------------
9493
# OPTIONS is a space-separated list of Automake options.
9494
AC_DEFUN([_AM_SET_OPTIONS],
9495
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9496
9497
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9498
# -------------------------------------------
9499
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9500
AC_DEFUN([_AM_IF_OPTION],
9501
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9502
9503
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
9504
# Free Software Foundation, Inc.
9505
#
9506
# This file is free software; the Free Software Foundation
9507
# gives unlimited permission to copy and/or distribute it,
9508
# with or without modifications, as long as this notice is preserved.
9509
9510
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9511
# ---------------------------------------------------------------------------
9512
# Adds support for distributing Python modules and packages.  To
9513
# install modules, copy them to $(pythondir), using the python_PYTHON
9514
# automake variable.  To install a package with the same name as the
9515
# automake package, install to $(pkgpythondir), or use the
9516
# pkgpython_PYTHON automake variable.
9517
#
9518
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
9519
# locations to install python extension modules (shared libraries).
9520
# Another macro is required to find the appropriate flags to compile
9521
# extension modules.
9522
#
9523
# If your package is configured with a different prefix to python,
9524
# users will have to add the install directory to the PYTHONPATH
9525
# environment variable, or create a .pth file (see the python
9526
# documentation for details).
9527
#
9528
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
9529
# cause an error if the version of python installed on the system
9530
# doesn't meet the requirement.  MINIMUM-VERSION should consist of
9531
# numbers and dots only.
9532
AC_DEFUN([AM_PATH_PYTHON],
9533
 [
9534
  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
9535
  dnl supported. (2.0 was released on October 16, 2000).
9536
  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
77 by Loïc Minier
bindings/mono/Makefile.am: if srcdir != builddir, copy mono.snk keyfile
9537
                    [python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 dnl
37 by Ken VanDine
Import upstream version 0.2.1
9538
python2.1 python2.0])
9539
9540
  m4_if([$1],[],[
9541
    dnl No version check is needed.
9542
    # Find any Python interpreter.
9543
    if test -z "$PYTHON"; then
9544
      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
9545
    fi
9546
    am_display_PYTHON=python
9547
  ], [
9548
    dnl A version check is needed.
9549
    if test -n "$PYTHON"; then
9550
      # If the user set $PYTHON, use it and don't search something else.
9551
      AC_MSG_CHECKING([whether $PYTHON version >= $1])
9552
      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
9553
			      [AC_MSG_RESULT(yes)],
9554
			      [AC_MSG_ERROR(too old)])
9555
      am_display_PYTHON=$PYTHON
9556
    else
9557
      # Otherwise, try each interpreter until we find one that satisfies
9558
      # VERSION.
9559
      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
9560
	[am_cv_pathless_PYTHON],[
9561
	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
9562
	  test "$am_cv_pathless_PYTHON" = none && break
9563
	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
9564
	done])
9565
      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
9566
      if test "$am_cv_pathless_PYTHON" = none; then
9567
	PYTHON=:
9568
      else
9569
        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
9570
      fi
9571
      am_display_PYTHON=$am_cv_pathless_PYTHON
9572
    fi
9573
  ])
9574
9575
  if test "$PYTHON" = :; then
9576
  dnl Run any user-specified action, or abort.
9577
    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
9578
  else
9579
9580
  dnl Query Python for its version number.  Getting [:3] seems to be
9581
  dnl the best way to do this; it's what "site.py" does in the standard
9582
  dnl library.
9583
9584
  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
9585
    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
9586
  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
9587
9588
  dnl Use the values of $prefix and $exec_prefix for the corresponding
9589
  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
9590
  dnl distinct variables so they can be overridden if need be.  However,
9591
  dnl general consensus is that you shouldn't need this ability.
9592
9593
  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
9594
  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
9595
9596
  dnl At times (like when building shared libraries) you may want
9597
  dnl to know which OS platform Python thinks this is.
9598
9599
  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
9600
    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
9601
  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
9602
9603
9604
  dnl Set up 4 directories:
9605
9606
  dnl pythondir -- where to install python scripts.  This is the
9607
  dnl   site-packages directory, not the python standard library
9608
  dnl   directory like in previous automake betas.  This behavior
9609
  dnl   is more consistent with lispdir.m4 for example.
9610
  dnl Query distutils for this directory.  distutils does not exist in
9611
  dnl Python 1.5, so we fall back to the hardcoded directory if it
9612
  dnl doesn't work.
9613
  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
9614
    [am_cv_python_pythondir],
9615
    [if test "x$prefix" = xNONE
9616
     then
9617
       am_py_prefix=$ac_default_prefix
9618
     else
9619
       am_py_prefix=$prefix
9620
     fi
9621
     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
9622
     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
9623
     case $am_cv_python_pythondir in
9624
     $am_py_prefix*)
9625
       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
9626
       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
9627
       ;;
37.1.5 by Ken VanDine
Import upstream version 0.2.100
9628
     *)
9629
       case $am_py_prefix in
9630
         /usr|/System*) ;;
9631
         *)
9632
	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
9633
	  ;;
9634
       esac
9635
       ;;
37 by Ken VanDine
Import upstream version 0.2.1
9636
     esac
9637
    ])
9638
  AC_SUBST([pythondir], [$am_cv_python_pythondir])
9639
9640
  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
9641
  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
9642
  dnl   more consistent with the rest of automake.
9643
9644
  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
9645
9646
  dnl pyexecdir -- directory for installing python extension modules
9647
  dnl   (shared libraries)
9648
  dnl Query distutils for this directory.  distutils does not exist in
9649
  dnl Python 1.5, so we fall back to the hardcoded directory if it
9650
  dnl doesn't work.
9651
  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
9652
    [am_cv_python_pyexecdir],
9653
    [if test "x$exec_prefix" = xNONE
9654
     then
9655
       am_py_exec_prefix=$am_py_prefix
9656
     else
9657
       am_py_exec_prefix=$exec_prefix
9658
     fi
9659
     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
9660
     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
9661
     case $am_cv_python_pyexecdir in
9662
     $am_py_exec_prefix*)
9663
       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
9664
       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
9665
       ;;
37.1.5 by Ken VanDine
Import upstream version 0.2.100
9666
     *)
9667
       case $am_py_exec_prefix in
9668
         /usr|/System*) ;;
9669
         *)
9670
	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
9671
	   ;;
9672
       esac
9673
       ;;
37 by Ken VanDine
Import upstream version 0.2.1
9674
     esac
9675
    ])
9676
  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
9677
9678
  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
9679
9680
  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
9681
9682
  dnl Run any user-specified action.
9683
  $2
9684
  fi
9685
9686
])
9687
9688
9689
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
9690
# ---------------------------------------------------------------------------
9691
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
9692
# Run ACTION-IF-FALSE otherwise.
9693
# This test uses sys.hexversion instead of the string equivalent (first
9694
# word of sys.version), in order to cope with versions such as 2.2c1.
9695
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
9696
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
9697
 [prog="import sys
9698
# split strings by '.' and convert to numeric.  Append some zeros
9699
# because we need at least 4 digits for the hex conversion.
9700
# map returns an iterator in Python 3.0 and a list in 2.x
9701
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
9702
minverhex = 0
9703
# xrange is not present in Python 3.0 and range returns an iterator
9704
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
9705
sys.exit(sys.hexversion < minverhex)"
9706
  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
9707
9708
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9709
#
9710
# This file is free software; the Free Software Foundation
9711
# gives unlimited permission to copy and/or distribute it,
9712
# with or without modifications, as long as this notice is preserved.
9713
9714
# AM_RUN_LOG(COMMAND)
9715
# -------------------
9716
# Run COMMAND, save the exit status in ac_status, and log it.
9717
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
9718
AC_DEFUN([AM_RUN_LOG],
9719
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
9720
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
9721
   ac_status=$?
9722
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
9723
   (exit $ac_status); }])
9724
9725
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9726
9727
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9728
# Free Software Foundation, Inc.
9729
#
9730
# This file is free software; the Free Software Foundation
9731
# gives unlimited permission to copy and/or distribute it,
9732
# with or without modifications, as long as this notice is preserved.
9733
9734
# serial 5
9735
9736
# AM_SANITY_CHECK
9737
# ---------------
9738
AC_DEFUN([AM_SANITY_CHECK],
9739
[AC_MSG_CHECKING([whether build environment is sane])
9740
# Just in case
9741
sleep 1
9742
echo timestamp > conftest.file
9743
# Reject unsafe characters in $srcdir or the absolute working directory
9744
# name.  Accept space and tab only in the latter.
9745
am_lf='
9746
'
9747
case `pwd` in
9748
  *[[\\\"\#\$\&\'\`$am_lf]]*)
9749
    AC_MSG_ERROR([unsafe absolute working directory name]);;
9750
esac
9751
case $srcdir in
9752
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9753
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9754
esac
9755
9756
# Do `set' in a subshell so we don't clobber the current shell's
9757
# arguments.  Must try -L first in case configure is actually a
9758
# symlink; some systems play weird games with the mod time of symlinks
9759
# (eg FreeBSD returns the mod time of the symlink's containing
9760
# directory).
9761
if (
9762
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9763
   if test "$[*]" = "X"; then
9764
      # -L didn't work.
9765
      set X `ls -t "$srcdir/configure" conftest.file`
9766
   fi
9767
   rm -f conftest.file
9768
   if test "$[*]" != "X $srcdir/configure conftest.file" \
9769
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9770
9771
      # If neither matched, then we have a broken ls.  This can happen
9772
      # if, for instance, CONFIG_SHELL is bash and it inherits a
9773
      # broken ls alias from the environment.  This has actually
9774
      # happened.  Such a system could not be considered "sane".
9775
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9776
alias in your environment])
9777
   fi
9778
9779
   test "$[2]" = conftest.file
9780
   )
9781
then
9782
   # Ok.
9783
   :
9784
else
9785
   AC_MSG_ERROR([newly created file is older than distributed files!
9786
Check your system clock])
9787
fi
9788
AC_MSG_RESULT(yes)])
9789
37.1.17 by Rodney Dawes
Import upstream version 0.3.9
9790
# Copyright (C) 2009  Free Software Foundation, Inc.
9791
#
9792
# This file is free software; the Free Software Foundation
9793
# gives unlimited permission to copy and/or distribute it,
9794
# with or without modifications, as long as this notice is preserved.
9795
9796
# serial 1
9797
9798
# AM_SILENT_RULES([DEFAULT])
9799
# --------------------------
9800
# Enable less verbose build rules; with the default set to DEFAULT
9801
# (`yes' being less verbose, `no' or empty being verbose).
9802
AC_DEFUN([AM_SILENT_RULES],
9803
[AC_ARG_ENABLE([silent-rules],
9804
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
9805
  --disable-silent-rules         verbose build output (undo: `make V=0')])
9806
case $enable_silent_rules in
9807
yes) AM_DEFAULT_VERBOSITY=0;;
9808
no)  AM_DEFAULT_VERBOSITY=1;;
9809
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9810
esac
9811
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9812
AM_BACKSLASH='\'
9813
AC_SUBST([AM_BACKSLASH])dnl
9814
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9815
])
9816
37 by Ken VanDine
Import upstream version 0.2.1
9817
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9818
#
9819
# This file is free software; the Free Software Foundation
9820
# gives unlimited permission to copy and/or distribute it,
9821
# with or without modifications, as long as this notice is preserved.
9822
9823
# AM_PROG_INSTALL_STRIP
9824
# ---------------------
9825
# One issue with vendor `install' (even GNU) is that you can't
9826
# specify the program used to strip binaries.  This is especially
9827
# annoying in cross-compiling environments, where the build's strip
9828
# is unlikely to handle the host's binaries.
9829
# Fortunately install-sh will honor a STRIPPROG variable, so we
9830
# always use install-sh in `make install-strip', and initialize
9831
# STRIPPROG with the value of the STRIP variable (set by the user).
9832
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9833
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9834
# Installed binaries are usually stripped using `strip' when the user
9835
# run `make install-strip'.  However `strip' might not be the right
9836
# tool to use in cross-compilation environments, therefore Automake
9837
# will honor the `STRIP' environment variable to overrule this program.
9838
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9839
if test "$cross_compiling" != no; then
9840
  AC_CHECK_TOOL([STRIP], [strip], :)
9841
fi
9842
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9843
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9844
9845
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9846
#
9847
# This file is free software; the Free Software Foundation
9848
# gives unlimited permission to copy and/or distribute it,
9849
# with or without modifications, as long as this notice is preserved.
9850
9851
# serial 2
9852
9853
# _AM_SUBST_NOTMAKE(VARIABLE)
9854
# ---------------------------
9855
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9856
# This macro is traced by Automake.
9857
AC_DEFUN([_AM_SUBST_NOTMAKE])
9858
9859
# AM_SUBST_NOTMAKE(VARIABLE)
9860
# ---------------------------
9861
# Public sister of _AM_SUBST_NOTMAKE.
9862
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9863
9864
# Check how to create a tarball.                            -*- Autoconf -*-
9865
9866
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9867
#
9868
# This file is free software; the Free Software Foundation
9869
# gives unlimited permission to copy and/or distribute it,
9870
# with or without modifications, as long as this notice is preserved.
9871
9872
# serial 2
9873
9874
# _AM_PROG_TAR(FORMAT)
9875
# --------------------
9876
# Check how to create a tarball in format FORMAT.
9877
# FORMAT should be one of `v7', `ustar', or `pax'.
9878
#
9879
# Substitute a variable $(am__tar) that is a command
9880
# writing to stdout a FORMAT-tarball containing the directory
9881
# $tardir.
9882
#     tardir=directory && $(am__tar) > result.tar
9883
#
9884
# Substitute a variable $(am__untar) that extract such
9885
# a tarball read from stdin.
9886
#     $(am__untar) < result.tar
9887
AC_DEFUN([_AM_PROG_TAR],
9888
[# Always define AMTAR for backward compatibility.
9889
AM_MISSING_PROG([AMTAR], [tar])
9890
m4_if([$1], [v7],
9891
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9892
     [m4_case([$1], [ustar],, [pax],,
9893
              [m4_fatal([Unknown tar format])])
9894
AC_MSG_CHECKING([how to create a $1 tar archive])
9895
# Loop over all known methods to create a tar archive until one works.
9896
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9897
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9898
# Do not fold the above two line into one, because Tru64 sh and
9899
# Solaris sh will not grok spaces in the rhs of `-'.
9900
for _am_tool in $_am_tools
9901
do
9902
  case $_am_tool in
9903
  gnutar)
9904
    for _am_tar in tar gnutar gtar;
9905
    do
9906
      AM_RUN_LOG([$_am_tar --version]) && break
9907
    done
9908
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9909
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9910
    am__untar="$_am_tar -xf -"
9911
    ;;
9912
  plaintar)
9913
    # Must skip GNU tar: if it does not support --format= it doesn't create
9914
    # ustar tarball either.
9915
    (tar --version) >/dev/null 2>&1 && continue
9916
    am__tar='tar chf - "$$tardir"'
9917
    am__tar_='tar chf - "$tardir"'
9918
    am__untar='tar xf -'
9919
    ;;
9920
  pax)
9921
    am__tar='pax -L -x $1 -w "$$tardir"'
9922
    am__tar_='pax -L -x $1 -w "$tardir"'
9923
    am__untar='pax -r'
9924
    ;;
9925
  cpio)
9926
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9927
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9928
    am__untar='cpio -i -H $1 -d'
9929
    ;;
9930
  none)
9931
    am__tar=false
9932
    am__tar_=false
9933
    am__untar=false
9934
    ;;
9935
  esac
9936
9937
  # If the value was cached, stop now.  We just wanted to have am__tar
9938
  # and am__untar set.
9939
  test -n "${am_cv_prog_tar_$1}" && break
9940
9941
  # tar/untar a dummy directory, and stop if the command works
9942
  rm -rf conftest.dir
9943
  mkdir conftest.dir
9944
  echo GrepMe > conftest.dir/file
9945
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9946
  rm -rf conftest.dir
9947
  if test -s conftest.tar; then
9948
    AM_RUN_LOG([$am__untar <conftest.tar])
9949
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9950
  fi
9951
done
9952
rm -rf conftest.dir
9953
9954
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9955
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9956
AC_SUBST([am__tar])
9957
AC_SUBST([am__untar])
9958
]) # _AM_PROG_TAR
9959
37.1.23 by Rodney Dawes
Import upstream version 0.10.0
9960
9961
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
9962
# serial 40 IT_PROG_INTLTOOL
9963
AC_DEFUN([IT_PROG_INTLTOOL], [
9964
AC_PREREQ([2.50])dnl
9965
AC_REQUIRE([AM_NLS])dnl
9966
9967
case "$am__api_version" in
9968
    1.[01234])
9969
	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
9970
    ;;
9971
    *)
9972
    ;;
9973
esac
9974
9975
if test -n "$1"; then
9976
    AC_MSG_CHECKING([for intltool >= $1])
9977
9978
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
9979
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
9980
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
9981
    ]
9982
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
9983
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
9984
	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
9985
fi
9986
9987
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
9988
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
9989
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
9990
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
9991
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
9992
fi
9993
9994
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
9995
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
9996
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
9997
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
9998
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
9999
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10000
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10001
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10002
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10003
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10004
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10005
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
10006
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10007
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10008
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10009
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10010
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
10011
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10012
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10013
10014
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
10015
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
10016
_IT_SUBST(INTLTOOL_KEYS_RULE)
10017
_IT_SUBST(INTLTOOL_PROP_RULE)
10018
_IT_SUBST(INTLTOOL_OAF_RULE)
10019
_IT_SUBST(INTLTOOL_PONG_RULE)
10020
_IT_SUBST(INTLTOOL_SERVER_RULE)
10021
_IT_SUBST(INTLTOOL_SHEET_RULE)
10022
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
10023
_IT_SUBST(INTLTOOL_UI_RULE)
10024
_IT_SUBST(INTLTOOL_XAM_RULE)
10025
_IT_SUBST(INTLTOOL_KBD_RULE)
10026
_IT_SUBST(INTLTOOL_XML_RULE)
10027
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
10028
_IT_SUBST(INTLTOOL_CAVES_RULE)
10029
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
10030
_IT_SUBST(INTLTOOL_THEME_RULE)
10031
_IT_SUBST(INTLTOOL_SERVICE_RULE)
10032
_IT_SUBST(INTLTOOL_POLICY_RULE)
10033
10034
# Check the gettext tools to make sure they are GNU
10035
AC_PATH_PROG(XGETTEXT, xgettext)
10036
AC_PATH_PROG(MSGMERGE, msgmerge)
10037
AC_PATH_PROG(MSGFMT, msgfmt)
10038
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
10039
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
10040
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10041
fi
10042
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
10043
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
10044
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
10045
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
10046
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10047
fi
10048
10049
AC_PATH_PROG(INTLTOOL_PERL, perl)
10050
if test -z "$INTLTOOL_PERL"; then
10051
   AC_MSG_ERROR([perl not found])
10052
fi
10053
AC_MSG_CHECKING([for perl >= 5.8.1])
10054
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
10055
if test $? -ne 0; then
10056
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
10057
else
10058
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
10059
   AC_MSG_RESULT([$IT_PERL_VERSION])
10060
fi
10061
if test "x$2" != "xno-xml"; then
10062
   AC_MSG_CHECKING([for XML::Parser])
10063
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
10064
       AC_MSG_RESULT([ok])
10065
   else
10066
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
10067
   fi
10068
fi
10069
10070
# Substitute ALL_LINGUAS so we can use it in po/Makefile
10071
AC_SUBST(ALL_LINGUAS)
10072
10073
# Set DATADIRNAME correctly if it is not set yet
10074
# (copied from glib-gettext.m4)
10075
if test -z "$DATADIRNAME"; then
10076
  AC_LINK_IFELSE(
10077
    [AC_LANG_PROGRAM([[]],
10078
                     [[extern int _nl_msg_cat_cntr;
10079
                       return _nl_msg_cat_cntr]])],
10080
    [DATADIRNAME=share],
10081
    [case $host in
10082
    *-*-solaris*)
10083
    dnl On Solaris, if bind_textdomain_codeset is in libc,
10084
    dnl GNU format message catalog is always supported,
10085
    dnl since both are added to the libc all together.
10086
    dnl Hence, we'd like to go with DATADIRNAME=share
10087
    dnl in this case.
10088
    AC_CHECK_FUNC(bind_textdomain_codeset,
10089
      [DATADIRNAME=share], [DATADIRNAME=lib])
10090
    ;;
10091
    *)
10092
    [DATADIRNAME=lib]
10093
    ;;
10094
    esac])
10095
fi
10096
AC_SUBST(DATADIRNAME)
10097
10098
IT_PO_SUBDIR([po])
10099
10100
])
10101
10102
10103
# IT_PO_SUBDIR(DIRNAME)
10104
# ---------------------
10105
# All po subdirs have to be declared with this macro; the subdir "po" is
10106
# declared by IT_PROG_INTLTOOL.
10107
#
10108
AC_DEFUN([IT_PO_SUBDIR],
10109
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
10110
dnl
10111
dnl The following CONFIG_COMMANDS should be exetuted at the very end
10112
dnl of config.status.
10113
AC_CONFIG_COMMANDS_PRE([
10114
  AC_CONFIG_COMMANDS([$1/stamp-it], [
10115
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
10116
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
10117
    fi
10118
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
10119
    >"$1/stamp-it.tmp"
10120
    [sed '/^#/d
10121
	 s/^[[].*] *//
10122
	 /^[ 	]*$/d
10123
	'"s|^|	$ac_top_srcdir/|" \
10124
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
10125
    ]
10126
    [sed '/^POTFILES =/,/[^\\]$/ {
10127
		/^POTFILES =/!d
10128
		r $1/POTFILES
10129
	  }
10130
	 ' "$1/Makefile.in" >"$1/Makefile"]
10131
    rm -f "$1/Makefile.tmp"
10132
    mv "$1/stamp-it.tmp" "$1/stamp-it"
10133
  ])
10134
])dnl
10135
])
10136
10137
# _IT_SUBST(VARIABLE)
10138
# -------------------
10139
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
10140
#
10141
AC_DEFUN([_IT_SUBST],
10142
[
10143
AC_SUBST([$1])
10144
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
10145
]
10146
)
10147
10148
# deprecated macros
10149
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
10150
# A hint is needed for aclocal from Automake <= 1.9.4:
10151
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
10152
10153