source: trunk/third/metacity/aclocal.m4 @ 18829

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