source: trunk/third/librsvg/aclocal.m4 @ 18275

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