source: trunk/third/gdk-pixbuf/aclocal.m4 @ 19166

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