source: trunk/third/ggv/aclocal.m4 @ 18824

Revision 18824, 153.8 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18823, which included commits to RCS files with non-trunk default branches.
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4-p6
2
3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13
14# progtest.m4 from gettext 0.32
15# Search path for a program which passes the given test.
16# Ulrich Drepper <drepper@cygnus.com>, 1996.
17#
18# This file file be copied and used freely without restrictions.  It can
19# be used in projects which are not available under the GNU Public License
20# but which still want to provide support for the GNU gettext functionality.
21# Please note that the actual code is *not* freely available.
22
23# serial 1
24
25dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
26dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
27AC_DEFUN(AM_PATH_PROG_WITH_TEST,
28[# Extract the first word of "$2", so it can be a program name with args.
29set dummy $2; ac_word=[$]2
30AC_MSG_CHECKING([for $ac_word])
31AC_CACHE_VAL(ac_cv_path_$1,
32[case "[$]$1" in
33  /*)
34  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
35  ;;
36  *)
37  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
38  for ac_dir in ifelse([$5], , $PATH, [$5]); do
39    test -z "$ac_dir" && ac_dir=.
40    if test -f $ac_dir/$ac_word; then
41      if [$3]; then
42        ac_cv_path_$1="$ac_dir/$ac_word"
43        break
44      fi
45    fi
46  done
47  IFS="$ac_save_ifs"
48dnl If no 4th arg is given, leave the cache variable unset,
49dnl so AC_PATH_PROGS will keep looking.
50ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
51])dnl
52  ;;
53esac])dnl
54$1="$ac_cv_path_$1"
55if test -n "[$]$1"; then
56  AC_MSG_RESULT([$]$1)
57else
58  AC_MSG_RESULT(no)
59fi
60AC_SUBST($1)dnl
61])
62
63
64# lcmessage.m4 from gettext 0.32
65# Check whether LC_MESSAGES is available in <locale.h>.
66# Ulrich Drepper <drepper@cygnus.com>, 1995.
67#
68# This file file be copied and used freely without restrictions.  It can
69# be used in projects which are not available under the GNU Public License
70# but which still want to provide support for the GNU gettext functionality.
71# Please note that the actual code is *not* freely available.
72
73# serial 1
74
75AC_DEFUN(AM_LC_MESSAGES,
76  [if test $ac_cv_header_locale_h = yes; then
77    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
78      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
79       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
80    if test $am_cv_val_LC_MESSAGES = yes; then
81      AC_DEFINE(HAVE_LC_MESSAGES)
82    fi
83  fi])
84
85
86
87# gettext.m4 from gettext 0.32
88# Macro to add for using GNU gettext.
89# Ulrich Drepper <drepper@cygnus.com>, 1995.
90#
91# This file file be copied and used freely without restrictions.  It can
92# be used in projects which are not available under the GNU Public License
93# but which still want to provide support for the GNU gettext functionality.
94# Please note that the actual code is *not* freely available.
95
96# serial 3
97
98AC_DEFUN(AM_WITH_NLS,
99  [AC_MSG_CHECKING([whether NLS is requested])
100    dnl Default is enabled NLS
101    AC_ARG_ENABLE(nls,
102      [  --disable-nls           do not use Native Language Support],
103      USE_NLS=$enableval, USE_NLS=yes)
104    AC_MSG_RESULT($USE_NLS)
105    AC_SUBST(USE_NLS)
106
107    USE_INCLUDED_LIBINTL=no
108
109    dnl If we use NLS figure out what method
110    if test "$USE_NLS" = "yes"; then
111      AC_DEFINE(ENABLE_NLS)
112      AC_MSG_CHECKING([whether included gettext is requested])
113      AC_ARG_WITH(included-gettext,
114        [  --with-included-gettext use the GNU gettext library included here],
115        nls_cv_force_use_gnu_gettext=$withval,
116        nls_cv_force_use_gnu_gettext=no)
117      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
118
119      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
120      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
121        dnl User does not insist on using GNU NLS library.  Figure out what
122        dnl to use.  If gettext or catgets are available (in this order) we
123        dnl use this.  Else we have to fall back to GNU NLS library.
124        dnl catgets is only used if permitted by option --with-catgets.
125        nls_cv_header_intl=
126        nls_cv_header_libgt=
127        CATOBJEXT=NONE
128
129        AC_CHECK_HEADER(libintl.h,
130          [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
131            [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
132               gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
133
134           if test "$gt_cv_func_gettext_libc" != "yes"; then
135             AC_CHECK_LIB(intl, bindtextdomain,
136               [AC_CACHE_CHECK([for gettext in libintl],
137                 gt_cv_func_gettext_libintl,
138                 [AC_TRY_LINK([], [return (int) gettext ("")],
139                 gt_cv_func_gettext_libintl=yes,
140                 gt_cv_func_gettext_libintl=no)])])
141           fi
142
143           if test "$gt_cv_func_gettext_libc" = "yes" \
144              || test "$gt_cv_func_gettext_libintl" = "yes"; then
145              AC_DEFINE(HAVE_GETTEXT)
146              AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
147                [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
148              if test "$MSGFMT" != "no"; then
149                AC_CHECK_FUNCS(dcgettext)
150                AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
151                AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
152                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
153                AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
154                               return _nl_msg_cat_cntr],
155                  [CATOBJEXT=.gmo
156                   DATADIRNAME=share],
157                  [CATOBJEXT=.mo
158                   DATADIRNAME=lib])
159                INSTOBJEXT=.mo
160              fi
161            fi
162        ])
163
164        if test "$CATOBJEXT" = "NONE"; then
165          AC_MSG_CHECKING([whether catgets can be used])
166          AC_ARG_WITH(catgets,
167            [  --with-catgets          use catgets functions if available],
168            nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
169          AC_MSG_RESULT($nls_cv_use_catgets)
170
171          if test "$nls_cv_use_catgets" = "yes"; then
172            dnl No gettext in C library.  Try catgets next.
173            AC_CHECK_LIB(i, main)
174            AC_CHECK_FUNC(catgets,
175              [AC_DEFINE(HAVE_CATGETS)
176               INTLOBJS="\$(CATOBJS)"
177               AC_PATH_PROG(GENCAT, gencat, no)dnl
178               if test "$GENCAT" != "no"; then
179                 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
180                 if test "$GMSGFMT" = "no"; then
181                   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
182                    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
183                 fi
184                 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
185                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
186                 USE_INCLUDED_LIBINTL=yes
187                 CATOBJEXT=.cat
188                 INSTOBJEXT=.cat
189                 DATADIRNAME=lib
190                 INTLDEPS='$(top_builddir)/intl/libintl.a'
191                 INTLLIBS=$INTLDEPS
192                 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
193                 nls_cv_header_intl=intl/libintl.h
194                 nls_cv_header_libgt=intl/libgettext.h
195               fi])
196          fi
197        fi
198
199        if test "$CATOBJEXT" = "NONE"; then
200          dnl Neither gettext nor catgets in included in the C library.
201          dnl Fall back on GNU gettext library.
202          nls_cv_use_gnu_gettext=yes
203        fi
204      fi
205
206      if test "$nls_cv_use_gnu_gettext" = "yes"; then
207        dnl Mark actions used to generate GNU NLS library.
208        INTLOBJS="\$(GETTOBJS)"
209        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
210          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
211        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
212        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
213          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
214        AC_SUBST(MSGFMT)
215        USE_INCLUDED_LIBINTL=yes
216        CATOBJEXT=.gmo
217        INSTOBJEXT=.mo
218        DATADIRNAME=share
219        INTLDEPS='$(top_builddir)/intl/libintl.a'
220        INTLLIBS=$INTLDEPS
221        LIBS=`echo $LIBS | sed -e 's/-lintl//'`
222        nls_cv_header_intl=intl/libintl.h
223        nls_cv_header_libgt=intl/libgettext.h
224      fi
225
226      dnl Test whether we really found GNU xgettext.
227      if test "$XGETTEXT" != ":"; then
228        dnl If it is no GNU xgettext we define it as : so that the
229        dnl Makefiles still can work.
230        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
231          : ;
232        else
233          AC_MSG_RESULT(
234            [found xgettext programs is not GNU xgettext; ignore it])
235          XGETTEXT=":"
236        fi
237      fi
238
239      # We need to process the po/ directory.
240      POSUB=po
241    else
242      DATADIRNAME=share
243      nls_cv_header_intl=intl/libintl.h
244      nls_cv_header_libgt=intl/libgettext.h
245    fi
246
247    # If this is used in GNU gettext we have to set USE_NLS to `yes'
248    # because some of the sources are only built for this goal.
249    if test "$PACKAGE" = gettext; then
250      USE_NLS=yes
251      USE_INCLUDED_LIBINTL=yes
252    fi
253
254    dnl These rules are solely for the distribution goal.  While doing this
255    dnl we only have to keep exactly one list of the available catalogs
256    dnl in configure.in.
257    for lang in $ALL_LINGUAS; do
258      GMOFILES="$GMOFILES $lang.gmo"
259      POFILES="$POFILES $lang.po"
260    done
261
262    dnl Make all variables we use known to autoconf.
263    AC_SUBST(USE_INCLUDED_LIBINTL)
264    AC_SUBST(CATALOGS)
265    AC_SUBST(CATOBJEXT)
266    AC_SUBST(DATADIRNAME)
267    AC_SUBST(GMOFILES)
268    AC_SUBST(INSTOBJEXT)
269    AC_SUBST(INTLDEPS)
270    AC_SUBST(INTLLIBS)
271    AC_SUBST(INTLOBJS)
272    AC_SUBST(POFILES)
273    AC_SUBST(POSUB)
274  ])
275
276AC_DEFUN(AM_GNU_GETTEXT,
277  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
278   AC_REQUIRE([AC_PROG_CC])dnl
279   AC_REQUIRE([AC_PROG_RANLIB])dnl
280   AC_REQUIRE([AC_ISC_POSIX])dnl
281   AC_REQUIRE([AC_HEADER_STDC])dnl
282   AC_REQUIRE([AC_C_CONST])dnl
283   AC_REQUIRE([AC_C_INLINE])dnl
284   AC_REQUIRE([AC_TYPE_OFF_T])dnl
285   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
286   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
287   AC_REQUIRE([AC_FUNC_MMAP])dnl
288
289   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
290unistd.h values.h sys/param.h])
291   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
292__argz_count __argz_stringify __argz_next])
293
294   if test "${ac_cv_func_stpcpy+set}" != "set"; then
295     AC_CHECK_FUNCS(stpcpy)
296   fi
297   if test "${ac_cv_func_stpcpy}" = "yes"; then
298     AC_DEFINE(HAVE_STPCPY)
299   fi
300
301   AM_LC_MESSAGES
302   AM_WITH_NLS
303
304   if test "x$CATOBJEXT" != "x"; then
305     if test "x$ALL_LINGUAS" = "x"; then
306       LINGUAS=
307     else
308       AC_MSG_CHECKING(for catalogs to be installed)
309       NEW_LINGUAS=
310       for lang in ${LINGUAS=$ALL_LINGUAS}; do
311         case "$ALL_LINGUAS" in
312          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
313         esac
314       done
315       LINGUAS=$NEW_LINGUAS
316       AC_MSG_RESULT($LINGUAS)
317     fi
318
319     dnl Construct list of names of catalog files to be constructed.
320     if test -n "$LINGUAS"; then
321       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
322     fi
323   fi
324
325   dnl The reference to <locale.h> in the installed <libintl.h> file
326   dnl must be resolved because we cannot expect the users of this
327   dnl to define HAVE_LOCALE_H.
328   if test $ac_cv_header_locale_h = yes; then
329     INCLUDE_LOCALE_H="#include <locale.h>"
330   else
331     INCLUDE_LOCALE_H="\
332/* The system does not provide the header <locale.h>.  Take care yourself.  */"
333   fi
334   AC_SUBST(INCLUDE_LOCALE_H)
335
336   dnl Determine which catalog format we have (if any is needed)
337   dnl For now we know about two different formats:
338   dnl   Linux libc-5 and the normal X/Open format
339   test -d intl || mkdir intl
340   if test "$CATOBJEXT" = ".cat"; then
341     AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
342
343     dnl Transform the SED scripts while copying because some dumb SEDs
344     dnl cannot handle comments.
345     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
346   fi
347   dnl po2tbl.sed is always needed.
348   sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
349     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
350
351   dnl In the intl/Makefile.in we have a special dependency which makes
352   dnl only sense for gettext.  We comment this out for non-gettext
353   dnl packages.
354   if test "$PACKAGE" = "gettext"; then
355     GT_NO="#NO#"
356     GT_YES=
357   else
358     GT_NO=
359     GT_YES="#YES#"
360   fi
361   AC_SUBST(GT_NO)
362   AC_SUBST(GT_YES)
363
364   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
365   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
366   dnl Try to locate is.
367   MKINSTALLDIRS=
368   if test -n "$ac_aux_dir"; then
369     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
370   fi
371   if test -z "$MKINSTALLDIRS"; then
372     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
373   fi
374   AC_SUBST(MKINSTALLDIRS)
375
376   dnl *** For now the libtool support in intl/Makefile is not for real.
377   l=
378   AC_SUBST(l)
379
380   dnl Generate list of files to be processed by xgettext which will
381   dnl be included in po/Makefile.
382   test -d po || mkdir po
383   if test "x$srcdir" != "x."; then
384     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
385       posrcprefix="$srcdir/"
386     else
387       posrcprefix="../$srcdir/"
388     fi
389   else
390     posrcprefix="../"
391   fi
392   rm -f po/POTFILES
393   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
394        < $srcdir/po/POTFILES.in > po/POTFILES
395  ])
396
397#serial 1
398# This test replaces the one in autoconf.
399# Currently this macro should have the same name as the autoconf macro
400# because gettext's gettext.m4 (distributed in the automake package)
401# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
402# give these diagnostics:
403#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
404#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
405
406undefine([AC_ISC_POSIX])
407
408AC_DEFUN([AC_ISC_POSIX],
409  [
410    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
411    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
412  ]
413)
414
415# Do all the work for Automake.  This macro actually does too much --
416# some checks are only needed if your package does certain things.
417# But this isn't really a big deal.
418
419# serial 1
420
421dnl Usage:
422dnl AM_INIT_AUTOMAKE(package,version, [no-define])
423
424AC_DEFUN([AM_INIT_AUTOMAKE],
425[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
426AC_REQUIRE([AC_PROG_INSTALL])
427PACKAGE=[$1]
428AC_SUBST(PACKAGE)
429VERSION=[$2]
430AC_SUBST(VERSION)
431dnl test to see if srcdir already configured
432if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
433  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
434fi
435ifelse([$3],,
436AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
437AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
438AC_REQUIRE([AM_SANITY_CHECK])
439AC_REQUIRE([AC_ARG_PROGRAM])
440dnl FIXME This is truly gross.
441missing_dir=`cd $ac_aux_dir && pwd`
442AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
443AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
444AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
445AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
446AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
447AC_REQUIRE([AC_PROG_MAKE_SET])])
448
449# Copyright 2002  Free Software Foundation, Inc.
450
451# This program is free software; you can redistribute it and/or modify
452# it under the terms of the GNU General Public License as published by
453# the Free Software Foundation; either version 2, or (at your option)
454# any later version.
455
456# This program is distributed in the hope that it will be useful,
457# but WITHOUT ANY WARRANTY; without even the implied warranty of
458# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
459# GNU General Public License for more details.
460
461# You should have received a copy of the GNU General Public License
462# along with this program; if not, write to the Free Software
463# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
464
465# AM_AUTOMAKE_VERSION(VERSION)
466# ----------------------------
467# Automake X.Y traces this macro to ensure aclocal.m4 has been
468# generated from the m4 files accompanying Automake X.Y.
469AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
470
471# AM_SET_CURRENT_AUTOMAKE_VERSION
472# -------------------------------
473# Call AM_AUTOMAKE_VERSION so it can be traced.
474# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
475AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
476         [AM_AUTOMAKE_VERSION([1.4-p6])])
477
478#
479# Check to make sure that the build environment is sane.
480#
481
482AC_DEFUN([AM_SANITY_CHECK],
483[AC_MSG_CHECKING([whether build environment is sane])
484# Just in case
485sleep 1
486echo timestamp > conftestfile
487# Do `set' in a subshell so we don't clobber the current shell's
488# arguments.  Must try -L first in case configure is actually a
489# symlink; some systems play weird games with the mod time of symlinks
490# (eg FreeBSD returns the mod time of the symlink's containing
491# directory).
492if (
493   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
494   if test "[$]*" = "X"; then
495      # -L didn't work.
496      set X `ls -t $srcdir/configure conftestfile`
497   fi
498   if test "[$]*" != "X $srcdir/configure conftestfile" \
499      && test "[$]*" != "X conftestfile $srcdir/configure"; then
500
501      # If neither matched, then we have a broken ls.  This can happen
502      # if, for instance, CONFIG_SHELL is bash and it inherits a
503      # broken ls alias from the environment.  This has actually
504      # happened.  Such a system could not be considered "sane".
505      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
506alias in your environment])
507   fi
508
509   test "[$]2" = conftestfile
510   )
511then
512   # Ok.
513   :
514else
515   AC_MSG_ERROR([newly created file is older than distributed files!
516Check your system clock])
517fi
518rm -f conftest*
519AC_MSG_RESULT(yes)])
520
521dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
522dnl The program must properly implement --version.
523AC_DEFUN([AM_MISSING_PROG],
524[AC_MSG_CHECKING(for working $2)
525# Run test in a subshell; some versions of sh will print an error if
526# an executable is not found, even if stderr is redirected.
527# Redirect stdin to placate older versions of autoconf.  Sigh.
528if ($2 --version) < /dev/null > /dev/null 2>&1; then
529   $1=$2
530   AC_MSG_RESULT(found)
531else
532   $1="$3/missing $2"
533   AC_MSG_RESULT(missing)
534fi
535AC_SUBST($1)])
536
537# Like AC_CONFIG_HEADER, but automatically create stamp file.
538
539AC_DEFUN([AM_CONFIG_HEADER],
540[AC_PREREQ([2.12])
541AC_CONFIG_HEADER([$1])
542dnl When config.status generates a header, we must update the stamp-h file.
543dnl This file resides in the same directory as the config header
544dnl that is generated.  We must strip everything past the first ":",
545dnl and everything past the last "/".
546AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
547ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
548<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
549<<am_indx=1
550for am_file in <<$1>>; do
551  case " <<$>>CONFIG_HEADERS " in
552  *" <<$>>am_file "*<<)>>
553    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
554    ;;
555  esac
556  am_indx=`expr "<<$>>am_indx" + 1`
557done<<>>dnl>>)
558changequote([,]))])
559
560# Add --enable-maintainer-mode option to configure.
561# From Jim Meyering
562
563# serial 1
564
565AC_DEFUN([AM_MAINTAINER_MODE],
566[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
567  dnl maintainer-mode is disabled by default
568  AC_ARG_ENABLE(maintainer-mode,
569[  --enable-maintainer-mode enable make rules and dependencies not useful
570                          (and sometimes confusing) to the casual installer],
571      USE_MAINTAINER_MODE=$enableval,
572      USE_MAINTAINER_MODE=no)
573  AC_MSG_RESULT($USE_MAINTAINER_MODE)
574  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
575  MAINT=$MAINTAINER_MODE_TRUE
576  AC_SUBST(MAINT)dnl
577]
578)
579
580# Define a conditional.
581
582AC_DEFUN([AM_CONDITIONAL],
583[AC_SUBST($1_TRUE)
584AC_SUBST($1_FALSE)
585if $2; then
586  $1_TRUE=
587  $1_FALSE='#'
588else
589  $1_TRUE='#'
590  $1_FALSE=
591fi])
592
593
594dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
595# serial 1 AC_PROG_INTLTOOL
596AC_DEFUN(AC_PROG_INTLTOOL,
597[
598
599if test -n "$1"; then
600    AC_MSG_CHECKING(for intltool >= $1)
601
602    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
603    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${srcdir}/intltool-update.in`
604    changequote({{,}})
605    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in`
606    changequote([,])
607
608    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
609        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
610    else
611        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
612        exit 1
613    fi
614fi
615
616  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
617INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
618     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
619     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
620      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
621     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
622   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
623    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
624INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
625       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
626      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
627    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
628  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache'
629    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
630
631AC_SUBST(INTLTOOL_DESKTOP_RULE)
632AC_SUBST(INTLTOOL_DIRECTORY_RULE)
633AC_SUBST(INTLTOOL_KEYS_RULE)
634AC_SUBST(INTLTOOL_PROP_RULE)
635AC_SUBST(INTLTOOL_OAF_RULE)
636AC_SUBST(INTLTOOL_PONG_RULE)
637AC_SUBST(INTLTOOL_SERVER_RULE)
638AC_SUBST(INTLTOOL_SHEET_RULE)
639AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
640AC_SUBST(INTLTOOL_UI_RULE)
641AC_SUBST(INTLTOOL_XML_RULE)
642AC_SUBST(INTLTOOL_CAVES_RULE)
643AC_SUBST(INTLTOOL_SCHEMAS_RULE)
644AC_SUBST(INTLTOOL_THEME_RULE)
645
646# Use the tools built into the package, not the ones that are installed.
647
648INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
649INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
650INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
651
652AC_SUBST(INTLTOOL_EXTRACT)
653AC_SUBST(INTLTOOL_MERGE)
654AC_SUBST(INTLTOOL_UPDATE)
655
656AC_PATH_PROG(INTLTOOL_PERL, perl)
657if test -z "$INTLTOOL_PERL"; then
658   AC_MSG_ERROR([perl not found; required for intltool])
659fi
660if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
661   AC_MSG_ERROR([perl 5.x required for intltool])
662fi
663
664# Remove file type tags (using []) from po/POTFILES.
665
666ifdef([AC_DIVERSION_ICMDS],[
667  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
668      changequote(,)
669      mv -f po/POTFILES po/POTFILES.tmp
670      sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
671      rm -f po/POTFILES.tmp
672      changequote([,])
673  AC_DIVERT_POP()
674],[
675  ifdef([AC_CONFIG_COMMANDS_PRE],[
676    AC_CONFIG_COMMANDS_PRE([
677        changequote(,)
678        mv -f po/POTFILES po/POTFILES.tmp
679        sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
680        rm -f po/POTFILES.tmp
681        changequote([,])
682    ])
683  ])
684])
685
686# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
687
688AC_OUTPUT_COMMANDS([
689
690sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
691if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
692  rm -f intltool-extract.out
693else
694  mv -f intltool-extract.out intltool-extract
695fi
696chmod ugo+x intltool-extract
697chmod u+w intltool-extract
698
699sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
700if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
701  rm -f intltool-merge.out
702else
703  mv -f intltool-merge.out intltool-merge
704fi
705chmod ugo+x intltool-merge
706chmod u+w intltool-merge
707
708sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
709if cmp -s intltool-update intltool-update.out 2>/dev/null; then
710  rm -f intltool-update.out
711else
712  mv -f intltool-update.out intltool-update
713fi
714chmod ugo+x intltool-update
715chmod u+w intltool-update
716
717], INTLTOOL_PERL=${INTLTOOL_PERL})
718
719])
720
721# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
722
723# serial 46 AC_PROG_LIBTOOL
724
725AC_DEFUN([AC_PROG_LIBTOOL],
726[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
727
728# This can be used to rebuild libtool when needed
729LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
730
731# Always use our own libtool.
732LIBTOOL='$(SHELL) $(top_builddir)/libtool'
733AC_SUBST(LIBTOOL)dnl
734
735# Prevent multiple expansion
736define([AC_PROG_LIBTOOL], [])
737])
738
739AC_DEFUN([AC_LIBTOOL_SETUP],
740[AC_PREREQ(2.13)dnl
741AC_REQUIRE([AC_ENABLE_SHARED])dnl
742AC_REQUIRE([AC_ENABLE_STATIC])dnl
743AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
744AC_REQUIRE([AC_CANONICAL_HOST])dnl
745AC_REQUIRE([AC_CANONICAL_BUILD])dnl
746AC_REQUIRE([AC_PROG_CC])dnl
747AC_REQUIRE([AC_PROG_LD])dnl
748AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
749AC_REQUIRE([AC_PROG_NM])dnl
750AC_REQUIRE([AC_PROG_LN_S])dnl
751AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
752AC_REQUIRE([AC_OBJEXT])dnl
753AC_REQUIRE([AC_EXEEXT])dnl
754dnl
755
756_LT_AC_PROG_ECHO_BACKSLASH
757# Only perform the check for file, if the check method requires it
758case $deplibs_check_method in
759file_magic*)
760  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
761    AC_PATH_MAGIC
762  fi
763  ;;
764esac
765
766AC_CHECK_TOOL(RANLIB, ranlib, :)
767AC_CHECK_TOOL(STRIP, strip, :)
768
769ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
770ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
771enable_win32_dll=yes, enable_win32_dll=no)
772
773AC_ARG_ENABLE(libtool-lock,
774  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
775test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
776
777# Some flags need to be propagated to the compiler or linker for good
778# libtool support.
779case $host in
780*-*-irix6*)
781  # Find out which ABI we are using.
782  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
783  if AC_TRY_EVAL(ac_compile); then
784    case `/usr/bin/file conftest.$ac_objext` in
785    *32-bit*)
786      LD="${LD-ld} -32"
787      ;;
788    *N32*)
789      LD="${LD-ld} -n32"
790      ;;
791    *64-bit*)
792      LD="${LD-ld} -64"
793      ;;
794    esac
795  fi
796  rm -rf conftest*
797  ;;
798
799*-*-sco3.2v5*)
800  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
801  SAVE_CFLAGS="$CFLAGS"
802  CFLAGS="$CFLAGS -belf"
803  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
804    [AC_LANG_SAVE
805     AC_LANG_C
806     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
807     AC_LANG_RESTORE])
808  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
809    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
810    CFLAGS="$SAVE_CFLAGS"
811  fi
812  ;;
813
814ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
815[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
816  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
817  AC_CHECK_TOOL(AS, as, false)
818  AC_CHECK_TOOL(OBJDUMP, objdump, false)
819
820  # recent cygwin and mingw systems supply a stub DllMain which the user
821  # can override, but on older systems we have to supply one
822  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
823    [AC_TRY_LINK([],
824      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
825      DllMain (0, 0, 0);],
826      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
827
828  case $host/$CC in
829  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
830    # old mingw systems require "-dll" to link a DLL, while more recent ones
831    # require "-mdll"
832    SAVE_CFLAGS="$CFLAGS"
833    CFLAGS="$CFLAGS -mdll"
834    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
835      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
836    CFLAGS="$SAVE_CFLAGS" ;;
837  *-*-cygwin* | *-*-pw32*)
838    # cygwin systems need to pass --dll to the linker, and not link
839    # crt.o which will require a WinMain@16 definition.
840    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
841  esac
842  ;;
843  ])
844esac
845
846_LT_AC_LTCONFIG_HACK
847
848])
849
850# AC_LIBTOOL_HEADER_ASSERT
851# ------------------------
852AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
853[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
854    [lt_cv_func_assert_works],
855    [case $host in
856    *-*-solaris*)
857      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
858        case `$CC --version 2>/dev/null` in
859        [[12]].*) lt_cv_func_assert_works=no ;;
860        *)        lt_cv_func_assert_works=yes ;;
861        esac
862      fi
863      ;;
864    esac])
865
866if test "x$lt_cv_func_assert_works" = xyes; then
867  AC_CHECK_HEADERS(assert.h)
868fi
869])# AC_LIBTOOL_HEADER_ASSERT
870
871# _LT_AC_CHECK_DLFCN
872# --------------------
873AC_DEFUN([_LT_AC_CHECK_DLFCN],
874[AC_CHECK_HEADERS(dlfcn.h)
875])# _LT_AC_CHECK_DLFCN
876
877# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
878# ---------------------------------
879AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
880[AC_REQUIRE([AC_CANONICAL_HOST])
881AC_REQUIRE([AC_PROG_NM])
882AC_REQUIRE([AC_OBJEXT])
883# Check for command to grab the raw symbol name followed by C symbol from nm.
884AC_MSG_CHECKING([command to parse $NM output])
885AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
886
887# These are sane defaults that work on at least a few old systems.
888# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
889
890# Character class describing NM global symbol codes.
891symcode='[[BCDEGRST]]'
892
893# Regexp to match symbols that can be accessed directly from C.
894sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
895
896# Transform the above into a raw symbol and a C symbol.
897symxfrm='\1 \2\3 \3'
898
899# Transform an extracted symbol line into a proper C declaration
900lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
901
902# Transform an extracted symbol line into symbol name and symbol address
903lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
904
905# Define system-specific variables.
906case $host_os in
907aix*)
908  symcode='[[BCDT]]'
909  ;;
910cygwin* | mingw* | pw32*)
911  symcode='[[ABCDGISTW]]'
912  ;;
913hpux*) # Its linker distinguishes data from code symbols
914  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
915  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
916  ;;
917irix* | nonstopux*)
918  symcode='[[BCDEGRST]]'
919  ;;
920solaris* | sysv5*)
921  symcode='[[BDT]]'
922  ;;
923sysv4)
924  symcode='[[DFNSTU]]'
925  ;;
926esac
927
928# Handle CRLF in mingw tool chain
929opt_cr=
930case $host_os in
931mingw*)
932  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
933  ;;
934esac
935
936# If we're using GNU nm, then use its standard symbol codes.
937if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
938  symcode='[[ABCDGISTW]]'
939fi
940
941# Try without a prefix undercore, then with it.
942for ac_symprfx in "" "_"; do
943
944  # Write the raw and C identifiers.
945lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
946
947  # Check to see that the pipe works correctly.
948  pipe_works=no
949  rm -f conftest*
950  cat > conftest.$ac_ext <<EOF
951#ifdef __cplusplus
952extern "C" {
953#endif
954char nm_test_var;
955void nm_test_func(){}
956#ifdef __cplusplus
957}
958#endif
959int main(){nm_test_var='a';nm_test_func();return(0);}
960EOF
961
962  if AC_TRY_EVAL(ac_compile); then
963    # Now try to grab the symbols.
964    nlist=conftest.nm
965    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
966      # Try sorting and uniquifying the output.
967      if sort "$nlist" | uniq > "$nlist"T; then
968        mv -f "$nlist"T "$nlist"
969      else
970        rm -f "$nlist"T
971      fi
972
973      # Make sure that we snagged all the symbols we need.
974      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
975        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
976          cat <<EOF > conftest.$ac_ext
977#ifdef __cplusplus
978extern "C" {
979#endif
980
981EOF
982          # Now generate the symbol file.
983          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
984
985          cat <<EOF >> conftest.$ac_ext
986#if defined (__STDC__) && __STDC__
987# define lt_ptr void *
988#else
989# define lt_ptr char *
990# define const
991#endif
992
993/* The mapping between symbol names and symbols. */
994const struct {
995  const char *name;
996  lt_ptr address;
997}
998lt_preloaded_symbols[[]] =
999{
1000EOF
1001          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1002          cat <<\EOF >> conftest.$ac_ext
1003  {0, (lt_ptr) 0}
1004};
1005
1006#ifdef __cplusplus
1007}
1008#endif
1009EOF
1010          # Now try linking the two files.
1011          mv conftest.$ac_objext conftstm.$ac_objext
1012          save_LIBS="$LIBS"
1013          save_CFLAGS="$CFLAGS"
1014          LIBS="conftstm.$ac_objext"
1015          CFLAGS="$CFLAGS$no_builtin_flag"
1016          if AC_TRY_EVAL(ac_link) && test -s conftest; then
1017            pipe_works=yes
1018          fi
1019          LIBS="$save_LIBS"
1020          CFLAGS="$save_CFLAGS"
1021        else
1022          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1023        fi
1024      else
1025        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1026      fi
1027    else
1028      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1029    fi
1030  else
1031    echo "$progname: failed program was:" >&AC_FD_CC
1032    cat conftest.$ac_ext >&5
1033  fi
1034  rm -f conftest* conftst*
1035
1036  # Do not use the global_symbol_pipe unless it works.
1037  if test "$pipe_works" = yes; then
1038    break
1039  else
1040    lt_cv_sys_global_symbol_pipe=
1041  fi
1042done
1043])
1044global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1045if test -z "$lt_cv_sys_global_symbol_pipe"; then
1046  global_symbol_to_cdecl=
1047  global_symbol_to_c_name_address=
1048else
1049  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1050  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1051fi
1052if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1053then
1054  AC_MSG_RESULT(failed)
1055else
1056  AC_MSG_RESULT(ok)
1057fi
1058]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1059
1060# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1061# ---------------------------------
1062AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1063[# Find the correct PATH separator.  Usually this is `:', but
1064# DJGPP uses `;' like DOS.
1065if test "X${PATH_SEPARATOR+set}" != Xset; then
1066  UNAME=${UNAME-`uname 2>/dev/null`}
1067  case X$UNAME in
1068    *-DOS) lt_cv_sys_path_separator=';' ;;
1069    *)     lt_cv_sys_path_separator=':' ;;
1070  esac
1071  PATH_SEPARATOR=$lt_cv_sys_path_separator
1072fi
1073])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1074
1075# _LT_AC_PROG_ECHO_BACKSLASH
1076# --------------------------
1077# Add some code to the start of the generated configure script which
1078# will find an echo command which doesn't interpret backslashes.
1079AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1080[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1081                              [AC_DIVERT_PUSH(NOTICE)])
1082_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1083
1084# Check that we are running under the correct shell.
1085SHELL=${CONFIG_SHELL-/bin/sh}
1086
1087case X$ECHO in
1088X*--fallback-echo)
1089  # Remove one level of quotation (which was required for Make).
1090  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1091  ;;
1092esac
1093
1094echo=${ECHO-echo}
1095if test "X[$]1" = X--no-reexec; then
1096  # Discard the --no-reexec flag, and continue.
1097  shift
1098elif test "X[$]1" = X--fallback-echo; then
1099  # Avoid inline document here, it may be left over
1100  :
1101elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1102  # Yippee, $echo works!
1103  :
1104else
1105  # Restart under the correct shell.
1106  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1107fi
1108
1109if test "X[$]1" = X--fallback-echo; then
1110  # used as fallback echo
1111  shift
1112  cat <<EOF
1113$*
1114EOF
1115  exit 0
1116fi
1117
1118# The HP-UX ksh and POSIX shell print the target directory to stdout
1119# if CDPATH is set.
1120if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1121
1122if test -z "$ECHO"; then
1123if test "X${echo_test_string+set}" != Xset; then
1124# find a string as large as possible, as long as the shell can cope with it
1125  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1126    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1127    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1128       echo_test_string="`eval $cmd`" &&
1129       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1130    then
1131      break
1132    fi
1133  done
1134fi
1135
1136if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1137   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1138   test "X$echo_testing_string" = "X$echo_test_string"; then
1139  :
1140else
1141  # The Solaris, AIX, and Digital Unix default echo programs unquote
1142  # backslashes.  This makes it impossible to quote backslashes using
1143  #   echo "$something" | sed 's/\\/\\\\/g'
1144  #
1145  # So, first we look for a working echo in the user's PATH.
1146
1147  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1148  for dir in $PATH /usr/ucb; do
1149    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1150       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1151       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1152       test "X$echo_testing_string" = "X$echo_test_string"; then
1153      echo="$dir/echo"
1154      break
1155    fi
1156  done
1157  IFS="$save_ifs"
1158
1159  if test "X$echo" = Xecho; then
1160    # We didn't find a better echo, so look for alternatives.
1161    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1162       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1163       test "X$echo_testing_string" = "X$echo_test_string"; then
1164      # This shell has a builtin print -r that does the trick.
1165      echo='print -r'
1166    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1167         test "X$CONFIG_SHELL" != X/bin/ksh; then
1168      # If we have ksh, try running configure again with it.
1169      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1170      export ORIGINAL_CONFIG_SHELL
1171      CONFIG_SHELL=/bin/ksh
1172      export CONFIG_SHELL
1173      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1174    else
1175      # Try using printf.
1176      echo='printf %s\n'
1177      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1178         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1179         test "X$echo_testing_string" = "X$echo_test_string"; then
1180        # Cool, printf works
1181        :
1182      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1183           test "X$echo_testing_string" = 'X\t' &&
1184           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1185           test "X$echo_testing_string" = "X$echo_test_string"; then
1186        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1187        export CONFIG_SHELL
1188        SHELL="$CONFIG_SHELL"
1189        export SHELL
1190        echo="$CONFIG_SHELL [$]0 --fallback-echo"
1191      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1192           test "X$echo_testing_string" = 'X\t' &&
1193           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1194           test "X$echo_testing_string" = "X$echo_test_string"; then
1195        echo="$CONFIG_SHELL [$]0 --fallback-echo"
1196      else
1197        # maybe with a smaller string...
1198        prev=:
1199
1200        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1201          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1202          then
1203            break
1204          fi
1205          prev="$cmd"
1206        done
1207
1208        if test "$prev" != 'sed 50q "[$]0"'; then
1209          echo_test_string=`eval $prev`
1210          export echo_test_string
1211          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1212        else
1213          # Oops.  We lost completely, so just stick with echo.
1214          echo=echo
1215        fi
1216      fi
1217    fi
1218  fi
1219fi
1220fi
1221
1222# Copy echo and quote the copy suitably for passing to libtool from
1223# the Makefile, instead of quoting the original, which is used later.
1224ECHO=$echo
1225if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1226   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1227fi
1228
1229AC_SUBST(ECHO)
1230AC_DIVERT_POP
1231])# _LT_AC_PROG_ECHO_BACKSLASH
1232
1233# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1234#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1235# ------------------------------------------------------------------
1236AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1237[if test "$cross_compiling" = yes; then :
1238  [$4]
1239else
1240  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1241  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1242  lt_status=$lt_dlunknown
1243  cat > conftest.$ac_ext <<EOF
1244[#line __oline__ "configure"
1245#include "confdefs.h"
1246
1247#if HAVE_DLFCN_H
1248#include <dlfcn.h>
1249#endif
1250
1251#include <stdio.h>
1252
1253#ifdef RTLD_GLOBAL
1254#  define LT_DLGLOBAL           RTLD_GLOBAL
1255#else
1256#  ifdef DL_GLOBAL
1257#    define LT_DLGLOBAL         DL_GLOBAL
1258#  else
1259#    define LT_DLGLOBAL         0
1260#  endif
1261#endif
1262
1263/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1264   find out it does not work in some platform. */
1265#ifndef LT_DLLAZY_OR_NOW
1266#  ifdef RTLD_LAZY
1267#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1268#  else
1269#    ifdef DL_LAZY
1270#      define LT_DLLAZY_OR_NOW          DL_LAZY
1271#    else
1272#      ifdef RTLD_NOW
1273#        define LT_DLLAZY_OR_NOW        RTLD_NOW
1274#      else
1275#        ifdef DL_NOW
1276#          define LT_DLLAZY_OR_NOW      DL_NOW
1277#        else
1278#          define LT_DLLAZY_OR_NOW      0
1279#        endif
1280#      endif
1281#    endif
1282#  endif
1283#endif
1284
1285#ifdef __cplusplus
1286extern "C" void exit (int);
1287#endif
1288
1289void fnord() { int i=42;}
1290int main ()
1291{
1292  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1293  int status = $lt_dlunknown;
1294
1295  if (self)
1296    {
1297      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1298      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1299      /* dlclose (self); */
1300    }
1301
1302    exit (status);
1303}]
1304EOF
1305  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1306    (./conftest; exit; ) 2>/dev/null
1307    lt_status=$?
1308    case x$lt_status in
1309      x$lt_dlno_uscore) $1 ;;
1310      x$lt_dlneed_uscore) $2 ;;
1311      x$lt_unknown|x*) $3 ;;
1312    esac
1313  else :
1314    # compilation failed
1315    $3
1316  fi
1317fi
1318rm -fr conftest*
1319])# _LT_AC_TRY_DLOPEN_SELF
1320
1321# AC_LIBTOOL_DLOPEN_SELF
1322# -------------------
1323AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1324[if test "x$enable_dlopen" != xyes; then
1325  enable_dlopen=unknown
1326  enable_dlopen_self=unknown
1327  enable_dlopen_self_static=unknown
1328else
1329  lt_cv_dlopen=no
1330  lt_cv_dlopen_libs=
1331
1332  case $host_os in
1333  beos*)
1334    lt_cv_dlopen="load_add_on"
1335    lt_cv_dlopen_libs=
1336    lt_cv_dlopen_self=yes
1337    ;;
1338
1339  cygwin* | mingw* | pw32*)
1340    lt_cv_dlopen="LoadLibrary"
1341    lt_cv_dlopen_libs=
1342   ;;
1343
1344  *)
1345    AC_CHECK_FUNC([shl_load],
1346          [lt_cv_dlopen="shl_load"],
1347      [AC_CHECK_LIB([dld], [shl_load],
1348            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1349        [AC_CHECK_FUNC([dlopen],
1350              [lt_cv_dlopen="dlopen"],
1351          [AC_CHECK_LIB([dl], [dlopen],
1352                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1353            [AC_CHECK_LIB([svld], [dlopen],
1354                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1355              [AC_CHECK_LIB([dld], [dld_link],
1356                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1357              ])
1358            ])
1359          ])
1360        ])
1361      ])
1362    ;;
1363  esac
1364
1365  if test "x$lt_cv_dlopen" != xno; then
1366    enable_dlopen=yes
1367  else
1368    enable_dlopen=no
1369  fi
1370
1371  case $lt_cv_dlopen in
1372  dlopen)
1373    save_CPPFLAGS="$CPPFLAGS"
1374    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1375    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1376
1377    save_LDFLAGS="$LDFLAGS"
1378    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1379
1380    save_LIBS="$LIBS"
1381    LIBS="$lt_cv_dlopen_libs $LIBS"
1382
1383    AC_CACHE_CHECK([whether a program can dlopen itself],
1384          lt_cv_dlopen_self, [dnl
1385          _LT_AC_TRY_DLOPEN_SELF(
1386            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1387            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1388    ])
1389
1390    if test "x$lt_cv_dlopen_self" = xyes; then
1391      LDFLAGS="$LDFLAGS $link_static_flag"
1392      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1393          lt_cv_dlopen_self_static, [dnl
1394          _LT_AC_TRY_DLOPEN_SELF(
1395            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1396            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1397      ])
1398    fi
1399
1400    CPPFLAGS="$save_CPPFLAGS"
1401    LDFLAGS="$save_LDFLAGS"
1402    LIBS="$save_LIBS"
1403    ;;
1404  esac
1405
1406  case $lt_cv_dlopen_self in
1407  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1408  *) enable_dlopen_self=unknown ;;
1409  esac
1410
1411  case $lt_cv_dlopen_self_static in
1412  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1413  *) enable_dlopen_self_static=unknown ;;
1414  esac
1415fi
1416])# AC_LIBTOOL_DLOPEN_SELF
1417
1418AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1419[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1420# Sed substitution that helps us do robust quoting.  It backslashifies
1421# metacharacters that are still active within double-quoted strings.
1422Xsed='sed -e s/^X//'
1423sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1424
1425# Same as above, but do not quote variable references.
1426double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1427
1428# Sed substitution to delay expansion of an escaped shell variable in a
1429# double_quote_subst'ed string.
1430delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1431
1432# Constants:
1433rm="rm -f"
1434
1435# Global variables:
1436default_ofile=libtool
1437can_build_shared=yes
1438
1439# All known linkers require a `.a' archive for static linking (except M$VC,
1440# which needs '.lib').
1441libext=a
1442ltmain="$ac_aux_dir/ltmain.sh"
1443ofile="$default_ofile"
1444with_gnu_ld="$lt_cv_prog_gnu_ld"
1445need_locks="$enable_libtool_lock"
1446
1447old_CC="$CC"
1448old_CFLAGS="$CFLAGS"
1449
1450# Set sane defaults for various variables
1451test -z "$AR" && AR=ar
1452test -z "$AR_FLAGS" && AR_FLAGS=cru
1453test -z "$AS" && AS=as
1454test -z "$CC" && CC=cc
1455test -z "$DLLTOOL" && DLLTOOL=dlltool
1456test -z "$LD" && LD=ld
1457test -z "$LN_S" && LN_S="ln -s"
1458test -z "$MAGIC_CMD" && MAGIC_CMD=file
1459test -z "$NM" && NM=nm
1460test -z "$OBJDUMP" && OBJDUMP=objdump
1461test -z "$RANLIB" && RANLIB=:
1462test -z "$STRIP" && STRIP=:
1463test -z "$ac_objext" && ac_objext=o
1464
1465if test x"$host" != x"$build"; then
1466  ac_tool_prefix=${host_alias}-
1467else
1468  ac_tool_prefix=
1469fi
1470
1471# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1472case $host_os in
1473linux-gnu*) ;;
1474linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1475esac
1476
1477case $host_os in
1478aix3*)
1479  # AIX sometimes has problems with the GCC collect2 program.  For some
1480  # reason, if we set the COLLECT_NAMES environment variable, the problems
1481  # vanish in a puff of smoke.
1482  if test "X${COLLECT_NAMES+set}" != Xset; then
1483    COLLECT_NAMES=
1484    export COLLECT_NAMES
1485  fi
1486  ;;
1487esac
1488
1489# Determine commands to create old-style static archives.
1490old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1491old_postinstall_cmds='chmod 644 $oldlib'
1492old_postuninstall_cmds=
1493
1494if test -n "$RANLIB"; then
1495  case $host_os in
1496  openbsd*)
1497    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1498    ;;
1499  *)
1500    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1501    ;;
1502  esac
1503  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1504fi
1505
1506# Allow CC to be a program name with arguments.
1507set dummy $CC
1508compiler="[$]2"
1509
1510AC_MSG_CHECKING([for objdir])
1511rm -f .libs 2>/dev/null
1512mkdir .libs 2>/dev/null
1513if test -d .libs; then
1514  objdir=.libs
1515else
1516  # MS-DOS does not allow filenames that begin with a dot.
1517  objdir=_libs
1518fi
1519rmdir .libs 2>/dev/null
1520AC_MSG_RESULT($objdir)
1521
1522
1523AC_ARG_WITH(pic,
1524[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1525pic_mode="$withval", pic_mode=default)
1526test -z "$pic_mode" && pic_mode=default
1527
1528# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1529# in isolation, and that seeing it set (from the cache) indicates that
1530# the associated values are set (in the cache) correctly too.
1531AC_MSG_CHECKING([for $compiler option to produce PIC])
1532AC_CACHE_VAL(lt_cv_prog_cc_pic,
1533[ lt_cv_prog_cc_pic=
1534  lt_cv_prog_cc_shlib=
1535  lt_cv_prog_cc_wl=
1536  lt_cv_prog_cc_static=
1537  lt_cv_prog_cc_no_builtin=
1538  lt_cv_prog_cc_can_build_shared=$can_build_shared
1539
1540  if test "$GCC" = yes; then
1541    lt_cv_prog_cc_wl='-Wl,'
1542    lt_cv_prog_cc_static='-static'
1543
1544    case $host_os in
1545    aix*)
1546      # Below there is a dirty hack to force normal static linking with -ldl
1547      # The problem is because libdl dynamically linked with both libc and
1548      # libC (AIX C++ library), which obviously doesn't included in libraries
1549      # list by gcc. This cause undefined symbols with -static flags.
1550      # This hack allows C programs to be linked with "-static -ldl", but
1551      # not sure about C++ programs.
1552      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1553      ;;
1554    amigaos*)
1555      # FIXME: we need at least 68020 code to build shared libraries, but
1556      # adding the `-m68020' flag to GCC prevents building anything better,
1557      # like `-m68040'.
1558      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1559      ;;
1560    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1561      # PIC is the default for these OSes.
1562      ;;
1563    darwin* | rhapsody*)
1564      # PIC is the default on this platform
1565      # Common symbols not allowed in MH_DYLIB files
1566      lt_cv_prog_cc_pic='-fno-common'
1567      ;;
1568    cygwin* | mingw* | pw32* | os2*)
1569      # This hack is so that the source file can tell whether it is being
1570      # built for inclusion in a dll (and should export symbols for example).
1571      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1572      ;;
1573    sysv4*MP*)
1574      if test -d /usr/nec; then
1575         lt_cv_prog_cc_pic=-Kconform_pic
1576      fi
1577      ;;
1578    *)
1579      lt_cv_prog_cc_pic='-fPIC'
1580      ;;
1581    esac
1582  else
1583    # PORTME Check for PIC flags for the system compiler.
1584    case $host_os in
1585    aix3* | aix4* | aix5*)
1586      lt_cv_prog_cc_wl='-Wl,'
1587      # All AIX code is PIC.
1588      if test "$host_cpu" = ia64; then
1589        # AIX 5 now supports IA64 processor
1590        lt_cv_prog_cc_static='-Bstatic'
1591      else
1592        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1593      fi
1594      ;;
1595
1596    hpux9* | hpux10* | hpux11*)
1597      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1598      lt_cv_prog_cc_wl='-Wl,'
1599      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1600      lt_cv_prog_cc_pic='+Z'
1601      ;;
1602
1603    irix5* | irix6* | nonstopux*)
1604      lt_cv_prog_cc_wl='-Wl,'
1605      lt_cv_prog_cc_static='-non_shared'
1606      # PIC (with -KPIC) is the default.
1607      ;;
1608
1609    cygwin* | mingw* | pw32* | os2*)
1610      # This hack is so that the source file can tell whether it is being
1611      # built for inclusion in a dll (and should export symbols for example).
1612      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1613      ;;
1614
1615    newsos6)
1616      lt_cv_prog_cc_pic='-KPIC'
1617      lt_cv_prog_cc_static='-Bstatic'
1618      ;;
1619
1620    osf3* | osf4* | osf5*)
1621      # All OSF/1 code is PIC.
1622      lt_cv_prog_cc_wl='-Wl,'
1623      lt_cv_prog_cc_static='-non_shared'
1624      ;;
1625
1626    sco3.2v5*)
1627      lt_cv_prog_cc_pic='-Kpic'
1628      lt_cv_prog_cc_static='-dn'
1629      lt_cv_prog_cc_shlib='-belf'
1630      ;;
1631
1632    solaris*)
1633      lt_cv_prog_cc_pic='-KPIC'
1634      lt_cv_prog_cc_static='-Bstatic'
1635      lt_cv_prog_cc_wl='-Wl,'
1636      ;;
1637
1638    sunos4*)
1639      lt_cv_prog_cc_pic='-PIC'
1640      lt_cv_prog_cc_static='-Bstatic'
1641      lt_cv_prog_cc_wl='-Qoption ld '
1642      ;;
1643
1644    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1645      lt_cv_prog_cc_pic='-KPIC'
1646      lt_cv_prog_cc_static='-Bstatic'
1647      if test "x$host_vendor" = xsni; then
1648        lt_cv_prog_cc_wl='-LD'
1649      else
1650        lt_cv_prog_cc_wl='-Wl,'
1651      fi
1652      ;;
1653
1654    uts4*)
1655      lt_cv_prog_cc_pic='-pic'
1656      lt_cv_prog_cc_static='-Bstatic'
1657      ;;
1658
1659    sysv4*MP*)
1660      if test -d /usr/nec ;then
1661        lt_cv_prog_cc_pic='-Kconform_pic'
1662        lt_cv_prog_cc_static='-Bstatic'
1663      fi
1664      ;;
1665
1666    *)
1667      lt_cv_prog_cc_can_build_shared=no
1668      ;;
1669    esac
1670  fi
1671])
1672if test -z "$lt_cv_prog_cc_pic"; then
1673  AC_MSG_RESULT([none])
1674else
1675  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1676
1677  # Check to make sure the pic_flag actually works.
1678  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1679  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1680    save_CFLAGS="$CFLAGS"
1681    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1682    AC_TRY_COMPILE([], [], [dnl
1683      case $host_os in
1684      hpux9* | hpux10* | hpux11*)
1685        # On HP-UX, both CC and GCC only warn that PIC is supported... then
1686        # they create non-PIC objects.  So, if there were any warnings, we
1687        # assume that PIC is not supported.
1688        if test -s conftest.err; then
1689          lt_cv_prog_cc_pic_works=no
1690        else
1691          lt_cv_prog_cc_pic_works=yes
1692        fi
1693        ;;
1694      *)
1695        lt_cv_prog_cc_pic_works=yes
1696        ;;
1697      esac
1698    ], [dnl
1699      lt_cv_prog_cc_pic_works=no
1700    ])
1701    CFLAGS="$save_CFLAGS"
1702  ])
1703
1704  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1705    lt_cv_prog_cc_pic=
1706    lt_cv_prog_cc_can_build_shared=no
1707  else
1708    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1709  fi
1710
1711  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1712fi
1713
1714# Check for any special shared library compilation flags.
1715if test -n "$lt_cv_prog_cc_shlib"; then
1716  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1717  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1718  else
1719   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1720    lt_cv_prog_cc_can_build_shared=no
1721  fi
1722fi
1723
1724AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1725AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1726  lt_cv_prog_cc_static_works=no
1727  save_LDFLAGS="$LDFLAGS"
1728  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1729  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1730  LDFLAGS="$save_LDFLAGS"
1731])
1732
1733# Belt *and* braces to stop my trousers falling down:
1734test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1735AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1736
1737pic_flag="$lt_cv_prog_cc_pic"
1738special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1739wl="$lt_cv_prog_cc_wl"
1740link_static_flag="$lt_cv_prog_cc_static"
1741no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1742can_build_shared="$lt_cv_prog_cc_can_build_shared"
1743
1744
1745# Check to see if options -o and -c are simultaneously supported by compiler
1746AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1747AC_CACHE_VAL([lt_cv_compiler_c_o], [
1748$rm -r conftest 2>/dev/null
1749mkdir conftest
1750cd conftest
1751echo "int some_variable = 0;" > conftest.$ac_ext
1752mkdir out
1753# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1754# that will create temporary files in the current directory regardless of
1755# the output directory.  Thus, making CWD read-only will cause this test
1756# to fail, enabling locking or at least warning the user not to do parallel
1757# builds.
1758chmod -w .
1759save_CFLAGS="$CFLAGS"
1760CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1761compiler_c_o=no
1762if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1763  # The compiler can only warn and ignore the option if not recognized
1764  # So say no if there are warnings
1765  if test -s out/conftest.err; then
1766    lt_cv_compiler_c_o=no
1767  else
1768    lt_cv_compiler_c_o=yes
1769  fi
1770else
1771  # Append any errors to the config.log.
1772  cat out/conftest.err 1>&AC_FD_CC
1773  lt_cv_compiler_c_o=no
1774fi
1775CFLAGS="$save_CFLAGS"
1776chmod u+w .
1777$rm conftest* out/*
1778rmdir out
1779cd ..
1780rmdir conftest
1781$rm -r conftest 2>/dev/null
1782])
1783compiler_c_o=$lt_cv_compiler_c_o
1784AC_MSG_RESULT([$compiler_c_o])
1785
1786if test x"$compiler_c_o" = x"yes"; then
1787  # Check to see if we can write to a .lo
1788  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1789  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1790  lt_cv_compiler_o_lo=no
1791  save_CFLAGS="$CFLAGS"
1792  CFLAGS="$CFLAGS -c -o conftest.lo"
1793  save_objext="$ac_objext"
1794  ac_objext=lo
1795  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1796    # The compiler can only warn and ignore the option if not recognized
1797    # So say no if there are warnings
1798    if test -s conftest.err; then
1799      lt_cv_compiler_o_lo=no
1800    else
1801      lt_cv_compiler_o_lo=yes
1802    fi
1803  ])
1804  ac_objext="$save_objext"
1805  CFLAGS="$save_CFLAGS"
1806  ])
1807  compiler_o_lo=$lt_cv_compiler_o_lo
1808  AC_MSG_RESULT([$compiler_o_lo])
1809else
1810  compiler_o_lo=no
1811fi
1812
1813# Check to see if we can do hard links to lock some files if needed
1814hard_links="nottested"
1815if test "$compiler_c_o" = no && test "$need_locks" != no; then
1816  # do not overwrite the value of need_locks provided by the user
1817  AC_MSG_CHECKING([if we can lock with hard links])
1818  hard_links=yes
1819  $rm conftest*
1820  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1821  touch conftest.a
1822  ln conftest.a conftest.b 2>&5 || hard_links=no
1823  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1824  AC_MSG_RESULT([$hard_links])
1825  if test "$hard_links" = no; then
1826    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1827    need_locks=warn
1828  fi
1829else
1830  need_locks=no
1831fi
1832
1833if test "$GCC" = yes; then
1834  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1835  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1836  echo "int some_variable = 0;" > conftest.$ac_ext
1837  save_CFLAGS="$CFLAGS"
1838  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1839  compiler_rtti_exceptions=no
1840  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1841    # The compiler can only warn and ignore the option if not recognized
1842    # So say no if there are warnings
1843    if test -s conftest.err; then
1844      compiler_rtti_exceptions=no
1845    else
1846      compiler_rtti_exceptions=yes
1847    fi
1848  ])
1849  CFLAGS="$save_CFLAGS"
1850  AC_MSG_RESULT([$compiler_rtti_exceptions])
1851
1852  if test "$compiler_rtti_exceptions" = "yes"; then
1853    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1854  else
1855    no_builtin_flag=' -fno-builtin'
1856  fi
1857fi
1858
1859# See if the linker supports building shared libraries.
1860AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1861
1862allow_undefined_flag=
1863no_undefined_flag=
1864need_lib_prefix=unknown
1865need_version=unknown
1866# when you set need_version to no, make sure it does not cause -set_version
1867# flags to be left without arguments
1868archive_cmds=
1869archive_expsym_cmds=
1870old_archive_from_new_cmds=
1871old_archive_from_expsyms_cmds=
1872export_dynamic_flag_spec=
1873whole_archive_flag_spec=
1874thread_safe_flag_spec=
1875hardcode_into_libs=no
1876hardcode_libdir_flag_spec=
1877hardcode_libdir_separator=
1878hardcode_direct=no
1879hardcode_minus_L=no
1880hardcode_shlibpath_var=unsupported
1881runpath_var=
1882link_all_deplibs=unknown
1883always_export_symbols=no
1884export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1885# include_expsyms should be a list of space-separated symbols to be *always*
1886# included in the symbol list
1887include_expsyms=
1888# exclude_expsyms can be an egrep regular expression of symbols to exclude
1889# it will be wrapped by ` (' and `)$', so one must not match beginning or
1890# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1891# as well as any symbol that contains `d'.
1892exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1893# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1894# platforms (ab)use it in PIC code, but their linkers get confused if
1895# the symbol is explicitly referenced.  Since portable code cannot
1896# rely on this symbol name, it's probably fine to never include it in
1897# preloaded symbol tables.
1898extract_expsyms_cmds=
1899
1900case $host_os in
1901cygwin* | mingw* | pw32*)
1902  # FIXME: the MSVC++ port hasn't been tested in a loooong time
1903  # When not using gcc, we currently assume that we are using
1904  # Microsoft Visual C++.
1905  if test "$GCC" != yes; then
1906    with_gnu_ld=no
1907  fi
1908  ;;
1909openbsd*)
1910  with_gnu_ld=no
1911  ;;
1912esac
1913
1914ld_shlibs=yes
1915if test "$with_gnu_ld" = yes; then
1916  # If archive_cmds runs LD, not CC, wlarc should be empty
1917  wlarc='${wl}'
1918
1919  # See if GNU ld supports shared libraries.
1920  case $host_os in
1921  aix3* | aix4* | aix5*)
1922    # On AIX, the GNU linker is very broken
1923    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1924    ld_shlibs=no
1925    cat <<EOF 1>&2
1926
1927*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1928*** to be unable to reliably create shared libraries on AIX.
1929*** Therefore, libtool is disabling shared libraries support.  If you
1930*** really care for shared libraries, you may want to modify your PATH
1931*** so that a non-GNU linker is found, and then restart.
1932
1933EOF
1934    ;;
1935
1936  amigaos*)
1937    archive_cmds='$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)'
1938    hardcode_libdir_flag_spec='-L$libdir'
1939    hardcode_minus_L=yes
1940
1941    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1942    # that the semantics of dynamic libraries on AmigaOS, at least up
1943    # to version 4, is to share data among multiple programs linked
1944    # with the same dynamic library.  Since this doesn't match the
1945    # behavior of shared libraries on other platforms, we can use
1946    # them.
1947    ld_shlibs=no
1948    ;;
1949
1950  beos*)
1951    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1952      allow_undefined_flag=unsupported
1953      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1954      # support --undefined.  This deserves some investigation.  FIXME
1955      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1956    else
1957      ld_shlibs=no
1958    fi
1959    ;;
1960
1961  cygwin* | mingw* | pw32*)
1962    # hardcode_libdir_flag_spec is actually meaningless, as there is
1963    # no search path for DLLs.
1964    hardcode_libdir_flag_spec='-L$libdir'
1965    allow_undefined_flag=unsupported
1966    always_export_symbols=yes
1967
1968    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1969      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1970      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1971      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1972      else $CC -o impgen impgen.c ; fi)~
1973      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1974
1975    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1976
1977    # cygwin and mingw dlls have different entry points and sets of symbols
1978    # to exclude.
1979    # FIXME: what about values for MSVC?
1980    dll_entry=__cygwin_dll_entry@12
1981    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1982    case $host_os in
1983    mingw*)
1984      # mingw values
1985      dll_entry=_DllMainCRTStartup@12
1986      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1987      ;;
1988    esac
1989
1990    # mingw and cygwin differ, and it's simplest to just exclude the union
1991    # of the two symbol sets.
1992    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1993
1994    # recent cygwin and mingw systems supply a stub DllMain which the user
1995    # can override, but on older systems we have to supply one (in ltdll.c)
1996    if test "x$lt_cv_need_dllmain" = "xyes"; then
1997      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1998      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1999        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2000    else
2001      ltdll_obj=
2002      ltdll_cmds=
2003    fi
2004
2005    # Extract the symbol export list from an `--export-all' def file,
2006    # then regenerate the def file from the symbol export list, so that
2007    # the compiled dll only exports the symbol export list.
2008    # Be careful not to strip the DATA tag left be newer dlltools.
2009    export_symbols_cmds="$ltdll_cmds"'
2010      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2011      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2012
2013    # If the export-symbols file already is a .def file (1st line
2014    # is EXPORTS), use it as is.
2015    # If DATA tags from a recent dlltool are present, honour them!
2016    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2017        cp $export_symbols $output_objdir/$soname-def;
2018      else
2019        echo EXPORTS > $output_objdir/$soname-def;
2020        _lt_hint=1;
2021        cat $export_symbols | while read symbol; do
2022         set dummy \$symbol;
2023         case \[$]# in
2024           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2025           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2026         esac;
2027         _lt_hint=`expr 1 + \$_lt_hint`;
2028        done;
2029      fi~
2030      '"$ltdll_cmds"'
2031      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2032      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2033      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2034      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2035      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2036    ;;
2037
2038  netbsd*)
2039    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2040      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2041      wlarc=
2042    else
2043      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2044      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2045    fi
2046    ;;
2047
2048  solaris* | sysv5*)
2049    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2050      ld_shlibs=no
2051      cat <<EOF 1>&2
2052
2053*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2054*** create shared libraries on Solaris systems.  Therefore, libtool
2055*** is disabling shared libraries support.  We urge you to upgrade GNU
2056*** binutils to release 2.9.1 or newer.  Another option is to modify
2057*** your PATH or compiler configuration so that the native linker is
2058*** used, and then restart.
2059
2060EOF
2061    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2062      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2063      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2064    else
2065      ld_shlibs=no
2066    fi
2067    ;;
2068
2069  sunos4*)
2070    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2071    wlarc=
2072    hardcode_direct=yes
2073    hardcode_shlibpath_var=no
2074    ;;
2075
2076  *)
2077    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2078      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2079      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2080    else
2081      ld_shlibs=no
2082    fi
2083    ;;
2084  esac
2085
2086  if test "$ld_shlibs" = yes; then
2087    runpath_var=LD_RUN_PATH
2088    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2089    export_dynamic_flag_spec='${wl}--export-dynamic'
2090    case $host_os in
2091    cygwin* | mingw* | pw32*)
2092      # dlltool doesn't understand --whole-archive et. al.
2093      whole_archive_flag_spec=
2094      ;;
2095    *)
2096      # ancient GNU ld didn't support --whole-archive et. al.
2097      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2098        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2099      else
2100        whole_archive_flag_spec=
2101      fi
2102      ;;
2103    esac
2104  fi
2105else
2106  # PORTME fill in a description of your system's linker (not GNU ld)
2107  case $host_os in
2108  aix3*)
2109    allow_undefined_flag=unsupported
2110    always_export_symbols=yes
2111    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2112    # Note: this linker hardcodes the directories in LIBPATH if there
2113    # are no directories specified by -L.
2114    hardcode_minus_L=yes
2115    if test "$GCC" = yes && test -z "$link_static_flag"; then
2116      # Neither direct hardcoding nor static linking is supported with a
2117      # broken collect2.
2118      hardcode_direct=unsupported
2119    fi
2120    ;;
2121
2122  aix4* | aix5*)
2123    if test "$host_cpu" = ia64; then
2124      # On IA64, the linker does run time linking by default, so we don't
2125      # have to do anything special.
2126      aix_use_runtimelinking=no
2127      exp_sym_flag='-Bexport'
2128      no_entry_flag=""
2129    else
2130      aix_use_runtimelinking=no
2131
2132      # Test if we are trying to use run time linking or normal
2133      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2134      # need to do runtime linking.
2135      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2136        for ld_flag in $LDFLAGS; do
2137          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2138            aix_use_runtimelinking=yes
2139            break
2140          fi
2141        done
2142      esac
2143
2144      exp_sym_flag='-bexport'
2145      no_entry_flag='-bnoentry'
2146    fi
2147
2148    # When large executables or shared objects are built, AIX ld can
2149    # have problems creating the table of contents.  If linking a library
2150    # or program results in "error TOC overflow" add -mminimal-toc to
2151    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2152    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2153
2154    hardcode_direct=yes
2155    archive_cmds=''
2156    hardcode_libdir_separator=':'
2157    if test "$GCC" = yes; then
2158      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2159        collect2name=`${CC} -print-prog-name=collect2`
2160        if test -f "$collect2name" && \
2161          strings "$collect2name" | grep resolve_lib_name >/dev/null
2162        then
2163          # We have reworked collect2
2164          hardcode_direct=yes
2165        else
2166          # We have old collect2
2167          hardcode_direct=unsupported
2168          # It fails to find uninstalled libraries when the uninstalled
2169          # path is not listed in the libpath.  Setting hardcode_minus_L
2170          # to unsupported forces relinking
2171          hardcode_minus_L=yes
2172          hardcode_libdir_flag_spec='-L$libdir'
2173          hardcode_libdir_separator=
2174        fi
2175      esac
2176
2177      shared_flag='-shared'
2178    else
2179      # not using gcc
2180      if test "$host_cpu" = ia64; then
2181        shared_flag='${wl}-G'
2182      else
2183        if test "$aix_use_runtimelinking" = yes; then
2184          shared_flag='${wl}-G'
2185        else
2186          shared_flag='${wl}-bM:SRE'
2187        fi
2188      fi
2189    fi
2190
2191    # It seems that -bexpall can do strange things, so it is better to
2192    # generate a list of symbols to export.
2193    always_export_symbols=yes
2194    if test "$aix_use_runtimelinking" = yes; then
2195      # Warning - without using the other runtime loading flags (-brtl),
2196      # -berok will link without error, but may produce a broken library.
2197      allow_undefined_flag='-berok'
2198      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2199      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2200    else
2201      if test "$host_cpu" = ia64; then
2202        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2203        allow_undefined_flag="-z nodefs"
2204        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2205      else
2206        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2207        # Warning - without using the other run time loading flags,
2208        # -berok will link without error, but may produce a broken library.
2209        allow_undefined_flag='${wl}-berok'
2210        # This is a bit strange, but is similar to how AIX traditionally builds
2211        # it's shared libraries.
2212        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2213      fi
2214    fi
2215    ;;
2216
2217  amigaos*)
2218    archive_cmds='$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)'
2219    hardcode_libdir_flag_spec='-L$libdir'
2220    hardcode_minus_L=yes
2221    # see comment about different semantics on the GNU ld section
2222    ld_shlibs=no
2223    ;;
2224
2225  cygwin* | mingw* | pw32*)
2226    # When not using gcc, we currently assume that we are using
2227    # Microsoft Visual C++.
2228    # hardcode_libdir_flag_spec is actually meaningless, as there is
2229    # no search path for DLLs.
2230    hardcode_libdir_flag_spec=' '
2231    allow_undefined_flag=unsupported
2232    # Tell ltmain to make .lib files, not .a files.
2233    libext=lib
2234    # FIXME: Setting linknames here is a bad hack.
2235    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2236    # The linker will automatically build a .lib file if we build a DLL.
2237    old_archive_from_new_cmds='true'
2238    # FIXME: Should let the user specify the lib program.
2239    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2240    fix_srcfile_path='`cygpath -w "$srcfile"`'
2241    ;;
2242
2243  darwin* | rhapsody*)
2244    case "$host_os" in
2245    rhapsody* | darwin1.[[012]])
2246      allow_undefined_flag='-undefined suppress'
2247      ;;
2248    *) # Darwin 1.3 on
2249      allow_undefined_flag='-flat_namespace -undefined suppress'
2250      ;;
2251    esac
2252    # FIXME: Relying on posixy $() will cause problems for
2253    #        cross-compilation, but unfortunately the echo tests do not
2254    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2255    #        `"' quotes if we put them in here... so don't!
2256    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2257    # We need to add '_' to the symbols in $export_symbols first
2258    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2259    hardcode_direct=yes
2260    hardcode_shlibpath_var=no
2261    whole_archive_flag_spec='-all_load $convenience'
2262    ;;
2263
2264  freebsd1*)
2265    ld_shlibs=no
2266    ;;
2267
2268  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2269  # support.  Future versions do this automatically, but an explicit c++rt0.o
2270  # does not break anything, and helps significantly (at the cost of a little
2271  # extra space).
2272  freebsd2.2*)
2273    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2274    hardcode_libdir_flag_spec='-R$libdir'
2275    hardcode_direct=yes
2276    hardcode_shlibpath_var=no
2277    ;;
2278
2279  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2280  freebsd2*)
2281    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2282    hardcode_direct=yes
2283    hardcode_minus_L=yes
2284    hardcode_shlibpath_var=no
2285    ;;
2286
2287  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2288  freebsd*)
2289    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2290    hardcode_libdir_flag_spec='-R$libdir'
2291    hardcode_direct=yes
2292    hardcode_shlibpath_var=no
2293    ;;
2294
2295  hpux9* | hpux10* | hpux11*)
2296    case $host_os in
2297    hpux9*) archive_cmds='$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' ;;
2298    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2299    esac
2300    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2301    hardcode_libdir_separator=:
2302    hardcode_direct=yes
2303    hardcode_minus_L=yes # Not in the search PATH, but as the default
2304                         # location of the library.
2305    export_dynamic_flag_spec='${wl}-E'
2306    ;;
2307
2308  irix5* | irix6* | nonstopux*)
2309    if test "$GCC" = yes; then
2310      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2311    else
2312      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2313    fi
2314    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2315    hardcode_libdir_separator=:
2316    link_all_deplibs=yes
2317    ;;
2318
2319  netbsd*)
2320    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2321      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2322    else
2323      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2324    fi
2325    hardcode_libdir_flag_spec='-R$libdir'
2326    hardcode_direct=yes
2327    hardcode_shlibpath_var=no
2328    ;;
2329
2330  newsos6)
2331    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2332    hardcode_direct=yes
2333    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2334    hardcode_libdir_separator=:
2335    hardcode_shlibpath_var=no
2336    ;;
2337
2338  openbsd*)
2339    hardcode_direct=yes
2340    hardcode_shlibpath_var=no
2341    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2342      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2343      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2344      export_dynamic_flag_spec='${wl}-E'
2345    else
2346      case "$host_os" in
2347      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2348        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2349        hardcode_libdir_flag_spec='-R$libdir'
2350        ;;
2351      *)
2352        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2353        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2354        ;;
2355      esac
2356    fi
2357    ;;
2358
2359  os2*)
2360    hardcode_libdir_flag_spec='-L$libdir'
2361    hardcode_minus_L=yes
2362    allow_undefined_flag=unsupported
2363    archive_cmds='$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'
2364    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2365    ;;
2366
2367  osf3*)
2368    if test "$GCC" = yes; then
2369      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2370      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2371    else
2372      allow_undefined_flag=' -expect_unresolved \*'
2373      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2374    fi
2375    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2376    hardcode_libdir_separator=:
2377    ;;
2378
2379  osf4* | osf5*)        # as osf3* with the addition of -msym flag
2380    if test "$GCC" = yes; then
2381      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2382      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2383      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2384    else
2385      allow_undefined_flag=' -expect_unresolved \*'
2386      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2387      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2388      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2389
2390      #Both c and cxx compiler support -rpath directly
2391      hardcode_libdir_flag_spec='-rpath $libdir'
2392    fi
2393    hardcode_libdir_separator=:
2394    ;;
2395
2396  sco3.2v5*)
2397    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2398    hardcode_shlibpath_var=no
2399    runpath_var=LD_RUN_PATH
2400    hardcode_runpath_var=yes
2401    export_dynamic_flag_spec='${wl}-Bexport'
2402    ;;
2403
2404  solaris*)
2405    # gcc --version < 3.0 without binutils cannot create self contained
2406    # shared libraries reliably, requiring libgcc.a to resolve some of
2407    # the object symbols generated in some cases.  Libraries that use
2408    # assert need libgcc.a to resolve __eprintf, for example.  Linking
2409    # a copy of libgcc.a into every shared library to guarantee resolving
2410    # such symbols causes other problems:  According to Tim Van Holder
2411    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2412    # (to the application) exception stack for one thing.
2413    no_undefined_flag=' -z defs'
2414    if test "$GCC" = yes; then
2415      case `$CC --version 2>/dev/null` in
2416      [[12]].*)
2417        cat <<EOF 1>&2
2418
2419*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2420*** create self contained shared libraries on Solaris systems, without
2421*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2422*** -no-undefined support, which will at least allow you to build shared
2423*** libraries.  However, you may find that when you link such libraries
2424*** into an application without using GCC, you have to manually add
2425*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2426*** upgrade to a newer version of GCC.  Another option is to rebuild your
2427*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2428
2429EOF
2430        no_undefined_flag=
2431        ;;
2432      esac
2433    fi
2434    # $CC -shared without GNU ld will not create a library from C++
2435    # object files and a static libstdc++, better avoid it by now
2436    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2437    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2438                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2439    hardcode_libdir_flag_spec='-R$libdir'
2440    hardcode_shlibpath_var=no
2441    case $host_os in
2442    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2443    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2444      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2445    esac
2446    link_all_deplibs=yes
2447    ;;
2448
2449  sunos4*)
2450    if test "x$host_vendor" = xsequent; then
2451      # Use $CC to link under sequent, because it throws in some extra .o
2452      # files that make .init and .fini sections work.
2453      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2454    else
2455      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2456    fi
2457    hardcode_libdir_flag_spec='-L$libdir'
2458    hardcode_direct=yes
2459    hardcode_minus_L=yes
2460    hardcode_shlibpath_var=no
2461    ;;
2462
2463  sysv4)
2464    if test "x$host_vendor" = xsno; then
2465      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2466      hardcode_direct=yes # is this really true???
2467    else
2468      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2469      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2470    fi
2471    runpath_var='LD_RUN_PATH'
2472    hardcode_shlibpath_var=no
2473    ;;
2474
2475  sysv4.3*)
2476    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2477    hardcode_shlibpath_var=no
2478    export_dynamic_flag_spec='-Bexport'
2479    ;;
2480
2481  sysv5*)
2482    no_undefined_flag=' -z text'
2483    # $CC -shared without GNU ld will not create a library from C++
2484    # object files and a static libstdc++, better avoid it by now
2485    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2486    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2487                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2488    hardcode_libdir_flag_spec=
2489    hardcode_shlibpath_var=no
2490    runpath_var='LD_RUN_PATH'
2491    ;;
2492
2493  uts4*)
2494    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2495    hardcode_libdir_flag_spec='-L$libdir'
2496    hardcode_shlibpath_var=no
2497    ;;
2498
2499  dgux*)
2500    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2501    hardcode_libdir_flag_spec='-L$libdir'
2502    hardcode_shlibpath_var=no
2503    ;;
2504
2505  sysv4*MP*)
2506    if test -d /usr/nec; then
2507      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2508      hardcode_shlibpath_var=no
2509      runpath_var=LD_RUN_PATH
2510      hardcode_runpath_var=yes
2511      ld_shlibs=yes
2512    fi
2513    ;;
2514
2515  sysv4.2uw2*)
2516    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2517    hardcode_direct=yes
2518    hardcode_minus_L=no
2519    hardcode_shlibpath_var=no
2520    hardcode_runpath_var=yes
2521    runpath_var=LD_RUN_PATH
2522    ;;
2523
2524  sysv5uw7* | unixware7*)
2525    no_undefined_flag='${wl}-z ${wl}text'
2526    if test "$GCC" = yes; then
2527      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2528    else
2529      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2530    fi
2531    runpath_var='LD_RUN_PATH'
2532    hardcode_shlibpath_var=no
2533    ;;
2534
2535  *)
2536    ld_shlibs=no
2537    ;;
2538  esac
2539fi
2540AC_MSG_RESULT([$ld_shlibs])
2541test "$ld_shlibs" = no && can_build_shared=no
2542
2543# Check hardcoding attributes.
2544AC_MSG_CHECKING([how to hardcode library paths into programs])
2545hardcode_action=
2546if test -n "$hardcode_libdir_flag_spec" || \
2547   test -n "$runpath_var"; then
2548
2549  # We can hardcode non-existant directories.
2550  if test "$hardcode_direct" != no &&
2551     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2552     # have to relink, otherwise we might link with an installed library
2553     # when we should be linking with a yet-to-be-installed one
2554     ## test "$hardcode_shlibpath_var" != no &&
2555     test "$hardcode_minus_L" != no; then
2556    # Linking always hardcodes the temporary library directory.
2557    hardcode_action=relink
2558  else
2559    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2560    hardcode_action=immediate
2561  fi
2562else
2563  # We cannot hardcode anything, or else we can only hardcode existing
2564  # directories.
2565  hardcode_action=unsupported
2566fi
2567AC_MSG_RESULT([$hardcode_action])
2568
2569striplib=
2570old_striplib=
2571AC_MSG_CHECKING([whether stripping libraries is possible])
2572if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2573  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2574  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2575  AC_MSG_RESULT([yes])
2576else
2577  AC_MSG_RESULT([no])
2578fi
2579
2580reload_cmds='$LD$reload_flag -o $output$reload_objs'
2581test -z "$deplibs_check_method" && deplibs_check_method=unknown
2582
2583# PORTME Fill in your ld.so characteristics
2584AC_MSG_CHECKING([dynamic linker characteristics])
2585library_names_spec=
2586libname_spec='lib$name'
2587soname_spec=
2588postinstall_cmds=
2589postuninstall_cmds=
2590finish_cmds=
2591finish_eval=
2592shlibpath_var=
2593shlibpath_overrides_runpath=unknown
2594version_type=none
2595dynamic_linker="$host_os ld.so"
2596sys_lib_dlsearch_path_spec="/lib /usr/lib"
2597sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2598
2599case $host_os in
2600aix3*)
2601  version_type=linux
2602  library_names_spec='${libname}${release}.so$versuffix $libname.a'
2603  shlibpath_var=LIBPATH
2604
2605  # AIX has no versioning support, so we append a major version to the name.
2606  soname_spec='${libname}${release}.so$major'
2607  ;;
2608
2609aix4* | aix5*)
2610  version_type=linux
2611  if test "$host_cpu" = ia64; then
2612    # AIX 5 supports IA64
2613    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2614    shlibpath_var=LD_LIBRARY_PATH
2615  else
2616    # With GCC up to 2.95.x, collect2 would create an import file
2617    # for dependence libraries.  The import file would start with
2618    # the line `#! .'.  This would cause the generated library to
2619    # depend on `.', always an invalid library.  This was fixed in
2620    # development snapshots of GCC prior to 3.0.
2621    case $host_os in
2622      aix4 | aix4.[[01]] | aix4.[[01]].*)
2623        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2624             echo ' yes '
2625             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2626          :
2627        else
2628          can_build_shared=no
2629        fi
2630        ;;
2631    esac
2632    # AIX (on Power*) has no versioning support, so currently we can
2633    # not hardcode correct soname into executable. Probably we can
2634    # add versioning support to collect2, so additional links can
2635    # be useful in future.
2636    if test "$aix_use_runtimelinking" = yes; then
2637      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2638      # instead of lib<name>.a to let people know that these are not
2639      # typical AIX shared libraries.
2640      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2641    else
2642      # We preserve .a as extension for shared libraries through AIX4.2
2643      # and later when we are not doing run time linking.
2644      library_names_spec='${libname}${release}.a $libname.a'
2645      soname_spec='${libname}${release}.so$major'
2646    fi
2647    shlibpath_var=LIBPATH
2648  fi
2649  ;;
2650
2651amigaos*)
2652  library_names_spec='$libname.ixlibrary $libname.a'
2653  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2654  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'
2655  ;;
2656
2657beos*)
2658  library_names_spec='${libname}.so'
2659  dynamic_linker="$host_os ld.so"
2660  shlibpath_var=LIBRARY_PATH
2661  ;;
2662
2663bsdi4*)
2664  version_type=linux
2665  need_version=no
2666  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2667  soname_spec='${libname}${release}.so$major'
2668  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2669  shlibpath_var=LD_LIBRARY_PATH
2670  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2671  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2672  export_dynamic_flag_spec=-rdynamic
2673  # the default ld.so.conf also contains /usr/contrib/lib and
2674  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2675  # libtool to hard-code these into programs
2676  ;;
2677
2678cygwin* | mingw* | pw32*)
2679  version_type=windows
2680  need_version=no
2681  need_lib_prefix=no
2682  case $GCC,$host_os in
2683  yes,cygwin*)
2684    library_names_spec='$libname.dll.a'
2685    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2686    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2687      dldir=$destdir/`dirname \$dlpath`~
2688      test -d \$dldir || mkdir -p \$dldir~
2689      $install_prog .libs/$dlname \$dldir/$dlname'
2690    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2691      dlpath=$dir/\$dldll~
2692       $rm \$dlpath'
2693    ;;
2694  yes,mingw*)
2695    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2696    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2697    ;;
2698  yes,pw32*)
2699    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2700    ;;
2701  *)
2702    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2703    ;;
2704  esac
2705  dynamic_linker='Win32 ld.exe'
2706  # FIXME: first we should search . and the directory the executable is in
2707  shlibpath_var=PATH
2708  ;;
2709
2710darwin* | rhapsody*)
2711  dynamic_linker="$host_os dyld"
2712  version_type=darwin
2713  need_lib_prefix=no
2714  need_version=no
2715  # FIXME: Relying on posixy $() will cause problems for
2716  #        cross-compilation, but unfortunately the echo tests do not
2717  #        yet detect zsh echo's removal of \ escapes.
2718  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2719  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2720  shlibpath_overrides_runpath=yes
2721  shlibpath_var=DYLD_LIBRARY_PATH
2722  ;;
2723
2724freebsd1*)
2725  dynamic_linker=no
2726  ;;
2727
2728freebsd*)
2729  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2730  version_type=freebsd-$objformat
2731  case $version_type in
2732    freebsd-elf*)
2733      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2734      need_version=no
2735      need_lib_prefix=no
2736      ;;
2737    freebsd-*)
2738      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2739      need_version=yes
2740      ;;
2741  esac
2742  shlibpath_var=LD_LIBRARY_PATH
2743  case $host_os in
2744  freebsd2*)
2745    shlibpath_overrides_runpath=yes
2746    ;;
2747  *)
2748    shlibpath_overrides_runpath=no
2749    hardcode_into_libs=yes
2750    ;;
2751  esac
2752  ;;
2753
2754gnu*)
2755  version_type=linux
2756  need_lib_prefix=no
2757  need_version=no
2758  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2759  soname_spec='${libname}${release}.so$major'
2760  shlibpath_var=LD_LIBRARY_PATH
2761  hardcode_into_libs=yes
2762  ;;
2763
2764hpux9* | hpux10* | hpux11*)
2765  # Give a soname corresponding to the major version so that dld.sl refuses to
2766  # link against other versions.
2767  dynamic_linker="$host_os dld.sl"
2768  version_type=sunos
2769  need_lib_prefix=no
2770  need_version=no
2771  shlibpath_var=SHLIB_PATH
2772  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2773  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2774  soname_spec='${libname}${release}.sl$major'
2775  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2776  postinstall_cmds='chmod 555 $lib'
2777  ;;
2778
2779irix5* | irix6* | nonstopux*)
2780  case $host_os in
2781    nonstopux*) version_type=nonstopux ;;
2782    *)          version_type=irix ;;
2783  esac
2784  need_lib_prefix=no
2785  need_version=no
2786  soname_spec='${libname}${release}.so$major'
2787  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2788  case $host_os in
2789  irix5* | nonstopux*)
2790    libsuff= shlibsuff=
2791    ;;
2792  *)
2793    case $LD in # libtool.m4 will add one of these switches to LD
2794    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2795    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2796    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2797    *) libsuff= shlibsuff= libmagic=never-match;;
2798    esac
2799    ;;
2800  esac
2801  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2802  shlibpath_overrides_runpath=no
2803  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2804  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2805  ;;
2806
2807# No shared lib support for Linux oldld, aout, or coff.
2808linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2809  dynamic_linker=no
2810  ;;
2811
2812# This must be Linux ELF.
2813linux-gnu*)
2814  version_type=linux
2815  need_lib_prefix=no
2816  need_version=no
2817  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2818  soname_spec='${libname}${release}.so$major'
2819  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2820  shlibpath_var=LD_LIBRARY_PATH
2821  shlibpath_overrides_runpath=no
2822  # This implies no fast_install, which is unacceptable.
2823  # Some rework will be needed to allow for fast_install
2824  # before this can be enabled.
2825  hardcode_into_libs=yes
2826
2827  # We used to test for /lib/ld.so.1 and disable shared libraries on
2828  # powerpc, because MkLinux only supported shared libraries with the
2829  # GNU dynamic linker.  Since this was broken with cross compilers,
2830  # most powerpc-linux boxes support dynamic linking these days and
2831  # people can always --disable-shared, the test was removed, and we
2832  # assume the GNU/Linux dynamic linker is in use.
2833  dynamic_linker='GNU/Linux ld.so'
2834  ;;
2835
2836netbsd*)
2837  version_type=sunos
2838  need_lib_prefix=no
2839  need_version=no
2840  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2841    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2842    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2843    dynamic_linker='NetBSD (a.out) ld.so'
2844  else
2845    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2846    soname_spec='${libname}${release}.so$major'
2847    dynamic_linker='NetBSD ld.elf_so'
2848  fi
2849  shlibpath_var=LD_LIBRARY_PATH
2850  shlibpath_overrides_runpath=yes
2851  hardcode_into_libs=yes
2852  ;;
2853
2854newsos6)
2855  version_type=linux
2856  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2857  shlibpath_var=LD_LIBRARY_PATH
2858  shlibpath_overrides_runpath=yes
2859  ;;
2860
2861openbsd*)
2862  version_type=sunos
2863  need_lib_prefix=no
2864  need_version=no
2865  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2866    case "$host_os" in
2867    openbsd2.[[89]] | openbsd2.[[89]].*)
2868      shlibpath_overrides_runpath=no
2869      ;;
2870    *)
2871      shlibpath_overrides_runpath=yes
2872      ;;
2873    esac
2874  else
2875    shlibpath_overrides_runpath=yes
2876  fi
2877  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2878  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2879  shlibpath_var=LD_LIBRARY_PATH
2880  ;;
2881
2882os2*)
2883  libname_spec='$name'
2884  need_lib_prefix=no
2885  library_names_spec='$libname.dll $libname.a'
2886  dynamic_linker='OS/2 ld.exe'
2887  shlibpath_var=LIBPATH
2888  ;;
2889
2890osf3* | osf4* | osf5*)
2891  version_type=osf
2892  need_version=no
2893  need_lib_prefix=no
2894  soname_spec='${libname}${release}.so'
2895  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2896  shlibpath_var=LD_LIBRARY_PATH
2897  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2898  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2899  ;;
2900
2901sco3.2v5*)
2902  version_type=osf
2903  soname_spec='${libname}${release}.so$major'
2904  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2905  shlibpath_var=LD_LIBRARY_PATH
2906  ;;
2907
2908solaris*)
2909  version_type=linux
2910  need_lib_prefix=no
2911  need_version=no
2912  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2913  soname_spec='${libname}${release}.so$major'
2914  shlibpath_var=LD_LIBRARY_PATH
2915  shlibpath_overrides_runpath=yes
2916  hardcode_into_libs=yes
2917  # ldd complains unless libraries are executable
2918  postinstall_cmds='chmod +x $lib'
2919  ;;
2920
2921sunos4*)
2922  version_type=sunos
2923  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2924  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2925  shlibpath_var=LD_LIBRARY_PATH
2926  shlibpath_overrides_runpath=yes
2927  if test "$with_gnu_ld" = yes; then
2928    need_lib_prefix=no
2929  fi
2930  need_version=yes
2931  ;;
2932
2933sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2934  version_type=linux
2935  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2936  soname_spec='${libname}${release}.so$major'
2937  shlibpath_var=LD_LIBRARY_PATH
2938  case $host_vendor in
2939    sni)
2940      shlibpath_overrides_runpath=no
2941      ;;
2942    motorola)
2943      need_lib_prefix=no
2944      need_version=no
2945      shlibpath_overrides_runpath=no
2946      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2947      ;;
2948  esac
2949  ;;
2950
2951uts4*)
2952  version_type=linux
2953  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2954  soname_spec='${libname}${release}.so$major'
2955  shlibpath_var=LD_LIBRARY_PATH
2956  ;;
2957
2958dgux*)
2959  version_type=linux
2960  need_lib_prefix=no
2961  need_version=no
2962  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2963  soname_spec='${libname}${release}.so$major'
2964  shlibpath_var=LD_LIBRARY_PATH
2965  ;;
2966
2967sysv4*MP*)
2968  if test -d /usr/nec ;then
2969    version_type=linux
2970    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2971    soname_spec='$libname.so.$major'
2972    shlibpath_var=LD_LIBRARY_PATH
2973  fi
2974  ;;
2975
2976*)
2977  dynamic_linker=no
2978  ;;
2979esac
2980AC_MSG_RESULT([$dynamic_linker])
2981test "$dynamic_linker" = no && can_build_shared=no
2982
2983# Report the final consequences.
2984AC_MSG_CHECKING([if libtool supports shared libraries])
2985AC_MSG_RESULT([$can_build_shared])
2986
2987AC_MSG_CHECKING([whether to build shared libraries])
2988test "$can_build_shared" = "no" && enable_shared=no
2989
2990# On AIX, shared libraries and static libraries use the same namespace, and
2991# are all built from PIC.
2992case "$host_os" in
2993aix3*)
2994  test "$enable_shared" = yes && enable_static=no
2995  if test -n "$RANLIB"; then
2996    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2997    postinstall_cmds='$RANLIB $lib'
2998  fi
2999  ;;
3000
3001aix4*)
3002  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3003    test "$enable_shared" = yes && enable_static=no
3004  fi
3005  ;;
3006esac
3007AC_MSG_RESULT([$enable_shared])
3008
3009AC_MSG_CHECKING([whether to build static libraries])
3010# Make sure either enable_shared or enable_static is yes.
3011test "$enable_shared" = yes || enable_static=yes
3012AC_MSG_RESULT([$enable_static])
3013
3014if test "$hardcode_action" = relink; then
3015  # Fast installation is not supported
3016  enable_fast_install=no
3017elif test "$shlibpath_overrides_runpath" = yes ||
3018     test "$enable_shared" = no; then
3019  # Fast installation is not necessary
3020  enable_fast_install=needless
3021fi
3022
3023variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3024if test "$GCC" = yes; then
3025  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3026fi
3027
3028AC_LIBTOOL_DLOPEN_SELF
3029
3030if test "$enable_shared" = yes && test "$GCC" = yes; then
3031  case $archive_cmds in
3032  *'~'*)
3033    # FIXME: we may have to deal with multi-command sequences.
3034    ;;
3035  '$CC '*)
3036    # Test whether the compiler implicitly links with -lc since on some
3037    # systems, -lgcc has to come before -lc. If gcc already passes -lc
3038    # to ld, don't add -lc before -lgcc.
3039    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3040    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3041    [$rm conftest*
3042    echo 'static int dummy;' > conftest.$ac_ext
3043
3044    if AC_TRY_EVAL(ac_compile); then
3045      soname=conftest
3046      lib=conftest
3047      libobjs=conftest.$ac_objext
3048      deplibs=
3049      wl=$lt_cv_prog_cc_wl
3050      compiler_flags=-v
3051      linker_flags=-v
3052      verstring=
3053      output_objdir=.
3054      libname=conftest
3055      save_allow_undefined_flag=$allow_undefined_flag
3056      allow_undefined_flag=
3057      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3058      then
3059        lt_cv_archive_cmds_need_lc=no
3060      else
3061        lt_cv_archive_cmds_need_lc=yes
3062      fi
3063      allow_undefined_flag=$save_allow_undefined_flag
3064    else
3065      cat conftest.err 1>&5
3066    fi])
3067    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3068    ;;
3069  esac
3070fi
3071need_lc=${lt_cv_archive_cmds_need_lc-yes}
3072
3073# The second clause should only fire when bootstrapping the
3074# libtool distribution, otherwise you forgot to ship ltmain.sh
3075# with your package, and you will get complaints that there are
3076# no rules to generate ltmain.sh.
3077if test -f "$ltmain"; then
3078  :
3079else
3080  # If there is no Makefile yet, we rely on a make rule to execute
3081  # `config.status --recheck' to rerun these tests and create the
3082  # libtool script then.
3083  test -f Makefile && make "$ltmain"
3084fi
3085
3086if test -f "$ltmain"; then
3087  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3088  $rm -f "${ofile}T"
3089
3090  echo creating $ofile
3091
3092  # Now quote all the things that may contain metacharacters while being
3093  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3094  # variables and quote the copies for generation of the libtool script.
3095  for var in echo old_CC old_CFLAGS \
3096    AR AR_FLAGS CC LD LN_S NM SHELL \
3097    reload_flag reload_cmds wl \
3098    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3099    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3100    library_names_spec soname_spec \
3101    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3102    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3103    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3104    old_striplib striplib file_magic_cmd export_symbols_cmds \
3105    deplibs_check_method allow_undefined_flag no_undefined_flag \
3106    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3107    global_symbol_to_c_name_address \
3108    hardcode_libdir_flag_spec hardcode_libdir_separator  \
3109    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3110    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3111
3112    case $var in
3113    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3114    old_postinstall_cmds | old_postuninstall_cmds | \
3115    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3116    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3117    postinstall_cmds | postuninstall_cmds | \
3118    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3119      # Double-quote double-evaled strings.
3120      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3121      ;;
3122    *)
3123      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3124      ;;
3125    esac
3126  done
3127
3128  cat <<__EOF__ > "${ofile}T"
3129#! $SHELL
3130
3131# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3132# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3133# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3134#
3135# Copyright (C) 1996-2000 Free Software Foundation, Inc.
3136# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3137#
3138# This program is free software; you can redistribute it and/or modify
3139# it under the terms of the GNU General Public License as published by
3140# the Free Software Foundation; either version 2 of the License, or
3141# (at your option) any later version.
3142#
3143# This program is distributed in the hope that it will be useful, but
3144# WITHOUT ANY WARRANTY; without even the implied warranty of
3145# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3146# General Public License for more details.
3147#
3148# You should have received a copy of the GNU General Public License
3149# along with this program; if not, write to the Free Software
3150# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3151#
3152# As a special exception to the GNU General Public License, if you
3153# distribute this file as part of a program that contains a
3154# configuration script generated by Autoconf, you may include it under
3155# the same distribution terms that you use for the rest of that program.
3156
3157# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3158Xsed="sed -e s/^X//"
3159
3160# The HP-UX ksh and POSIX shell print the target directory to stdout
3161# if CDPATH is set.
3162if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3163
3164# ### BEGIN LIBTOOL CONFIG
3165
3166# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3167
3168# Shell to use when invoking shell scripts.
3169SHELL=$lt_SHELL
3170
3171# Whether or not to build shared libraries.
3172build_libtool_libs=$enable_shared
3173
3174# Whether or not to build static libraries.
3175build_old_libs=$enable_static
3176
3177# Whether or not to add -lc for building shared libraries.
3178build_libtool_need_lc=$need_lc
3179
3180# Whether or not to optimize for fast installation.
3181fast_install=$enable_fast_install
3182
3183# The host system.
3184host_alias=$host_alias
3185host=$host
3186
3187# An echo program that does not interpret backslashes.
3188echo=$lt_echo
3189
3190# The archiver.
3191AR=$lt_AR
3192AR_FLAGS=$lt_AR_FLAGS
3193
3194# The default C compiler.
3195CC=$lt_CC
3196
3197# Is the compiler the GNU C compiler?
3198with_gcc=$GCC
3199
3200# The linker used to build libraries.
3201LD=$lt_LD
3202
3203# Whether we need hard or soft links.
3204LN_S=$lt_LN_S
3205
3206# A BSD-compatible nm program.
3207NM=$lt_NM
3208
3209# A symbol stripping program
3210STRIP=$STRIP
3211
3212# Used to examine libraries when file_magic_cmd begins "file"
3213MAGIC_CMD=$MAGIC_CMD
3214
3215# Used on cygwin: DLL creation program.
3216DLLTOOL="$DLLTOOL"
3217
3218# Used on cygwin: object dumper.
3219OBJDUMP="$OBJDUMP"
3220
3221# Used on cygwin: assembler.
3222AS="$AS"
3223
3224# The name of the directory that contains temporary libtool files.
3225objdir=$objdir
3226
3227# How to create reloadable object files.
3228reload_flag=$lt_reload_flag
3229reload_cmds=$lt_reload_cmds
3230
3231# How to pass a linker flag through the compiler.
3232wl=$lt_wl
3233
3234# Object file suffix (normally "o").
3235objext="$ac_objext"
3236
3237# Old archive suffix (normally "a").
3238libext="$libext"
3239
3240# Executable file suffix (normally "").
3241exeext="$exeext"
3242
3243# Additional compiler flags for building library objects.
3244pic_flag=$lt_pic_flag
3245pic_mode=$pic_mode
3246
3247# Does compiler simultaneously support -c and -o options?
3248compiler_c_o=$lt_compiler_c_o
3249
3250# Can we write directly to a .lo ?
3251compiler_o_lo=$lt_compiler_o_lo
3252
3253# Must we lock files when doing compilation ?
3254need_locks=$lt_need_locks
3255
3256# Do we need the lib prefix for modules?
3257need_lib_prefix=$need_lib_prefix
3258
3259# Do we need a version for libraries?
3260need_version=$need_version
3261
3262# Whether dlopen is supported.
3263dlopen_support=$enable_dlopen
3264
3265# Whether dlopen of programs is supported.
3266dlopen_self=$enable_dlopen_self
3267
3268# Whether dlopen of statically linked programs is supported.
3269dlopen_self_static=$enable_dlopen_self_static
3270
3271# Compiler flag to prevent dynamic linking.
3272link_static_flag=$lt_link_static_flag
3273
3274# Compiler flag to turn off builtin functions.
3275no_builtin_flag=$lt_no_builtin_flag
3276
3277# Compiler flag to allow reflexive dlopens.
3278export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3279
3280# Compiler flag to generate shared objects directly from archives.
3281whole_archive_flag_spec=$lt_whole_archive_flag_spec
3282
3283# Compiler flag to generate thread-safe objects.
3284thread_safe_flag_spec=$lt_thread_safe_flag_spec
3285
3286# Library versioning type.
3287version_type=$version_type
3288
3289# Format of library name prefix.
3290libname_spec=$lt_libname_spec
3291
3292# List of archive names.  First name is the real one, the rest are links.
3293# The last name is the one that the linker finds with -lNAME.
3294library_names_spec=$lt_library_names_spec
3295
3296# The coded name of the library, if different from the real name.
3297soname_spec=$lt_soname_spec
3298
3299# Commands used to build and install an old-style archive.
3300RANLIB=$lt_RANLIB
3301old_archive_cmds=$lt_old_archive_cmds
3302old_postinstall_cmds=$lt_old_postinstall_cmds
3303old_postuninstall_cmds=$lt_old_postuninstall_cmds
3304
3305# Create an old-style archive from a shared archive.
3306old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3307
3308# Create a temporary old-style archive to link instead of a shared archive.
3309old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3310
3311# Commands used to build and install a shared archive.
3312archive_cmds=$lt_archive_cmds
3313archive_expsym_cmds=$lt_archive_expsym_cmds
3314postinstall_cmds=$lt_postinstall_cmds
3315postuninstall_cmds=$lt_postuninstall_cmds
3316
3317# Commands to strip libraries.
3318old_striplib=$lt_old_striplib
3319striplib=$lt_striplib
3320
3321# Method to check whether dependent libraries are shared objects.
3322deplibs_check_method=$lt_deplibs_check_method
3323
3324# Command to use when deplibs_check_method == file_magic.
3325file_magic_cmd=$lt_file_magic_cmd
3326
3327# Flag that allows shared libraries with undefined symbols to be built.
3328allow_undefined_flag=$lt_allow_undefined_flag
3329
3330# Flag that forces no undefined symbols.
3331no_undefined_flag=$lt_no_undefined_flag
3332
3333# Commands used to finish a libtool library installation in a directory.
3334finish_cmds=$lt_finish_cmds
3335
3336# Same as above, but a single script fragment to be evaled but not shown.
3337finish_eval=$lt_finish_eval
3338
3339# Take the output of nm and produce a listing of raw symbols and C names.
3340global_symbol_pipe=$lt_global_symbol_pipe
3341
3342# Transform the output of nm in a proper C declaration
3343global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3344
3345# Transform the output of nm in a C name address pair
3346global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3347
3348# This is the shared library runtime path variable.
3349runpath_var=$runpath_var
3350
3351# This is the shared library path variable.
3352shlibpath_var=$shlibpath_var
3353
3354# Is shlibpath searched before the hard-coded library search path?
3355shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3356
3357# How to hardcode a shared library path into an executable.
3358hardcode_action=$hardcode_action
3359
3360# Whether we should hardcode library paths into libraries.
3361hardcode_into_libs=$hardcode_into_libs
3362
3363# Flag to hardcode \$libdir into a binary during linking.
3364# This must work even if \$libdir does not exist.
3365hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3366
3367# Whether we need a single -rpath flag with a separated argument.
3368hardcode_libdir_separator=$lt_hardcode_libdir_separator
3369
3370# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3371# resulting binary.
3372hardcode_direct=$hardcode_direct
3373
3374# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3375# resulting binary.
3376hardcode_minus_L=$hardcode_minus_L
3377
3378# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3379# the resulting binary.
3380hardcode_shlibpath_var=$hardcode_shlibpath_var
3381
3382# Variables whose values should be saved in libtool wrapper scripts and
3383# restored at relink time.
3384variables_saved_for_relink="$variables_saved_for_relink"
3385
3386# Whether libtool must link a program against all its dependency libraries.
3387link_all_deplibs=$link_all_deplibs
3388
3389# Compile-time system search path for libraries
3390sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3391
3392# Run-time system search path for libraries
3393sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3394
3395# Fix the shell variable \$srcfile for the compiler.
3396fix_srcfile_path="$fix_srcfile_path"
3397
3398# Set to yes if exported symbols are required.
3399always_export_symbols=$always_export_symbols
3400
3401# The commands to list exported symbols.
3402export_symbols_cmds=$lt_export_symbols_cmds
3403
3404# The commands to extract the exported symbol list from a shared archive.
3405extract_expsyms_cmds=$lt_extract_expsyms_cmds
3406
3407# Symbols that should not be listed in the preloaded symbols.
3408exclude_expsyms=$lt_exclude_expsyms
3409
3410# Symbols that must always be exported.
3411include_expsyms=$lt_include_expsyms
3412
3413# ### END LIBTOOL CONFIG
3414
3415__EOF__
3416
3417  case $host_os in
3418  aix3*)
3419    cat <<\EOF >> "${ofile}T"
3420
3421# AIX sometimes has problems with the GCC collect2 program.  For some
3422# reason, if we set the COLLECT_NAMES environment variable, the problems
3423# vanish in a puff of smoke.
3424if test "X${COLLECT_NAMES+set}" != Xset; then
3425  COLLECT_NAMES=
3426  export COLLECT_NAMES
3427fi
3428EOF
3429    ;;
3430  esac
3431
3432  case $host_os in
3433  cygwin* | mingw* | pw32* | os2*)
3434    cat <<'EOF' >> "${ofile}T"
3435      # This is a source program that is used to create dlls on Windows
3436      # Don't remove nor modify the starting and closing comments
3437# /* ltdll.c starts here */
3438# #define WIN32_LEAN_AND_MEAN
3439# #include <windows.h>
3440# #undef WIN32_LEAN_AND_MEAN
3441# #include <stdio.h>
3442#
3443# #ifndef __CYGWIN__
3444# #  ifdef __CYGWIN32__
3445# #    define __CYGWIN__ __CYGWIN32__
3446# #  endif
3447# #endif
3448#
3449# #ifdef __cplusplus
3450# extern "C" {
3451# #endif
3452# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3453# #ifdef __cplusplus
3454# }
3455# #endif
3456#
3457# #ifdef __CYGWIN__
3458# #include <cygwin/cygwin_dll.h>
3459# DECLARE_CYGWIN_DLL( DllMain );
3460# #endif
3461# HINSTANCE __hDllInstance_base;
3462#
3463# BOOL APIENTRY
3464# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3465# {
3466#   __hDllInstance_base = hInst;
3467#   return TRUE;
3468# }
3469# /* ltdll.c ends here */
3470        # This is a source program that is used to create import libraries
3471        # on Windows for dlls which lack them. Don't remove nor modify the
3472        # starting and closing comments
3473# /* impgen.c starts here */
3474# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3475#
3476#  This file is part of GNU libtool.
3477#
3478#  This program is free software; you can redistribute it and/or modify
3479#  it under the terms of the GNU General Public License as published by
3480#  the Free Software Foundation; either version 2 of the License, or
3481#  (at your option) any later version.
3482#
3483#  This program is distributed in the hope that it will be useful,
3484#  but WITHOUT ANY WARRANTY; without even the implied warranty of
3485#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3486#  GNU General Public License for more details.
3487#
3488#  You should have received a copy of the GNU General Public License
3489#  along with this program; if not, write to the Free Software
3490#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3491#  */
3492#
3493# #include <stdio.h>            /* for printf() */
3494# #include <unistd.h>           /* for open(), lseek(), read() */
3495# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3496# #include <string.h>           /* for strdup() */
3497#
3498# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3499# #ifndef O_BINARY
3500# #define O_BINARY 0
3501# #endif
3502#
3503# static unsigned int
3504# pe_get16 (fd, offset)
3505#      int fd;
3506#      int offset;
3507# {
3508#   unsigned char b[2];
3509#   lseek (fd, offset, SEEK_SET);
3510#   read (fd, b, 2);
3511#   return b[0] + (b[1]<<8);
3512# }
3513#
3514# static unsigned int
3515# pe_get32 (fd, offset)
3516#     int fd;
3517#     int offset;
3518# {
3519#   unsigned char b[4];
3520#   lseek (fd, offset, SEEK_SET);
3521#   read (fd, b, 4);
3522#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3523# }
3524#
3525# static unsigned int
3526# pe_as32 (ptr)
3527#      void *ptr;
3528# {
3529#   unsigned char *b = ptr;
3530#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3531# }
3532#
3533# int
3534# main (argc, argv)
3535#     int argc;
3536#     char *argv[];
3537# {
3538#     int dll;
3539#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3540#     unsigned long export_rva, export_size, nsections, secptr, expptr;
3541#     unsigned long name_rvas, nexp;
3542#     unsigned char *expdata, *erva;
3543#     char *filename, *dll_name;
3544#
3545#     filename = argv[1];
3546#
3547#     dll = open(filename, O_RDONLY|O_BINARY);
3548#     if (dll < 1)
3549#       return 1;
3550#
3551#     dll_name = filename;
3552#
3553#     for (i=0; filename[i]; i++)
3554#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3555#           dll_name = filename + i +1;
3556#
3557#     pe_header_offset = pe_get32 (dll, 0x3c);
3558#     opthdr_ofs = pe_header_offset + 4 + 20;
3559#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3560#
3561#     if (num_entries < 1) /* no exports */
3562#       return 1;
3563#
3564#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3565#     export_size = pe_get32 (dll, opthdr_ofs + 100);
3566#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3567#     secptr = (pe_header_offset + 4 + 20 +
3568#             pe_get16 (dll, pe_header_offset + 4 + 16));
3569#
3570#     expptr = 0;
3571#     for (i = 0; i < nsections; i++)
3572#     {
3573#       char sname[8];
3574#       unsigned long secptr1 = secptr + 40 * i;
3575#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3576#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3577#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3578#       lseek(dll, secptr1, SEEK_SET);
3579#       read(dll, sname, 8);
3580#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3581#       {
3582#           expptr = fptr + (export_rva - vaddr);
3583#           if (export_rva + export_size > vaddr + vsize)
3584#               export_size = vsize - (export_rva - vaddr);
3585#           break;
3586#       }
3587#     }
3588#
3589#     expdata = (unsigned char*)malloc(export_size);
3590#     lseek (dll, expptr, SEEK_SET);
3591#     read (dll, expdata, export_size);
3592#     erva = expdata - export_rva;
3593#
3594#     nexp = pe_as32 (expdata+24);
3595#     name_rvas = pe_as32 (expdata+32);
3596#
3597#     printf ("EXPORTS\n");
3598#     for (i = 0; i<nexp; i++)
3599#     {
3600#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3601#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3602#     }
3603#
3604#     return 0;
3605# }
3606# /* impgen.c ends here */
3607
3608EOF
3609    ;;
3610  esac
3611
3612  # We use sed instead of cat because bash on DJGPP gets confused if
3613  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3614  # text mode, it properly converts lines to CR/LF.  This bash problem
3615  # is reportedly fixed, but why not run on old versions too?
3616  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3617
3618  mv -f "${ofile}T" "$ofile" || \
3619    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3620  chmod +x "$ofile"
3621fi
3622
3623])# _LT_AC_LTCONFIG_HACK
3624
3625# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3626AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3627
3628# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3629AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3630
3631# AC_ENABLE_SHARED - implement the --enable-shared flag
3632# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3633#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3634#   `yes'.
3635AC_DEFUN([AC_ENABLE_SHARED],
3636[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3637AC_ARG_ENABLE(shared,
3638changequote(<<, >>)dnl
3639<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3640changequote([, ])dnl
3641[p=${PACKAGE-default}
3642case $enableval in
3643yes) enable_shared=yes ;;
3644no) enable_shared=no ;;
3645*)
3646  enable_shared=no
3647  # Look at the argument we got.  We use all the common list separators.
3648  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3649  for pkg in $enableval; do
3650    if test "X$pkg" = "X$p"; then
3651      enable_shared=yes
3652    fi
3653  done
3654  IFS="$ac_save_ifs"
3655  ;;
3656esac],
3657enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3658])
3659
3660# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3661AC_DEFUN([AC_DISABLE_SHARED],
3662[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3663AC_ENABLE_SHARED(no)])
3664
3665# AC_ENABLE_STATIC - implement the --enable-static flag
3666# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3667#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3668#   `yes'.
3669AC_DEFUN([AC_ENABLE_STATIC],
3670[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3671AC_ARG_ENABLE(static,
3672changequote(<<, >>)dnl
3673<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3674changequote([, ])dnl
3675[p=${PACKAGE-default}
3676case $enableval in
3677yes) enable_static=yes ;;
3678no) enable_static=no ;;
3679*)
3680  enable_static=no
3681  # Look at the argument we got.  We use all the common list separators.
3682  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3683  for pkg in $enableval; do
3684    if test "X$pkg" = "X$p"; then
3685      enable_static=yes
3686    fi
3687  done
3688  IFS="$ac_save_ifs"
3689  ;;
3690esac],
3691enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3692])
3693
3694# AC_DISABLE_STATIC - set the default static flag to --disable-static
3695AC_DEFUN([AC_DISABLE_STATIC],
3696[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3697AC_ENABLE_STATIC(no)])
3698
3699
3700# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3701# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3702#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3703#   `yes'.
3704AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3705[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3706AC_ARG_ENABLE(fast-install,
3707changequote(<<, >>)dnl
3708<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3709changequote([, ])dnl
3710[p=${PACKAGE-default}
3711case $enableval in
3712yes) enable_fast_install=yes ;;
3713no) enable_fast_install=no ;;
3714*)
3715  enable_fast_install=no
3716  # Look at the argument we got.  We use all the common list separators.
3717  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3718  for pkg in $enableval; do
3719    if test "X$pkg" = "X$p"; then
3720      enable_fast_install=yes
3721    fi
3722  done
3723  IFS="$ac_save_ifs"
3724  ;;
3725esac],
3726enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3727])
3728
3729# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3730AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3731[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3732AC_ENABLE_FAST_INSTALL(no)])
3733
3734# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3735# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3736#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3737#   `both'.
3738AC_DEFUN([AC_LIBTOOL_PICMODE],
3739[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3740pic_mode=ifelse($#,1,$1,default)])
3741
3742
3743# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3744AC_DEFUN([AC_PATH_TOOL_PREFIX],
3745[AC_MSG_CHECKING([for $1])
3746AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3747[case $MAGIC_CMD in
3748  /*)
3749  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3750  ;;
3751  ?:/*)
3752  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3753  ;;
3754  *)
3755  ac_save_MAGIC_CMD="$MAGIC_CMD"
3756  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3757dnl $ac_dummy forces splitting on constant user-supplied paths.
3758dnl POSIX.2 word splitting is done only on the output of word expansions,
3759dnl not every word.  This closes a longstanding sh security hole.
3760  ac_dummy="ifelse([$2], , $PATH, [$2])"
3761  for ac_dir in $ac_dummy; do
3762    test -z "$ac_dir" && ac_dir=.
3763    if test -f $ac_dir/$1; then
3764      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3765      if test -n "$file_magic_test_file"; then
3766        case $deplibs_check_method in
3767        "file_magic "*)
3768          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3769          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3770          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3771            egrep "$file_magic_regex" > /dev/null; then
3772            :
3773          else
3774            cat <<EOF 1>&2
3775
3776*** Warning: the command libtool uses to detect shared libraries,
3777*** $file_magic_cmd, produces output that libtool cannot recognize.
3778*** The result is that libtool may fail to recognize shared libraries
3779*** as such.  This will affect the creation of libtool libraries that
3780*** depend on shared libraries, but programs linked with such libtool
3781*** libraries will work regardless of this problem.  Nevertheless, you
3782*** may want to report the problem to your system manager and/or to
3783*** bug-libtool@gnu.org
3784
3785EOF
3786          fi ;;
3787        esac
3788      fi
3789      break
3790    fi
3791  done
3792  IFS="$ac_save_ifs"
3793  MAGIC_CMD="$ac_save_MAGIC_CMD"
3794  ;;
3795esac])
3796MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3797if test -n "$MAGIC_CMD"; then
3798  AC_MSG_RESULT($MAGIC_CMD)
3799else
3800  AC_MSG_RESULT(no)
3801fi
3802])
3803
3804
3805# AC_PATH_MAGIC - find a file program which can recognise a shared library
3806AC_DEFUN([AC_PATH_MAGIC],
3807[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3808AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3809if test -z "$lt_cv_path_MAGIC_CMD"; then
3810  if test -n "$ac_tool_prefix"; then
3811    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3812  else
3813    MAGIC_CMD=:
3814  fi
3815fi
3816])
3817
3818
3819# AC_PROG_LD - find the path to the GNU or non-GNU linker
3820AC_DEFUN([AC_PROG_LD],
3821[AC_ARG_WITH(gnu-ld,
3822[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
3823test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3824AC_REQUIRE([AC_PROG_CC])dnl
3825AC_REQUIRE([AC_CANONICAL_HOST])dnl
3826AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3827AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3828ac_prog=ld
3829if test "$GCC" = yes; then
3830  # Check if gcc -print-prog-name=ld gives a path.
3831  AC_MSG_CHECKING([for ld used by GCC])
3832  case $host in
3833  *-*-mingw*)
3834    # gcc leaves a trailing carriage return which upsets mingw
3835    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3836  *)
3837    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3838  esac
3839  case $ac_prog in
3840    # Accept absolute paths.
3841    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3842      re_direlt='/[[^/]][[^/]]*/\.\./'
3843      # Canonicalize the path of ld
3844      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3845      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3846        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3847      done
3848      test -z "$LD" && LD="$ac_prog"
3849      ;;
3850  "")
3851    # If it fails, then pretend we aren't using GCC.
3852    ac_prog=ld
3853    ;;
3854  *)
3855    # If it is relative, then search for the first ld in PATH.
3856    with_gnu_ld=unknown
3857    ;;
3858  esac
3859elif test "$with_gnu_ld" = yes; then
3860  AC_MSG_CHECKING([for GNU ld])
3861else
3862  AC_MSG_CHECKING([for non-GNU ld])
3863fi
3864AC_CACHE_VAL(lt_cv_path_LD,
3865[if test -z "$LD"; then
3866  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3867  for ac_dir in $PATH; do
3868    test -z "$ac_dir" && ac_dir=.
3869    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3870      lt_cv_path_LD="$ac_dir/$ac_prog"
3871      # Check to see if the program is GNU ld.  I'd rather use --version,
3872      # but apparently some GNU ld's only accept -v.
3873      # Break only if it was the GNU/non-GNU ld that we prefer.
3874      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3875        test "$with_gnu_ld" != no && break
3876      else
3877        test "$with_gnu_ld" != yes && break
3878      fi
3879    fi
3880  done
3881  IFS="$ac_save_ifs"
3882else
3883  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3884fi])
3885LD="$lt_cv_path_LD"
3886if test -n "$LD"; then
3887  AC_MSG_RESULT($LD)
3888else
3889  AC_MSG_RESULT(no)
3890fi
3891test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3892AC_PROG_LD_GNU
3893])
3894
3895# AC_PROG_LD_GNU -
3896AC_DEFUN([AC_PROG_LD_GNU],
3897[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3898[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3899if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3900  lt_cv_prog_gnu_ld=yes
3901else
3902  lt_cv_prog_gnu_ld=no
3903fi])
3904with_gnu_ld=$lt_cv_prog_gnu_ld
3905])
3906
3907# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3908#   -- PORTME Some linkers may need a different reload flag.
3909AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3910[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3911[lt_cv_ld_reload_flag='-r'])
3912reload_flag=$lt_cv_ld_reload_flag
3913test -n "$reload_flag" && reload_flag=" $reload_flag"
3914])
3915
3916# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3917#  -- PORTME fill in with the dynamic library characteristics
3918AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3919[AC_CACHE_CHECK([how to recognise dependant libraries],
3920lt_cv_deplibs_check_method,
3921[lt_cv_file_magic_cmd='$MAGIC_CMD'
3922lt_cv_file_magic_test_file=
3923lt_cv_deplibs_check_method='unknown'
3924# Need to set the preceding variable on all platforms that support
3925# interlibrary dependencies.
3926# 'none' -- dependencies not supported.
3927# `unknown' -- same as none, but documents that we really don't know.
3928# 'pass_all' -- all dependencies passed with no checks.
3929# 'test_compile' -- check by making test program.
3930# 'file_magic [[regex]]' -- check by looking for files in library path
3931# which responds to the $file_magic_cmd with a given egrep regex.
3932# If you have `file' or equivalent on your system and you're not sure
3933# whether `pass_all' will *always* work, you probably want this one.
3934
3935case $host_os in
3936aix4* | aix5*)
3937  lt_cv_deplibs_check_method=pass_all
3938  ;;
3939
3940beos*)
3941  lt_cv_deplibs_check_method=pass_all
3942  ;;
3943
3944bsdi4*)
3945  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3946  lt_cv_file_magic_cmd='/usr/bin/file -L'
3947  lt_cv_file_magic_test_file=/shlib/libc.so
3948  ;;
3949
3950cygwin* | mingw* | pw32*)
3951  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3952  lt_cv_file_magic_cmd='$OBJDUMP -f'
3953  ;;
3954
3955darwin* | rhapsody*)
3956  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3957  lt_cv_file_magic_cmd='/usr/bin/file -L'
3958  case "$host_os" in
3959  rhapsody* | darwin1.[[012]])
3960    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3961    ;;
3962  *) # Darwin 1.3 on
3963    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3964    ;;
3965  esac
3966  ;;
3967
3968freebsd*)
3969  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3970    case $host_cpu in
3971    i*86 )
3972      # Not sure whether the presence of OpenBSD here was a mistake.
3973      # Let's accept both of them until this is cleared up.
3974      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3975      lt_cv_file_magic_cmd=/usr/bin/file
3976      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3977      ;;
3978    esac
3979  else
3980    lt_cv_deplibs_check_method=pass_all
3981  fi
3982  ;;
3983
3984gnu*)
3985  lt_cv_deplibs_check_method=pass_all
3986  ;;
3987
3988hpux10.20*|hpux11*)
3989  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3990  lt_cv_file_magic_cmd=/usr/bin/file
3991  lt_cv_file_magic_test_file=/usr/lib/libc.sl
3992  ;;
3993
3994irix5* | irix6* | nonstopux*)
3995  case $host_os in
3996  irix5* | nonstopux*)
3997    # this will be overridden with pass_all, but let us keep it just in case
3998    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3999    ;;
4000  *)
4001    case $LD in
4002    *-32|*"-32 ") libmagic=32-bit;;
4003    *-n32|*"-n32 ") libmagic=N32;;
4004    *-64|*"-64 ") libmagic=64-bit;;
4005    *) libmagic=never-match;;
4006    esac
4007    # this will be overridden with pass_all, but let us keep it just in case
4008    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4009    ;;
4010  esac
4011  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4012  lt_cv_deplibs_check_method=pass_all
4013  ;;
4014
4015# This must be Linux ELF.
4016linux-gnu*)
4017  lt_cv_deplibs_check_method=pass_all
4018  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4019  ;;
4020
4021netbsd*)
4022  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4023    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4024  else
4025    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4026  fi
4027  ;;
4028
4029newos6*)
4030  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4031  lt_cv_file_magic_cmd=/usr/bin/file
4032  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4033  ;;
4034
4035openbsd*)
4036  lt_cv_file_magic_cmd=/usr/bin/file
4037  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4038  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4039    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4040  else
4041    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4042  fi
4043  ;;
4044
4045osf3* | osf4* | osf5*)
4046  # this will be overridden with pass_all, but let us keep it just in case
4047  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4048  lt_cv_file_magic_test_file=/shlib/libc.so
4049  lt_cv_deplibs_check_method=pass_all
4050  ;;
4051
4052sco3.2v5*)
4053  lt_cv_deplibs_check_method=pass_all
4054  ;;
4055
4056solaris*)
4057  lt_cv_deplibs_check_method=pass_all
4058  lt_cv_file_magic_test_file=/lib/libc.so
4059  ;;
4060
4061sysv5uw[[78]]* | sysv4*uw2*)
4062  lt_cv_deplibs_check_method=pass_all
4063  ;;
4064
4065sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4066  case $host_vendor in
4067  motorola)
4068    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]]'
4069    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4070    ;;
4071  ncr)
4072    lt_cv_deplibs_check_method=pass_all
4073    ;;
4074  sequent)
4075    lt_cv_file_magic_cmd='/bin/file'
4076    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4077    ;;
4078  sni)
4079    lt_cv_file_magic_cmd='/bin/file'
4080    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4081    lt_cv_file_magic_test_file=/lib/libc.so
4082    ;;
4083  esac
4084  ;;
4085esac
4086])
4087file_magic_cmd=$lt_cv_file_magic_cmd
4088deplibs_check_method=$lt_cv_deplibs_check_method
4089])
4090
4091
4092# AC_PROG_NM - find the path to a BSD-compatible name lister
4093AC_DEFUN([AC_PROG_NM],
4094[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4095AC_MSG_CHECKING([for BSD-compatible nm])
4096AC_CACHE_VAL(lt_cv_path_NM,
4097[if test -n "$NM"; then
4098  # Let the user override the test.
4099  lt_cv_path_NM="$NM"
4100else
4101  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4102  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4103    test -z "$ac_dir" && ac_dir=.
4104    tmp_nm=$ac_dir/${ac_tool_prefix}nm
4105    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4106      # Check to see if the nm accepts a BSD-compat flag.
4107      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4108      #   nm: unknown option "B" ignored
4109      # Tru64's nm complains that /dev/null is an invalid object file
4110      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4111        lt_cv_path_NM="$tmp_nm -B"
4112        break
4113      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4114        lt_cv_path_NM="$tmp_nm -p"
4115        break
4116      else
4117        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4118        continue # so that we can try to find one that supports BSD flags
4119      fi
4120    fi
4121  done
4122  IFS="$ac_save_ifs"
4123  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4124fi])
4125NM="$lt_cv_path_NM"
4126AC_MSG_RESULT([$NM])
4127])
4128
4129# AC_CHECK_LIBM - check for math library
4130AC_DEFUN([AC_CHECK_LIBM],
4131[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4132LIBM=
4133case $host in
4134*-*-beos* | *-*-cygwin* | *-*-pw32*)
4135  # These system don't have libm
4136  ;;
4137*-ncr-sysv4.3*)
4138  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4139  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4140  ;;
4141*)
4142  AC_CHECK_LIB(m, main, LIBM="-lm")
4143  ;;
4144esac
4145])
4146
4147# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4148# the libltdl convenience library and LTDLINCL to the include flags for
4149# the libltdl header and adds --enable-ltdl-convenience to the
4150# configure arguments.  Note that LIBLTDL and LTDLINCL are not
4151# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4152# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4153# with '${top_builddir}/' and LTDLINCL will be prefixed with
4154# '${top_srcdir}/' (note the single quotes!).  If your package is not
4155# flat and you're not using automake, define top_builddir and
4156# top_srcdir appropriately in the Makefiles.
4157AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4158[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4159  case $enable_ltdl_convenience in
4160  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4161  "") enable_ltdl_convenience=yes
4162      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4163  esac
4164  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4165  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4166  # For backwards non-gettext consistent compatibility...
4167  INCLTDL="$LTDLINCL"
4168])
4169
4170# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4171# the libltdl installable library and LTDLINCL to the include flags for
4172# the libltdl header and adds --enable-ltdl-install to the configure
4173# arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4174# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4175# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4176# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4177# with '${top_srcdir}/' (note the single quotes!).  If your package is
4178# not flat and you're not using automake, define top_builddir and
4179# top_srcdir appropriately in the Makefiles.
4180# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4181AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4182[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4183  AC_CHECK_LIB(ltdl, main,
4184  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4185  [if test x"$enable_ltdl_install" = xno; then
4186     AC_MSG_WARN([libltdl not installed, but installation disabled])
4187   else
4188     enable_ltdl_install=yes
4189   fi
4190  ])
4191  if test x"$enable_ltdl_install" = x"yes"; then
4192    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4193    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4194    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4195  else
4196    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4197    LIBLTDL="-lltdl"
4198    LTDLINCL=
4199  fi
4200  # For backwards non-gettext consistent compatibility...
4201  INCLTDL="$LTDLINCL"
4202])
4203
4204# old names
4205AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4206AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4207AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4208AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4209AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4210AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4211AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4212
4213# This is just to silence aclocal about the macro not being used
4214ifelse([AC_DISABLE_FAST_INSTALL])
4215
4216dnl AM_GCONF_SOURCE_2
4217dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
4218dnl  (i.e. pass to gconftool-2
4219dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
4220dnl  you should install foo.schemas files
4221dnl
4222
4223AC_DEFUN(AM_GCONF_SOURCE_2,
4224[
4225  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
4226    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
4227  else
4228    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
4229  fi
4230
4231  AC_ARG_WITH(gconf-source,
4232  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
4233
4234  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
4235  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
4236
4237  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
4238    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/'
4239  else
4240    GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR
4241  fi
4242
4243  AC_ARG_WITH(gconf-schema-file-dir,
4244  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
4245
4246  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
4247  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
4248
4249  AC_ARG_ENABLE(schemas-install,
4250     [  --disable-schemas-install       Disable the schemas installation],
4251     [case "${enableval}" in
4252       yes) schemas_install=true ;;
4253       no)  schemas_install=false ;;
4254       *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
4255     esac],[schemas_install=true])
4256     AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
4257])
4258
4259dnl
4260dnl GNOME_PLATFORM_GNOME_2(default, [force])
4261dnl
4262dnl   If the first parameter is `yes', then the default is
4263dnl   the GNOME 2.x platform, otherwise the GNOME 1.x one.
4264dnl
4265dnl   If the optional second parameter is `force', then use
4266dnl   the default value without command line argument.
4267dnl
4268
4269AC_DEFUN([GNOME_PLATFORM_GNOME_2],[
4270        AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG])
4271
4272        if test x$1 = xyes ; then
4273            platform_gnome_2_default=yes
4274        else
4275            platform_gnome_2_default=no
4276        fi
4277        if test x$2 = xforce ; then
4278            platform_gnome_2="$platform_gnome_2_default";
4279        else
4280            AC_ARG_ENABLE(platform-gnome-2, [  --enable-platform-gnome-2 enable GNOME 2.x platform [default=no]],[platform_gnome_2="$enableval"],[platform_gnome_2="$platform_gnome_2_default"])
4281        fi
4282
4283        AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
4284
4285        AC_MSG_CHECKING(for GNOME Platform)
4286        if test $platform_gnome_2 = yes; then
4287            AC_MSG_RESULT(GNOME 2.x)
4288            GNOME_INTERFACE_VERSION=2
4289            GNOME_REQUIRE_PKGCONFIG
4290        else
4291            AC_MSG_RESULT(GNOME 1.x)
4292            GNOME_INTERFACE_VERSION=1
4293        fi
4294        AC_SUBST(GNOME_INTERFACE_VERSION)
4295])
4296
4297dnl
4298dnl GNOME_CHECK_PKGCONFIG (script-if-enabled, [failflag])
4299dnl
4300AC_DEFUN([GNOME_CHECK_PKGCONFIG],[
4301        AC_PATH_PROG(PKG_CONFIG, pkg-config)
4302        have_pkgconfig=no
4303        if test -x "$PKG_CONFIG" ; then
4304            have_pkgconfig=yes
4305        else
4306            PKG_CONFIG=
4307        fi
4308        AC_MSG_CHECKING(for pkg-config)
4309        pkgconfig_required_version=0.8.0
4310        if test x$have_pkgconfig = xyes ; then
4311            $PKG_CONFIG --atleast-pkgconfig-version $pkgconfig_required_version
4312            if test $? -ne 0; then
4313                echo "*** Your version of pkg-config is too old. You need version $pkgconfig_required_version or newer."
4314                echo "*** See http://www.freedesktop.org/software/pkgconfig"
4315                have_pkgconfig=no
4316            fi
4317        fi
4318        if test x$have_pkgconfig = xyes ; then
4319            AC_MSG_RESULT(yes)
4320        else
4321            PKG_CONFIG=
4322            AC_MSG_RESULT(not found)
4323            if test x$2 = xfail; then
4324                AC_MSG_ERROR([
4325*** You need the latest pkg-config (at least $pkgconfig_required_version).
4326*** Get the latest version of pkg-config from
4327*** http://www.freedesktop.org/software/pkgconfig.])
4328            fi
4329        fi
4330        AC_SUBST(PKG_CONFIG)
4331
4332        AC_PROVIDE([GNOME_REQUIRE_PKGCONFIG])
4333])
4334
4335dnl
4336dnl GNOME_REQUIRE_PKGCONFIG
4337dnl
4338AC_DEFUN([GNOME_REQUIRE_PKGCONFIG],[
4339        GNOME_CHECK_PKGCONFIG([], fail)
4340])
4341
4342
4343dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4344dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4345dnl also defines GSTUFF_PKG_ERRORS on error
4346AC_DEFUN(PKG_CHECK_MODULES, [
4347  succeeded=no
4348
4349  if test -z "$PKG_CONFIG"; then
4350    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
4351  fi
4352
4353  if test "$PKG_CONFIG" = "no" ; then
4354     echo "*** The pkg-config script could not be found. Make sure it is"
4355     echo "*** in your path, or set the PKG_CONFIG environment variable"
4356     echo "*** to the full path to pkg-config."
4357     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
4358  else
4359     PKG_CONFIG_MIN_VERSION=0.9.0
4360     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
4361        AC_MSG_CHECKING(for $2)
4362
4363        if $PKG_CONFIG --exists "$2" ; then
4364            AC_MSG_RESULT(yes)
4365            succeeded=yes
4366
4367            AC_MSG_CHECKING($1_CFLAGS)
4368            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
4369            AC_MSG_RESULT($$1_CFLAGS)
4370
4371            AC_MSG_CHECKING($1_LIBS)
4372            $1_LIBS=`$PKG_CONFIG --libs "$2"`
4373            AC_MSG_RESULT($$1_LIBS)
4374        else
4375            $1_CFLAGS=""
4376            $1_LIBS=""
4377            ## If we have a custom action on failure, don't print errors, but
4378            ## do set a variable so people can do so.
4379            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4380            ifelse([$4], ,echo $$1_PKG_ERRORS,)
4381        fi
4382
4383        AC_SUBST($1_CFLAGS)
4384        AC_SUBST($1_LIBS)
4385     else
4386        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
4387        echo "*** See http://www.freedesktop.org/software/pkgconfig"
4388     fi
4389  fi
4390
4391  if test $succeeded = yes; then
4392     ifelse([$3], , :, [$3])
4393  else
4394     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
4395  fi
4396])
4397
4398
4399
4400# Macro to add for using GNU gettext.
4401# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
4402#
4403# Modified to never use included libintl.
4404# Owen Taylor <otaylor@redhat.com>, 12/15/1998
4405#
4406# Major rework to remove unused code
4407# Owen Taylor <otaylor@redhat.com>, 12/11/2002
4408#
4409# This file can be copied and used freely without restrictions.  It can
4410# be used in projects which are not available under the GNU Public License
4411# but which still want to provide support for the GNU gettext functionality.
4412#
4413
4414#
4415# We need this here as well, since someone might use autoconf-2.5x
4416# to configure GLib then an older version to configure a package
4417# using AM_GLIB_GNU_GETTEXT
4418AC_PREREQ(2.53)
4419
4420dnl
4421dnl We go to great lengths to make sure that aclocal won't
4422dnl try to pull in the installed version of these macros
4423dnl when running aclocal in the glib directory.
4424dnl
4425m4_copy([AC_DEFUN],[glib_DEFUN])
4426m4_copy([AC_REQUIRE],[glib_REQUIRE])
4427dnl
4428dnl At the end, if we're not within glib, we'll define the public
4429dnl definitions in terms of our private definitions.
4430dnl
4431
4432# GLIB_LC_MESSAGES
4433#--------------------
4434glib_DEFUN([GLIB_LC_MESSAGES],
4435  [AC_CHECK_HEADERS([locale.h])
4436    if test $ac_cv_header_locale_h = yes; then
4437    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
4438      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
4439       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
4440    if test $am_cv_val_LC_MESSAGES = yes; then
4441      AC_DEFINE(HAVE_LC_MESSAGES, 1,
4442        [Define if your <locale.h> file defines LC_MESSAGES.])
4443    fi
4444  fi])
4445
4446# GLIB_PATH_PROG_WITH_TEST
4447#----------------------------
4448dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
4449dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
4450glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
4451[# Extract the first word of "$2", so it can be a program name with args.
4452set dummy $2; ac_word=[$]2
4453AC_MSG_CHECKING([for $ac_word])
4454AC_CACHE_VAL(ac_cv_path_$1,
4455[case "[$]$1" in
4456  /*)
4457  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4461  for ac_dir in ifelse([$5], , $PATH, [$5]); do
4462    test -z "$ac_dir" && ac_dir=.
4463    if test -f $ac_dir/$ac_word; then
4464      if [$3]; then
4465        ac_cv_path_$1="$ac_dir/$ac_word"
4466        break
4467      fi
4468    fi
4469  done
4470  IFS="$ac_save_ifs"
4471dnl If no 4th arg is given, leave the cache variable unset,
4472dnl so AC_PATH_PROGS will keep looking.
4473ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
4474])dnl
4475  ;;
4476esac])dnl
4477$1="$ac_cv_path_$1"
4478if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
4479  AC_MSG_RESULT([$]$1)
4480else
4481  AC_MSG_RESULT(no)
4482fi
4483AC_SUBST($1)dnl
4484])
4485
4486# GLIB_WITH_NLS
4487#-----------------
4488glib_DEFUN([GLIB_WITH_NLS],
4489  dnl NLS is obligatory
4490  [USE_NLS=yes
4491    AC_SUBST(USE_NLS)
4492
4493    gt_cv_have_gettext=no
4494
4495    CATOBJEXT=NONE
4496    XGETTEXT=:
4497    INTLLIBS=
4498
4499    AC_CHECK_HEADER(libintl.h,
4500     [gt_cv_func_dgettext_libintl="no"
4501      libintl_extra_libs=""
4502
4503      #
4504      # First check in libc
4505      #
4506      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
4507        [AC_TRY_LINK([
4508#include <libintl.h>
4509],
4510          [return (int) dgettext ("","")],
4511          gt_cv_func_dgettext_libc=yes,
4512          gt_cv_func_dgettext_libc=no)
4513        ])
4514 
4515      if test "$gt_cv_func_dgettext_libc" = "yes" ; then
4516        AC_CHECK_FUNCS(bind_textdomain_codeset)
4517      fi
4518
4519      #
4520      # If we don't have everything we want, check in libintl
4521      #
4522      if test "$gt_cv_func_dgettext_libc" != "yes" \
4523         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
4524       
4525        AC_CHECK_LIB(intl, bindtextdomain,
4526            [AC_CHECK_LIB(intl, dgettext,
4527                          gt_cv_func_dgettext_libintl=yes)])
4528
4529        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
4530          AC_MSG_CHECKING([if -liconv is needed to use gettext])
4531          AC_MSG_RESULT([])
4532          AC_CHECK_LIB(intl, dcgettext,
4533                       [gt_cv_func_dgettext_libintl=yes
4534                        libintl_extra_libs=-liconv],
4535                        :,-liconv)
4536        fi
4537
4538        #
4539        # If we found libintl, then check in it for bind_textdomain_codeset();
4540        # we'll prefer libc if neither have bind_textdomain_codeset(),
4541        # and both have dgettext
4542        #
4543        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
4544          glib_save_LIBS="$LIBS"
4545          LIBS="$LIBS -lintl $libintl_extra_libs"
4546          unset ac_cv_func_bind_textdomain_codeset
4547          AC_CHECK_FUNCS(bind_textdomain_codeset)
4548          LIBS="$glib_save_LIBS"
4549
4550          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
4551            gt_cv_func_dgettext_libc=no
4552          else
4553            if test "$gt_cv_func_dgettext_libc" = "yes"; then
4554              gt_cv_func_dgettext_libintl=no
4555            fi
4556          fi
4557        fi
4558      fi
4559
4560      if test "$gt_cv_func_dgettext_libc" = "yes" \
4561        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
4562        gt_cv_have_gettext=yes
4563      fi
4564 
4565      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
4566        INTLLIBS="-lintl $libintl_extra_libs"
4567      fi
4568 
4569      if test "$gt_cv_have_gettext" = "yes"; then
4570        AC_DEFINE(HAVE_GETTEXT,1,
4571          [Define if the GNU gettext() function is already present or preinstalled.])
4572        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4573          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
4574        if test "$MSGFMT" != "no"; then
4575          AC_CHECK_FUNCS(dcgettext)
4576          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4577          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4578            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
4579          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
4580                         return _nl_msg_cat_cntr],
4581            [CATOBJEXT=.gmo
4582             DATADIRNAME=share],
4583            [CATOBJEXT=.mo
4584             DATADIRNAME=lib])
4585          INSTOBJEXT=.mo
4586        fi
4587      fi
4588    ])
4589
4590    if test "$gt_cv_have_gettext" = "yes" ; then
4591      AC_DEFINE(ENABLE_NLS, 1,
4592        [always defined to indicate that i18n is enabled])
4593    fi
4594
4595    dnl Test whether we really found GNU xgettext.
4596    if test "$XGETTEXT" != ":"; then
4597      dnl If it is not GNU xgettext we define it as : so that the
4598      dnl Makefiles still can work.
4599      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4600        : ;
4601      else
4602        AC_MSG_RESULT(
4603          [found xgettext program is not GNU xgettext; ignore it])
4604        XGETTEXT=":"
4605      fi
4606    fi
4607
4608    # We need to process the po/ directory.
4609    POSUB=po
4610
4611    AC_OUTPUT_COMMANDS(
4612      [case "$CONFIG_FILES" in *po/Makefile.in*)
4613        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
4614      esac])
4615
4616    dnl These rules are solely for the distribution goal.  While doing this
4617    dnl we only have to keep exactly one list of the available catalogs
4618    dnl in configure.in.
4619    for lang in $ALL_LINGUAS; do
4620      GMOFILES="$GMOFILES $lang.gmo"
4621      POFILES="$POFILES $lang.po"
4622    done
4623
4624    dnl Make all variables we use known to autoconf.
4625    AC_SUBST(CATALOGS)
4626    AC_SUBST(CATOBJEXT)
4627    AC_SUBST(DATADIRNAME)
4628    AC_SUBST(GMOFILES)
4629    AC_SUBST(INSTOBJEXT)
4630    AC_SUBST(INTLLIBS)
4631    AC_SUBST(PO_IN_DATADIR_TRUE)
4632    AC_SUBST(PO_IN_DATADIR_FALSE)
4633    AC_SUBST(POFILES)
4634    AC_SUBST(POSUB)
4635  ])
4636
4637# AM_GLIB_GNU_GETTEXT
4638# -------------------
4639# Do checks necessary for use of gettext. If a suitable implementation
4640# of gettext is found in either in libintl or in the C library,
4641# it will set INTLLIBS to the libraries needed for use of gettext
4642# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
4643# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
4644# on various variables needed by the Makefile.in.in installed by
4645# glib-gettextize.
4646dnl
4647glib_DEFUN(GLIB_GNU_GETTEXT,
4648  [AC_REQUIRE([AC_PROG_CC])dnl
4649   AC_REQUIRE([AC_HEADER_STDC])dnl
4650   
4651   GLIB_LC_MESSAGES
4652   GLIB_WITH_NLS
4653
4654   if test "$gt_cv_have_gettext" = "yes"; then
4655     if test "x$ALL_LINGUAS" = "x"; then
4656       LINGUAS=
4657     else
4658       AC_MSG_CHECKING(for catalogs to be installed)
4659       NEW_LINGUAS=
4660       for lang in ${LINGUAS=$ALL_LINGUAS}; do
4661         case "$ALL_LINGUAS" in
4662          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4663         esac
4664       done
4665       LINGUAS=$NEW_LINGUAS
4666       AC_MSG_RESULT($LINGUAS)
4667     fi
4668
4669     dnl Construct list of names of catalog files to be constructed.
4670     if test -n "$LINGUAS"; then
4671       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4672     fi
4673   fi
4674
4675   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4676   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
4677   dnl Try to locate is.
4678   MKINSTALLDIRS=
4679   if test -n "$ac_aux_dir"; then
4680     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4681   fi
4682   if test -z "$MKINSTALLDIRS"; then
4683     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4684   fi
4685   AC_SUBST(MKINSTALLDIRS)
4686
4687   dnl Generate list of files to be processed by xgettext which will
4688   dnl be included in po/Makefile.
4689   test -d po || mkdir po
4690   if test "x$srcdir" != "x."; then
4691     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4692       posrcprefix="$srcdir/"
4693     else
4694       posrcprefix="../$srcdir/"
4695     fi
4696   else
4697     posrcprefix="../"
4698   fi
4699   rm -f po/POTFILES
4700   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4701        < $srcdir/po/POTFILES.in > po/POTFILES
4702  ])
4703
4704# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
4705# -------------------------------
4706# Define VARIABLE to the location where catalog files will
4707# be installed by po/Makefile.
4708glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
4709[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
4710glib_save_prefix="$prefix"
4711test "x$prefix" = xNONE && prefix=$ac_default_prefix
4712if test "x$CATOBJEXT" = "x.mo" ; then
4713  localedir=`eval echo "${libdir}/locale"`
4714else
4715  localedir=`eval echo "${datadir}/locale"`
4716fi
4717prefix="$glib_save_prefix"
4718AC_DEFINE_UNQUOTED($1, "$localedir",
4719  [Define the location where the catalogs will be installed])
4720])
4721
4722dnl
4723dnl Now the definitions that aclocal will find
4724dnl
4725ifdef(glib_configure_in,[],[
4726AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
4727AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
4728])dnl
4729
Note: See TracBrowser for help on using the repository browser.