source: trunk/third/gal/aclocal.m4 @ 19024

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