Develop and Download Open Source Software

Browse CVS Repository

Annotation of /malonnote/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.9 - (hide annotations) (download)
Wed Dec 28 01:49:51 2005 UTC (18 years, 2 months ago) by maloninc
Branch: MAIN
CVS Tags: dev_1_6-0002
Changes since 1.8: +923 -0 lines
for WebKitCtrl

1 maloninc 1.1 # generated automatically by aclocal 1.9.5 -*- Autoconf -*-
2    
3     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4     # 2005 Free Software Foundation, Inc.
5     # This file is free software; the Free Software Foundation
6     # gives unlimited permission to copy and/or distribute it,
7     # with or without modifications, as long as this notice is preserved.
8    
9     # This program is distributed in the hope that it will be useful,
10     # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11     # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12     # PARTICULAR PURPOSE.
13    
14     # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
15     #
16     # This file is free software; the Free Software Foundation
17     # gives unlimited permission to copy and/or distribute it,
18     # with or without modifications, as long as this notice is preserved.
19    
20     # AM_AUTOMAKE_VERSION(VERSION)
21     # ----------------------------
22     # Automake X.Y traces this macro to ensure aclocal.m4 has been
23     # generated from the m4 files accompanying Automake X.Y.
24     AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
25    
26     # AM_SET_CURRENT_AUTOMAKE_VERSION
27     # -------------------------------
28     # Call AM_AUTOMAKE_VERSION so it can be traced.
29     # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30     AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31     [AM_AUTOMAKE_VERSION([1.9.5])])
32    
33     # AM_AUX_DIR_EXPAND -*- Autoconf -*-
34    
35     # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
36     #
37     # This file is free software; the Free Software Foundation
38     # gives unlimited permission to copy and/or distribute it,
39     # with or without modifications, as long as this notice is preserved.
40    
41     # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42     # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
43     # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
44     #
45     # Of course, Automake must honor this variable whenever it calls a
46     # tool from the auxiliary directory. The problem is that $srcdir (and
47     # therefore $ac_aux_dir as well) can be either absolute or relative,
48     # depending on how configure is run. This is pretty annoying, since
49     # it makes $ac_aux_dir quite unusable in subdirectories: in the top
50     # source directory, any form will work fine, but in subdirectories a
51     # relative path needs to be adjusted first.
52     #
53     # $ac_aux_dir/missing
54     # fails when called from a subdirectory if $ac_aux_dir is relative
55     # $top_srcdir/$ac_aux_dir/missing
56     # fails if $ac_aux_dir is absolute,
57     # fails when called from a subdirectory in a VPATH build with
58     # a relative $ac_aux_dir
59     #
60     # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61     # are both prefixed by $srcdir. In an in-source build this is usually
62     # harmless because $srcdir is `.', but things will broke when you
63     # start a VPATH build or use an absolute $srcdir.
64     #
65     # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66     # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
67     # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68     # and then we would define $MISSING as
69     # MISSING="\${SHELL} $am_aux_dir/missing"
70     # This will work as long as MISSING is not called from configure, because
71     # unfortunately $(top_srcdir) has no meaning in configure.
72     # However there are other variables, like CC, which are often used in
73     # configure, and could therefore not use this "fixed" $ac_aux_dir.
74     #
75     # Another solution, used here, is to always expand $ac_aux_dir to an
76     # absolute PATH. The drawback is that using absolute paths prevent a
77     # configured tree to be moved without reconfiguration.
78    
79     AC_DEFUN([AM_AUX_DIR_EXPAND],
80     [dnl Rely on autoconf to set up CDPATH properly.
81     AC_PREREQ([2.50])dnl
82     # expand $ac_aux_dir to an absolute path
83     am_aux_dir=`cd $ac_aux_dir && pwd`
84     ])
85    
86     # AM_CONDITIONAL -*- Autoconf -*-
87    
88     # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89     # Free Software Foundation, Inc.
90     #
91     # This file is free software; the Free Software Foundation
92     # gives unlimited permission to copy and/or distribute it,
93     # with or without modifications, as long as this notice is preserved.
94    
95     # serial 7
96    
97     # AM_CONDITIONAL(NAME, SHELL-CONDITION)
98     # -------------------------------------
99     # Define a conditional.
100     AC_DEFUN([AM_CONDITIONAL],
101     [AC_PREREQ(2.52)dnl
102     ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
103     [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
104     AC_SUBST([$1_TRUE])
105     AC_SUBST([$1_FALSE])
106     if $2; then
107     $1_TRUE=
108     $1_FALSE='#'
109     else
110     $1_TRUE='#'
111     $1_FALSE=
112     fi
113     AC_CONFIG_COMMANDS_PRE(
114     [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115     AC_MSG_ERROR([[conditional "$1" was never defined.
116     Usually this means the macro was only invoked conditionally.]])
117     fi])])
118    
119    
120     # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121     # Free Software Foundation, Inc.
122     #
123     # This file is free software; the Free Software Foundation
124     # gives unlimited permission to copy and/or distribute it,
125     # with or without modifications, as long as this notice is preserved.
126    
127     # serial 8
128    
129     # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130     # written in clear, in which case automake, when reading aclocal.m4,
131     # will think it sees a *use*, and therefore will trigger all it's
132     # C support machinery. Also note that it means that autoscan, seeing
133     # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
134    
135    
136     # _AM_DEPENDENCIES(NAME)
137     # ----------------------
138     # See how the compiler implements dependency checking.
139     # NAME is "CC", "CXX", "GCJ", or "OBJC".
140     # We try a few techniques and use that to set a single cache variable.
141     #
142     # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
143     # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
144     # dependency, and given that the user is not expected to run this macro,
145     # just rely on AC_PROG_CC.
146     AC_DEFUN([_AM_DEPENDENCIES],
147     [AC_REQUIRE([AM_SET_DEPDIR])dnl
148     AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
149     AC_REQUIRE([AM_MAKE_INCLUDE])dnl
150     AC_REQUIRE([AM_DEP_TRACK])dnl
151    
152     ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
153     [$1], CXX, [depcc="$CXX" am_compiler_list=],
154     [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
155     [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
156     [depcc="$$1" am_compiler_list=])
157    
158     AC_CACHE_CHECK([dependency style of $depcc],
159     [am_cv_$1_dependencies_compiler_type],
160     [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
161     # We make a subdir and do the tests there. Otherwise we can end up
162     # making bogus files that we don't know about and never remove. For
163     # instance it was reported that on HP-UX the gcc test will end up
164     # making a dummy file named `D' -- because `-MD' means `put the output
165     # in D'.
166     mkdir conftest.dir
167     # Copy depcomp to subdir because otherwise we won't find it if we're
168     # using a relative directory.
169     cp "$am_depcomp" conftest.dir
170     cd conftest.dir
171     # We will build objects and dependencies in a subdirectory because
172     # it helps to detect inapplicable dependency modes. For instance
173     # both Tru64's cc and ICC support -MD to output dependencies as a
174     # side effect of compilation, but ICC will put the dependencies in
175     # the current directory while Tru64 will put them in the object
176     # directory.
177     mkdir sub
178    
179     am_cv_$1_dependencies_compiler_type=none
180     if test "$am_compiler_list" = ""; then
181     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
182     fi
183     for depmode in $am_compiler_list; do
184     # Setup a source with many dependencies, because some compilers
185     # like to wrap large dependency lists on column 80 (with \), and
186     # we should not choose a depcomp mode which is confused by this.
187     #
188     # We need to recreate these files for each test, as the compiler may
189     # overwrite some of them when testing with obscure command lines.
190     # This happens at least with the AIX C compiler.
191     : > sub/conftest.c
192     for i in 1 2 3 4 5 6; do
193     echo '#include "conftst'$i'.h"' >> sub/conftest.c
194     # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195     # Solaris 8's {/usr,}/bin/sh.
196     touch sub/conftst$i.h
197     done
198     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
199    
200     case $depmode in
201     nosideeffect)
202     # after this tag, mechanisms are not by side-effect, so they'll
203     # only be used when explicitly requested
204     if test "x$enable_dependency_tracking" = xyes; then
205     continue
206     else
207     break
208     fi
209     ;;
210     none) break ;;
211     esac
212     # We check with `-c' and `-o' for the sake of the "dashmstdout"
213     # mode. It turns out that the SunPro C++ compiler does not properly
214     # handle `-M -o', and we need to detect this.
215     if depmode=$depmode \
216     source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
217     depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
218     $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
219     >/dev/null 2>conftest.err &&
220     grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
221     grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222     ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223     # icc doesn't choke on unknown options, it will just issue warnings
224     # or remarks (even with -Werror). So we grep stderr for any message
225     # that says an option was ignored or not supported.
226     # When given -MP, icc 7.0 and 7.1 complain thusly:
227     # icc: Command line warning: ignoring option '-M'; no argument required
228     # The diagnosis changed in icc 8.0:
229     # icc: Command line remark: option '-MP' not supported
230     if (grep 'ignoring option' conftest.err ||
231     grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
232     am_cv_$1_dependencies_compiler_type=$depmode
233     break
234     fi
235     fi
236     done
237    
238     cd ..
239     rm -rf conftest.dir
240     else
241     am_cv_$1_dependencies_compiler_type=none
242     fi
243     ])
244     AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
245     AM_CONDITIONAL([am__fastdep$1], [
246     test "x$enable_dependency_tracking" != xno \
247     && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
248     ])
249    
250    
251     # AM_SET_DEPDIR
252     # -------------
253     # Choose a directory name for dependency files.
254     # This macro is AC_REQUIREd in _AM_DEPENDENCIES
255     AC_DEFUN([AM_SET_DEPDIR],
256     [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
257     AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
258     ])
259    
260    
261     # AM_DEP_TRACK
262     # ------------
263     AC_DEFUN([AM_DEP_TRACK],
264     [AC_ARG_ENABLE(dependency-tracking,
265     [ --disable-dependency-tracking speeds up one-time build
266     --enable-dependency-tracking do not reject slow dependency extractors])
267     if test "x$enable_dependency_tracking" != xno; then
268     am_depcomp="$ac_aux_dir/depcomp"
269     AMDEPBACKSLASH='\'
270     fi
271     AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
272     AC_SUBST([AMDEPBACKSLASH])
273     ])
274    
275     # Generate code to set up dependency tracking. -*- Autoconf -*-
276    
277     # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278     # Free Software Foundation, Inc.
279     #
280     # This file is free software; the Free Software Foundation
281     # gives unlimited permission to copy and/or distribute it,
282     # with or without modifications, as long as this notice is preserved.
283    
284     #serial 3
285    
286     # _AM_OUTPUT_DEPENDENCY_COMMANDS
287     # ------------------------------
288     AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
289     [for mf in $CONFIG_FILES; do
290     # Strip MF so we end up with the name of the file.
291     mf=`echo "$mf" | sed -e 's/:.*$//'`
292     # Check whether this is an Automake generated Makefile or not.
293     # We used to match only the files named `Makefile.in', but
294     # some people rename them; so instead we look at the file content.
295     # Grep'ing the first line is not enough: some people post-process
296     # each Makefile.in and add a new line on top of each file to say so.
297     # So let's grep whole file.
298     if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
299     dirpart=`AS_DIRNAME("$mf")`
300     else
301     continue
302     fi
303     # Extract the definition of DEPDIR, am__include, and am__quote
304     # from the Makefile without running `make'.
305     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
306     test -z "$DEPDIR" && continue
307     am__include=`sed -n 's/^am__include = //p' < "$mf"`
308     test -z "am__include" && continue
309     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310     # When using ansi2knr, U may be empty or an underscore; expand it
311     U=`sed -n 's/^U = //p' < "$mf"`
312     # Find all dependency output files, they are included files with
313     # $(DEPDIR) in their names. We invoke sed twice because it is the
314     # simplest approach to changing $(DEPDIR) to its actual value in the
315     # expansion.
316     for file in `sed -n "
317     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
318     sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319     # Make sure the directory exists.
320     test -f "$dirpart/$file" && continue
321     fdir=`AS_DIRNAME(["$file"])`
322     AS_MKDIR_P([$dirpart/$fdir])
323     # echo "creating $dirpart/$file"
324     echo '# dummy' > "$dirpart/$file"
325     done
326     done
327     ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
328    
329    
330     # AM_OUTPUT_DEPENDENCY_COMMANDS
331     # -----------------------------
332     # This macro should only be invoked once -- use via AC_REQUIRE.
333     #
334     # This code is only required when automatic dependency tracking
335     # is enabled. FIXME. This creates each `.P' file that we will
336     # need in order to bootstrap the dependency handling code.
337     AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
338     [AC_CONFIG_COMMANDS([depfiles],
339     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
340     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
341     ])
342    
343     # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344     # Free Software Foundation, Inc.
345     #
346     # This file is free software; the Free Software Foundation
347     # gives unlimited permission to copy and/or distribute it,
348     # with or without modifications, as long as this notice is preserved.
349    
350     # serial 8
351    
352     # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
353     AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
354    
355 maloninc 1.9 # iconv.m4 serial AM4 (gettext-0.11.3)
356     dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
357     dnl This file is free software, distributed under the terms of the GNU
358     dnl General Public License. As a special exception to the GNU General
359     dnl Public License, this file may be distributed as part of a program
360     dnl that contains a configuration script generated by Autoconf, under
361     dnl the same distribution terms as the rest of that program.
362    
363     dnl From Bruno Haible.
364    
365     AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
366     [
367     dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
368     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
369     AC_REQUIRE([AC_LIB_RPATH])
370    
371     dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
372     dnl accordingly.
373     AC_LIB_LINKFLAGS_BODY([iconv])
374     ])
375    
376     AC_DEFUN([AM_ICONV_LINK],
377     [
378     dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
379     dnl those with the standalone portable GNU libiconv installed).
380    
381     dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
382     dnl accordingly.
383     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
384    
385     dnl Add $INCICONV to CPPFLAGS before performing the following checks,
386     dnl because if the user has installed libiconv and not disabled its use
387     dnl via --without-libiconv-prefix, he wants to use it. The first
388     dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
389     am_save_CPPFLAGS="$CPPFLAGS"
390     AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
391    
392     AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
393     am_cv_func_iconv="no, consider installing GNU libiconv"
394     am_cv_lib_iconv=no
395     AC_TRY_LINK([#include <stdlib.h>
396     #include <iconv.h>],
397     [iconv_t cd = iconv_open("","");
398     iconv(cd,NULL,NULL,NULL,NULL);
399     iconv_close(cd);],
400     am_cv_func_iconv=yes)
401     if test "$am_cv_func_iconv" != yes; then
402     am_save_LIBS="$LIBS"
403     LIBS="$LIBS $LIBICONV"
404     AC_TRY_LINK([#include <stdlib.h>
405     #include <iconv.h>],
406     [iconv_t cd = iconv_open("","");
407     iconv(cd,NULL,NULL,NULL,NULL);
408     iconv_close(cd);],
409     am_cv_lib_iconv=yes
410     am_cv_func_iconv=yes)
411     LIBS="$am_save_LIBS"
412     fi
413     ])
414     if test "$am_cv_func_iconv" = yes; then
415     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
416     fi
417     if test "$am_cv_lib_iconv" = yes; then
418     AC_MSG_CHECKING([how to link with libiconv])
419     AC_MSG_RESULT([$LIBICONV])
420     else
421     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
422     dnl either.
423     CPPFLAGS="$am_save_CPPFLAGS"
424     LIBICONV=
425     LTLIBICONV=
426     fi
427     AC_SUBST(LIBICONV)
428     AC_SUBST(LTLIBICONV)
429     ])
430    
431     AC_DEFUN([AM_ICONV],
432     [
433     AM_ICONV_LINK
434     if test "$am_cv_func_iconv" = yes; then
435     AC_MSG_CHECKING([for iconv declaration])
436     AC_CACHE_VAL(am_cv_proto_iconv, [
437     AC_TRY_COMPILE([
438     #include <stdlib.h>
439     #include <iconv.h>
440     extern
441     #ifdef __cplusplus
442     "C"
443     #endif
444     #if defined(__STDC__) || defined(__cplusplus)
445     size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
446     #else
447     size_t iconv();
448     #endif
449     ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
450     am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
451     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
452     AC_MSG_RESULT([$]{ac_t:-
453     }[$]am_cv_proto_iconv)
454     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
455     [Define as const if the declaration of iconv() needs const.])
456     fi
457     ])
458    
459 maloninc 1.1 # Do all the work for Automake. -*- Autoconf -*-
460    
461     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
462     # Free Software Foundation, Inc.
463     #
464     # This file is free software; the Free Software Foundation
465     # gives unlimited permission to copy and/or distribute it,
466     # with or without modifications, as long as this notice is preserved.
467    
468     # serial 12
469    
470     # This macro actually does too much. Some checks are only needed if
471     # your package does certain things. But this isn't really a big deal.
472    
473     # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
474     # AM_INIT_AUTOMAKE([OPTIONS])
475     # -----------------------------------------------
476     # The call with PACKAGE and VERSION arguments is the old style
477     # call (pre autoconf-2.50), which is being phased out. PACKAGE
478     # and VERSION should now be passed to AC_INIT and removed from
479     # the call to AM_INIT_AUTOMAKE.
480     # We support both call styles for the transition. After
481     # the next Automake release, Autoconf can make the AC_INIT
482     # arguments mandatory, and then we can depend on a new Autoconf
483     # release and drop the old call support.
484     AC_DEFUN([AM_INIT_AUTOMAKE],
485     [AC_PREREQ([2.58])dnl
486     dnl Autoconf wants to disallow AM_ names. We explicitly allow
487     dnl the ones we care about.
488     m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
489     AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
490     AC_REQUIRE([AC_PROG_INSTALL])dnl
491     # test to see if srcdir already configured
492     if test "`cd $srcdir && pwd`" != "`pwd`" &&
493     test -f $srcdir/config.status; then
494     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
495     fi
496    
497     # test whether we have cygpath
498     if test -z "$CYGPATH_W"; then
499     if (cygpath --version) >/dev/null 2>/dev/null; then
500     CYGPATH_W='cygpath -w'
501     else
502     CYGPATH_W=echo
503     fi
504     fi
505     AC_SUBST([CYGPATH_W])
506    
507     # Define the identity of the package.
508     dnl Distinguish between old-style and new-style calls.
509     m4_ifval([$2],
510     [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
511     AC_SUBST([PACKAGE], [$1])dnl
512     AC_SUBST([VERSION], [$2])],
513     [_AM_SET_OPTIONS([$1])dnl
514     AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
515     AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
516    
517     _AM_IF_OPTION([no-define],,
518     [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
519     AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
520    
521     # Some tools Automake needs.
522     AC_REQUIRE([AM_SANITY_CHECK])dnl
523     AC_REQUIRE([AC_ARG_PROGRAM])dnl
524     AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
525     AM_MISSING_PROG(AUTOCONF, autoconf)
526     AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
527     AM_MISSING_PROG(AUTOHEADER, autoheader)
528     AM_MISSING_PROG(MAKEINFO, makeinfo)
529     AM_PROG_INSTALL_SH
530     AM_PROG_INSTALL_STRIP
531     AC_REQUIRE([AM_PROG_MKDIR_P])dnl
532     # We need awk for the "check" target. The system "awk" is bad on
533     # some platforms.
534     AC_REQUIRE([AC_PROG_AWK])dnl
535     AC_REQUIRE([AC_PROG_MAKE_SET])dnl
536     AC_REQUIRE([AM_SET_LEADING_DOT])dnl
537     _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
538     [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
539     [_AM_PROG_TAR([v7])])])
540     _AM_IF_OPTION([no-dependencies],,
541     [AC_PROVIDE_IFELSE([AC_PROG_CC],
542     [_AM_DEPENDENCIES(CC)],
543     [define([AC_PROG_CC],
544     defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
545     AC_PROVIDE_IFELSE([AC_PROG_CXX],
546     [_AM_DEPENDENCIES(CXX)],
547     [define([AC_PROG_CXX],
548     defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
549     ])
550     ])
551    
552    
553     # When config.status generates a header, we must update the stamp-h file.
554     # This file resides in the same directory as the config header
555     # that is generated. The stamp files are numbered to have different names.
556    
557     # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
558     # loop where config.status creates the headers, so we can generate
559     # our stamp files there.
560     AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
561     [# Compute $1's index in $config_headers.
562     _am_stamp_count=1
563     for _am_header in $config_headers :; do
564     case $_am_header in
565     $1 | $1:* )
566     break ;;
567     * )
568     _am_stamp_count=`expr $_am_stamp_count + 1` ;;
569     esac
570     done
571     echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
572    
573     # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
574     #
575     # This file is free software; the Free Software Foundation
576     # gives unlimited permission to copy and/or distribute it,
577     # with or without modifications, as long as this notice is preserved.
578    
579     # AM_PROG_INSTALL_SH
580     # ------------------
581     # Define $install_sh.
582     AC_DEFUN([AM_PROG_INSTALL_SH],
583     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
584     install_sh=${install_sh-"$am_aux_dir/install-sh"}
585     AC_SUBST(install_sh)])
586    
587     # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
588     #
589     # This file is free software; the Free Software Foundation
590     # gives unlimited permission to copy and/or distribute it,
591     # with or without modifications, as long as this notice is preserved.
592    
593     # serial 2
594    
595     # Check whether the underlying file-system supports filenames
596     # with a leading dot. For instance MS-DOS doesn't.
597     AC_DEFUN([AM_SET_LEADING_DOT],
598     [rm -rf .tst 2>/dev/null
599     mkdir .tst 2>/dev/null
600     if test -d .tst; then
601     am__leading_dot=.
602     else
603     am__leading_dot=_
604     fi
605     rmdir .tst 2>/dev/null
606     AC_SUBST([am__leading_dot])])
607    
608 maloninc 1.9 # lib-ld.m4 serial 2 (gettext-0.12)
609     dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
610     dnl This file is free software, distributed under the terms of the GNU
611     dnl General Public License. As a special exception to the GNU General
612     dnl Public License, this file may be distributed as part of a program
613     dnl that contains a configuration script generated by Autoconf, under
614     dnl the same distribution terms as the rest of that program.
615    
616     dnl Subroutines of libtool.m4,
617     dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
618     dnl with libtool.m4.
619    
620     dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
621     AC_DEFUN([AC_LIB_PROG_LD_GNU],
622     [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
623     [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
624     if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
625     acl_cv_prog_gnu_ld=yes
626     else
627     acl_cv_prog_gnu_ld=no
628     fi])
629     with_gnu_ld=$acl_cv_prog_gnu_ld
630     ])
631    
632     dnl From libtool-1.4. Sets the variable LD.
633     AC_DEFUN([AC_LIB_PROG_LD],
634     [AC_ARG_WITH(gnu-ld,
635     [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
636     test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
637     AC_REQUIRE([AC_PROG_CC])dnl
638     AC_REQUIRE([AC_CANONICAL_HOST])dnl
639     # Prepare PATH_SEPARATOR.
640     # The user is always right.
641     if test "${PATH_SEPARATOR+set}" != set; then
642     echo "#! /bin/sh" >conf$$.sh
643     echo "exit 0" >>conf$$.sh
644     chmod +x conf$$.sh
645     if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
646     PATH_SEPARATOR=';'
647     else
648     PATH_SEPARATOR=:
649     fi
650     rm -f conf$$.sh
651     fi
652     ac_prog=ld
653     if test "$GCC" = yes; then
654     # Check if gcc -print-prog-name=ld gives a path.
655     AC_MSG_CHECKING([for ld used by GCC])
656     case $host in
657     *-*-mingw*)
658     # gcc leaves a trailing carriage return which upsets mingw
659     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
660     *)
661     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
662     esac
663     case $ac_prog in
664     # Accept absolute paths.
665     [[\\/]* | [A-Za-z]:[\\/]*)]
666     [re_direlt='/[^/][^/]*/\.\./']
667     # Canonicalize the path of ld
668     ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
669     while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
670     ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
671     done
672     test -z "$LD" && LD="$ac_prog"
673     ;;
674     "")
675     # If it fails, then pretend we aren't using GCC.
676     ac_prog=ld
677     ;;
678     *)
679     # If it is relative, then search for the first ld in PATH.
680     with_gnu_ld=unknown
681     ;;
682     esac
683     elif test "$with_gnu_ld" = yes; then
684     AC_MSG_CHECKING([for GNU ld])
685     else
686     AC_MSG_CHECKING([for non-GNU ld])
687     fi
688     AC_CACHE_VAL(acl_cv_path_LD,
689     [if test -z "$LD"; then
690     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
691     for ac_dir in $PATH; do
692     test -z "$ac_dir" && ac_dir=.
693     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
694     acl_cv_path_LD="$ac_dir/$ac_prog"
695     # Check to see if the program is GNU ld. I'd rather use --version,
696     # but apparently some GNU ld's only accept -v.
697     # Break only if it was the GNU/non-GNU ld that we prefer.
698     if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
699     test "$with_gnu_ld" != no && break
700     else
701     test "$with_gnu_ld" != yes && break
702     fi
703     fi
704     done
705     IFS="$ac_save_ifs"
706     else
707     acl_cv_path_LD="$LD" # Let the user override the test with a path.
708     fi])
709     LD="$acl_cv_path_LD"
710     if test -n "$LD"; then
711     AC_MSG_RESULT($LD)
712     else
713     AC_MSG_RESULT(no)
714     fi
715     test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
716     AC_LIB_PROG_LD_GNU
717     ])
718    
719     # lib-link.m4 serial 4 (gettext-0.12)
720     dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
721     dnl This file is free software, distributed under the terms of the GNU
722     dnl General Public License. As a special exception to the GNU General
723     dnl Public License, this file may be distributed as part of a program
724     dnl that contains a configuration script generated by Autoconf, under
725     dnl the same distribution terms as the rest of that program.
726    
727     dnl From Bruno Haible.
728    
729     dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
730     dnl the libraries corresponding to explicit and implicit dependencies.
731     dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
732     dnl augments the CPPFLAGS variable.
733     AC_DEFUN([AC_LIB_LINKFLAGS],
734     [
735     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
736     AC_REQUIRE([AC_LIB_RPATH])
737     define([Name],[translit([$1],[./-], [___])])
738     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
739     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
740     AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
741     AC_LIB_LINKFLAGS_BODY([$1], [$2])
742     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
743     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
744     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
745     ])
746     LIB[]NAME="$ac_cv_lib[]Name[]_libs"
747     LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
748     INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
749     AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
750     AC_SUBST([LIB]NAME)
751     AC_SUBST([LTLIB]NAME)
752     dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
753     dnl results of this search when this library appears as a dependency.
754     HAVE_LIB[]NAME=yes
755     undefine([Name])
756     undefine([NAME])
757     ])
758    
759     dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
760     dnl searches for libname and the libraries corresponding to explicit and
761     dnl implicit dependencies, together with the specified include files and
762     dnl the ability to compile and link the specified testcode. If found, it
763     dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
764     dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
765     dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
766     dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
767     AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
768     [
769     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
770     AC_REQUIRE([AC_LIB_RPATH])
771     define([Name],[translit([$1],[./-], [___])])
772     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
773     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
774    
775     dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
776     dnl accordingly.
777     AC_LIB_LINKFLAGS_BODY([$1], [$2])
778    
779     dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
780     dnl because if the user has installed lib[]Name and not disabled its use
781     dnl via --without-lib[]Name-prefix, he wants to use it.
782     ac_save_CPPFLAGS="$CPPFLAGS"
783     AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
784    
785     AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
786     ac_save_LIBS="$LIBS"
787     LIBS="$LIBS $LIB[]NAME"
788     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
789     LIBS="$ac_save_LIBS"
790     ])
791     if test "$ac_cv_lib[]Name" = yes; then
792     HAVE_LIB[]NAME=yes
793     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
794     AC_MSG_CHECKING([how to link with lib[]$1])
795     AC_MSG_RESULT([$LIB[]NAME])
796     else
797     HAVE_LIB[]NAME=no
798     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
799     dnl $INC[]NAME either.
800     CPPFLAGS="$ac_save_CPPFLAGS"
801     LIB[]NAME=
802     LTLIB[]NAME=
803     fi
804     AC_SUBST([HAVE_LIB]NAME)
805     AC_SUBST([LIB]NAME)
806     AC_SUBST([LTLIB]NAME)
807     undefine([Name])
808     undefine([NAME])
809     ])
810    
811     dnl Determine the platform dependent parameters needed to use rpath:
812     dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
813     dnl hardcode_direct, hardcode_minus_L.
814     AC_DEFUN([AC_LIB_RPATH],
815     [
816     AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
817     AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
818     AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
819     AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
820     AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
821     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
822     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
823     . ./conftest.sh
824     rm -f ./conftest.sh
825     acl_cv_rpath=done
826     ])
827     wl="$acl_cv_wl"
828     libext="$acl_cv_libext"
829     shlibext="$acl_cv_shlibext"
830     hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
831     hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
832     hardcode_direct="$acl_cv_hardcode_direct"
833     hardcode_minus_L="$acl_cv_hardcode_minus_L"
834     dnl Determine whether the user wants rpath handling at all.
835     AC_ARG_ENABLE(rpath,
836     [ --disable-rpath do not hardcode runtime library paths],
837     :, enable_rpath=yes)
838     ])
839    
840     dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
841     dnl the libraries corresponding to explicit and implicit dependencies.
842     dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
843     AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
844     [
845     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
846     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
847     dnl By default, look in $includedir and $libdir.
848     use_additional=yes
849     AC_LIB_WITH_FINAL_PREFIX([
850     eval additional_includedir=\"$includedir\"
851     eval additional_libdir=\"$libdir\"
852     ])
853     AC_LIB_ARG_WITH([lib$1-prefix],
854     [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
855     --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
856     [
857     if test "X$withval" = "Xno"; then
858     use_additional=no
859     else
860     if test "X$withval" = "X"; then
861     AC_LIB_WITH_FINAL_PREFIX([
862     eval additional_includedir=\"$includedir\"
863     eval additional_libdir=\"$libdir\"
864     ])
865     else
866     additional_includedir="$withval/include"
867     additional_libdir="$withval/lib"
868     fi
869     fi
870     ])
871     dnl Search the library and its dependencies in $additional_libdir and
872     dnl $LDFLAGS. Using breadth-first-seach.
873     LIB[]NAME=
874     LTLIB[]NAME=
875     INC[]NAME=
876     rpathdirs=
877     ltrpathdirs=
878     names_already_handled=
879     names_next_round='$1 $2'
880     while test -n "$names_next_round"; do
881     names_this_round="$names_next_round"
882     names_next_round=
883     for name in $names_this_round; do
884     already_handled=
885     for n in $names_already_handled; do
886     if test "$n" = "$name"; then
887     already_handled=yes
888     break
889     fi
890     done
891     if test -z "$already_handled"; then
892     names_already_handled="$names_already_handled $name"
893     dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
894     dnl or AC_LIB_HAVE_LINKFLAGS call.
895     uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
896     eval value=\"\$HAVE_LIB$uppername\"
897     if test -n "$value"; then
898     if test "$value" = yes; then
899     eval value=\"\$LIB$uppername\"
900     test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
901     eval value=\"\$LTLIB$uppername\"
902     test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
903     else
904     dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
905     dnl that this library doesn't exist. So just drop it.
906     :
907     fi
908     else
909     dnl Search the library lib$name in $additional_libdir and $LDFLAGS
910     dnl and the already constructed $LIBNAME/$LTLIBNAME.
911     found_dir=
912     found_la=
913     found_so=
914     found_a=
915     if test $use_additional = yes; then
916     if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
917     found_dir="$additional_libdir"
918     found_so="$additional_libdir/lib$name.$shlibext"
919     if test -f "$additional_libdir/lib$name.la"; then
920     found_la="$additional_libdir/lib$name.la"
921     fi
922     else
923     if test -f "$additional_libdir/lib$name.$libext"; then
924     found_dir="$additional_libdir"
925     found_a="$additional_libdir/lib$name.$libext"
926     if test -f "$additional_libdir/lib$name.la"; then
927     found_la="$additional_libdir/lib$name.la"
928     fi
929     fi
930     fi
931     fi
932     if test "X$found_dir" = "X"; then
933     for x in $LDFLAGS $LTLIB[]NAME; do
934     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
935     case "$x" in
936     -L*)
937     dir=`echo "X$x" | sed -e 's/^X-L//'`
938     if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
939     found_dir="$dir"
940     found_so="$dir/lib$name.$shlibext"
941     if test -f "$dir/lib$name.la"; then
942     found_la="$dir/lib$name.la"
943     fi
944     else
945     if test -f "$dir/lib$name.$libext"; then
946     found_dir="$dir"
947     found_a="$dir/lib$name.$libext"
948     if test -f "$dir/lib$name.la"; then
949     found_la="$dir/lib$name.la"
950     fi
951     fi
952     fi
953     ;;
954     esac
955     if test "X$found_dir" != "X"; then
956     break
957     fi
958     done
959     fi
960     if test "X$found_dir" != "X"; then
961     dnl Found the library.
962     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
963     if test "X$found_so" != "X"; then
964     dnl Linking with a shared library. We attempt to hardcode its
965     dnl directory into the executable's runpath, unless it's the
966     dnl standard /usr/lib.
967     if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
968     dnl No hardcoding is needed.
969     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
970     else
971     dnl Use an explicit option to hardcode DIR into the resulting
972     dnl binary.
973     dnl Potentially add DIR to ltrpathdirs.
974     dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
975     haveit=
976     for x in $ltrpathdirs; do
977     if test "X$x" = "X$found_dir"; then
978     haveit=yes
979     break
980     fi
981     done
982     if test -z "$haveit"; then
983     ltrpathdirs="$ltrpathdirs $found_dir"
984     fi
985     dnl The hardcoding into $LIBNAME is system dependent.
986     if test "$hardcode_direct" = yes; then
987     dnl Using DIR/libNAME.so during linking hardcodes DIR into the
988     dnl resulting binary.
989     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
990     else
991     if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
992     dnl Use an explicit option to hardcode DIR into the resulting
993     dnl binary.
994     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
995     dnl Potentially add DIR to rpathdirs.
996     dnl The rpathdirs will be appended to $LIBNAME at the end.
997     haveit=
998     for x in $rpathdirs; do
999     if test "X$x" = "X$found_dir"; then
1000     haveit=yes
1001     break
1002     fi
1003     done
1004     if test -z "$haveit"; then
1005     rpathdirs="$rpathdirs $found_dir"
1006     fi
1007     else
1008     dnl Rely on "-L$found_dir".
1009     dnl But don't add it if it's already contained in the LDFLAGS
1010     dnl or the already constructed $LIBNAME
1011     haveit=
1012     for x in $LDFLAGS $LIB[]NAME; do
1013     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1014     if test "X$x" = "X-L$found_dir"; then
1015     haveit=yes
1016     break
1017     fi
1018     done
1019     if test -z "$haveit"; then
1020     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1021     fi
1022     if test "$hardcode_minus_L" != no; then
1023     dnl FIXME: Not sure whether we should use
1024     dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1025     dnl here.
1026     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1027     else
1028     dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1029     dnl here, because this doesn't fit in flags passed to the
1030     dnl compiler. So give up. No hardcoding. This affects only
1031     dnl very old systems.
1032     dnl FIXME: Not sure whether we should use
1033     dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1034     dnl here.
1035     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1036     fi
1037     fi
1038     fi
1039     fi
1040     else
1041     if test "X$found_a" != "X"; then
1042     dnl Linking with a static library.
1043     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1044     else
1045     dnl We shouldn't come here, but anyway it's good to have a
1046     dnl fallback.
1047     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1048     fi
1049     fi
1050     dnl Assume the include files are nearby.
1051     additional_includedir=
1052     case "$found_dir" in
1053     */lib | */lib/)
1054     basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1055     additional_includedir="$basedir/include"
1056     ;;
1057     esac
1058     if test "X$additional_includedir" != "X"; then
1059     dnl Potentially add $additional_includedir to $INCNAME.
1060     dnl But don't add it
1061     dnl 1. if it's the standard /usr/include,
1062     dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1063     dnl 3. if it's already present in $CPPFLAGS or the already
1064     dnl constructed $INCNAME,
1065     dnl 4. if it doesn't exist as a directory.
1066     if test "X$additional_includedir" != "X/usr/include"; then
1067     haveit=
1068     if test "X$additional_includedir" = "X/usr/local/include"; then
1069     if test -n "$GCC"; then
1070     case $host_os in
1071     linux*) haveit=yes;;
1072     esac
1073     fi
1074     fi
1075     if test -z "$haveit"; then
1076     for x in $CPPFLAGS $INC[]NAME; do
1077     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1078     if test "X$x" = "X-I$additional_includedir"; then
1079     haveit=yes
1080     break
1081     fi
1082     done
1083     if test -z "$haveit"; then
1084     if test -d "$additional_includedir"; then
1085     dnl Really add $additional_includedir to $INCNAME.
1086     INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1087     fi
1088     fi
1089     fi
1090     fi
1091     fi
1092     dnl Look for dependencies.
1093     if test -n "$found_la"; then
1094     dnl Read the .la file. It defines the variables
1095     dnl dlname, library_names, old_library, dependency_libs, current,
1096     dnl age, revision, installed, dlopen, dlpreopen, libdir.
1097     save_libdir="$libdir"
1098     case "$found_la" in
1099     */* | *\\*) . "$found_la" ;;
1100     *) . "./$found_la" ;;
1101     esac
1102     libdir="$save_libdir"
1103     dnl We use only dependency_libs.
1104     for dep in $dependency_libs; do
1105     case "$dep" in
1106     -L*)
1107     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1108     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1109     dnl But don't add it
1110     dnl 1. if it's the standard /usr/lib,
1111     dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1112     dnl 3. if it's already present in $LDFLAGS or the already
1113     dnl constructed $LIBNAME,
1114     dnl 4. if it doesn't exist as a directory.
1115     if test "X$additional_libdir" != "X/usr/lib"; then
1116     haveit=
1117     if test "X$additional_libdir" = "X/usr/local/lib"; then
1118     if test -n "$GCC"; then
1119     case $host_os in
1120     linux*) haveit=yes;;
1121     esac
1122     fi
1123     fi
1124     if test -z "$haveit"; then
1125     haveit=
1126     for x in $LDFLAGS $LIB[]NAME; do
1127     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1128     if test "X$x" = "X-L$additional_libdir"; then
1129     haveit=yes
1130     break
1131     fi
1132     done
1133     if test -z "$haveit"; then
1134     if test -d "$additional_libdir"; then
1135     dnl Really add $additional_libdir to $LIBNAME.
1136     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1137     fi
1138     fi
1139     haveit=
1140     for x in $LDFLAGS $LTLIB[]NAME; do
1141     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1142     if test "X$x" = "X-L$additional_libdir"; then
1143     haveit=yes
1144     break
1145     fi
1146     done
1147     if test -z "$haveit"; then
1148     if test -d "$additional_libdir"; then
1149     dnl Really add $additional_libdir to $LTLIBNAME.
1150     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1151     fi
1152     fi
1153     fi
1154     fi
1155     ;;
1156     -R*)
1157     dir=`echo "X$dep" | sed -e 's/^X-R//'`
1158     if test "$enable_rpath" != no; then
1159     dnl Potentially add DIR to rpathdirs.
1160     dnl The rpathdirs will be appended to $LIBNAME at the end.
1161     haveit=
1162     for x in $rpathdirs; do
1163     if test "X$x" = "X$dir"; then
1164     haveit=yes
1165     break
1166     fi
1167     done
1168     if test -z "$haveit"; then
1169     rpathdirs="$rpathdirs $dir"
1170     fi
1171     dnl Potentially add DIR to ltrpathdirs.
1172     dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1173     haveit=
1174     for x in $ltrpathdirs; do
1175     if test "X$x" = "X$dir"; then
1176     haveit=yes
1177     break
1178     fi
1179     done
1180     if test -z "$haveit"; then
1181     ltrpathdirs="$ltrpathdirs $dir"
1182     fi
1183     fi
1184     ;;
1185     -l*)
1186     dnl Handle this in the next round.
1187     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1188     ;;
1189     *.la)
1190     dnl Handle this in the next round. Throw away the .la's
1191     dnl directory; it is already contained in a preceding -L
1192     dnl option.
1193     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1194     ;;
1195     *)
1196     dnl Most likely an immediate library name.
1197     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1198     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1199     ;;
1200     esac
1201     done
1202     fi
1203     else
1204     dnl Didn't find the library; assume it is in the system directories
1205     dnl known to the linker and runtime loader. (All the system
1206     dnl directories known to the linker should also be known to the
1207     dnl runtime loader, otherwise the system is severely misconfigured.)
1208     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1209     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1210     fi
1211     fi
1212     fi
1213     done
1214     done
1215     if test "X$rpathdirs" != "X"; then
1216     if test -n "$hardcode_libdir_separator"; then
1217     dnl Weird platform: only the last -rpath option counts, the user must
1218     dnl pass all path elements in one option. We can arrange that for a
1219     dnl single library, but not when more than one $LIBNAMEs are used.
1220     alldirs=
1221     for found_dir in $rpathdirs; do
1222     alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1223     done
1224     dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1225     acl_save_libdir="$libdir"
1226     libdir="$alldirs"
1227     eval flag=\"$hardcode_libdir_flag_spec\"
1228     libdir="$acl_save_libdir"
1229     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1230     else
1231     dnl The -rpath options are cumulative.
1232     for found_dir in $rpathdirs; do
1233     acl_save_libdir="$libdir"
1234     libdir="$found_dir"
1235     eval flag=\"$hardcode_libdir_flag_spec\"
1236     libdir="$acl_save_libdir"
1237     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1238     done
1239     fi
1240     fi
1241     if test "X$ltrpathdirs" != "X"; then
1242     dnl When using libtool, the option that works for both libraries and
1243     dnl executables is -R. The -R options are cumulative.
1244     for found_dir in $ltrpathdirs; do
1245     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1246     done
1247     fi
1248     ])
1249    
1250     dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1251     dnl unless already present in VAR.
1252     dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1253     dnl contains two or three consecutive elements that belong together.
1254     AC_DEFUN([AC_LIB_APPENDTOVAR],
1255     [
1256     for element in [$2]; do
1257     haveit=
1258     for x in $[$1]; do
1259     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1260     if test "X$x" = "X$element"; then
1261     haveit=yes
1262     break
1263     fi
1264     done
1265     if test -z "$haveit"; then
1266     [$1]="${[$1]}${[$1]:+ }$element"
1267     fi
1268     done
1269     ])
1270    
1271     # lib-prefix.m4 serial 2 (gettext-0.12)
1272     dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1273     dnl This file is free software, distributed under the terms of the GNU
1274     dnl General Public License. As a special exception to the GNU General
1275     dnl Public License, this file may be distributed as part of a program
1276     dnl that contains a configuration script generated by Autoconf, under
1277     dnl the same distribution terms as the rest of that program.
1278    
1279     dnl From Bruno Haible.
1280    
1281     dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1282     dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1283     dnl require excessive bracketing.
1284     ifdef([AC_HELP_STRING],
1285     [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1286     [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1287    
1288     dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1289     dnl to access previously installed libraries. The basic assumption is that
1290     dnl a user will want packages to use other packages he previously installed
1291     dnl with the same --prefix option.
1292     dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1293     dnl libraries, but is otherwise very convenient.
1294     AC_DEFUN([AC_LIB_PREFIX],
1295     [
1296     AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1297     AC_REQUIRE([AC_PROG_CC])
1298     AC_REQUIRE([AC_CANONICAL_HOST])
1299     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1300     dnl By default, look in $includedir and $libdir.
1301     use_additional=yes
1302     AC_LIB_WITH_FINAL_PREFIX([
1303     eval additional_includedir=\"$includedir\"
1304     eval additional_libdir=\"$libdir\"
1305     ])
1306     AC_LIB_ARG_WITH([lib-prefix],
1307     [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1308     --without-lib-prefix don't search for libraries in includedir and libdir],
1309     [
1310     if test "X$withval" = "Xno"; then
1311     use_additional=no
1312     else
1313     if test "X$withval" = "X"; then
1314     AC_LIB_WITH_FINAL_PREFIX([
1315     eval additional_includedir=\"$includedir\"
1316     eval additional_libdir=\"$libdir\"
1317     ])
1318     else
1319     additional_includedir="$withval/include"
1320     additional_libdir="$withval/lib"
1321     fi
1322     fi
1323     ])
1324     if test $use_additional = yes; then
1325     dnl Potentially add $additional_includedir to $CPPFLAGS.
1326     dnl But don't add it
1327     dnl 1. if it's the standard /usr/include,
1328     dnl 2. if it's already present in $CPPFLAGS,
1329     dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1330     dnl 4. if it doesn't exist as a directory.
1331     if test "X$additional_includedir" != "X/usr/include"; then
1332     haveit=
1333     for x in $CPPFLAGS; do
1334     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1335     if test "X$x" = "X-I$additional_includedir"; then
1336     haveit=yes
1337     break
1338     fi
1339     done
1340     if test -z "$haveit"; then
1341     if test "X$additional_includedir" = "X/usr/local/include"; then
1342     if test -n "$GCC"; then
1343     case $host_os in
1344     linux*) haveit=yes;;
1345     esac
1346     fi
1347     fi
1348     if test -z "$haveit"; then
1349     if test -d "$additional_includedir"; then
1350     dnl Really add $additional_includedir to $CPPFLAGS.
1351     CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1352     fi
1353     fi
1354     fi
1355     fi
1356     dnl Potentially add $additional_libdir to $LDFLAGS.
1357     dnl But don't add it
1358     dnl 1. if it's the standard /usr/lib,
1359     dnl 2. if it's already present in $LDFLAGS,
1360     dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1361     dnl 4. if it doesn't exist as a directory.
1362     if test "X$additional_libdir" != "X/usr/lib"; then
1363     haveit=
1364     for x in $LDFLAGS; do
1365     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1366     if test "X$x" = "X-L$additional_libdir"; then
1367     haveit=yes
1368     break
1369     fi
1370     done
1371     if test -z "$haveit"; then
1372     if test "X$additional_libdir" = "X/usr/local/lib"; then
1373     if test -n "$GCC"; then
1374     case $host_os in
1375     linux*) haveit=yes;;
1376     esac
1377     fi
1378     fi
1379     if test -z "$haveit"; then
1380     if test -d "$additional_libdir"; then
1381     dnl Really add $additional_libdir to $LDFLAGS.
1382     LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1383     fi
1384     fi
1385     fi
1386     fi
1387     fi
1388     ])
1389    
1390     dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1391     dnl acl_final_exec_prefix, containing the values to which $prefix and
1392     dnl $exec_prefix will expand at the end of the configure script.
1393     AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1394     [
1395     dnl Unfortunately, prefix and exec_prefix get only finally determined
1396     dnl at the end of configure.
1397     if test "X$prefix" = "XNONE"; then
1398     acl_final_prefix="$ac_default_prefix"
1399     else
1400     acl_final_prefix="$prefix"
1401     fi
1402     if test "X$exec_prefix" = "XNONE"; then
1403     acl_final_exec_prefix='${prefix}'
1404     else
1405     acl_final_exec_prefix="$exec_prefix"
1406     fi
1407     acl_save_prefix="$prefix"
1408     prefix="$acl_final_prefix"
1409     eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1410     prefix="$acl_save_prefix"
1411     ])
1412    
1413     dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1414     dnl variables prefix and exec_prefix bound to the values they will have
1415     dnl at the end of the configure script.
1416     AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1417     [
1418     acl_save_prefix="$prefix"
1419     prefix="$acl_final_prefix"
1420     acl_save_exec_prefix="$exec_prefix"
1421     exec_prefix="$acl_final_exec_prefix"
1422     $1
1423     exec_prefix="$acl_save_exec_prefix"
1424     prefix="$acl_save_prefix"
1425     ])
1426    
1427 maloninc 1.1 # Check to see how 'make' treats includes. -*- Autoconf -*-
1428    
1429     # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1430     #
1431     # This file is free software; the Free Software Foundation
1432     # gives unlimited permission to copy and/or distribute it,
1433     # with or without modifications, as long as this notice is preserved.
1434    
1435     # serial 3
1436    
1437     # AM_MAKE_INCLUDE()
1438     # -----------------
1439     # Check to see how make treats includes.
1440     AC_DEFUN([AM_MAKE_INCLUDE],
1441     [am_make=${MAKE-make}
1442     cat > confinc << 'END'
1443     am__doit:
1444     @echo done
1445     .PHONY: am__doit
1446     END
1447     # If we don't find an include directive, just comment out the code.
1448     AC_MSG_CHECKING([for style of include used by $am_make])
1449     am__include="#"
1450     am__quote=
1451     _am_result=none
1452     # First try GNU make style include.
1453     echo "include confinc" > confmf
1454     # We grep out `Entering directory' and `Leaving directory'
1455     # messages which can occur if `w' ends up in MAKEFLAGS.
1456     # In particular we don't look at `^make:' because GNU make might
1457     # be invoked under some other name (usually "gmake"), in which
1458     # case it prints its new name instead of `make'.
1459     if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1460     am__include=include
1461     am__quote=
1462     _am_result=GNU
1463     fi
1464     # Now try BSD make style include.
1465     if test "$am__include" = "#"; then
1466     echo '.include "confinc"' > confmf
1467     if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1468     am__include=.include
1469     am__quote="\""
1470     _am_result=BSD
1471     fi
1472     fi
1473     AC_SUBST([am__include])
1474     AC_SUBST([am__quote])
1475     AC_MSG_RESULT([$_am_result])
1476     rm -f confinc confmf
1477     ])
1478    
1479     # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1480    
1481     # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
1482     # Free Software Foundation, Inc.
1483     #
1484     # This file is free software; the Free Software Foundation
1485     # gives unlimited permission to copy and/or distribute it,
1486     # with or without modifications, as long as this notice is preserved.
1487    
1488     # serial 4
1489    
1490     # AM_MISSING_PROG(NAME, PROGRAM)
1491     # ------------------------------
1492     AC_DEFUN([AM_MISSING_PROG],
1493     [AC_REQUIRE([AM_MISSING_HAS_RUN])
1494     $1=${$1-"${am_missing_run}$2"}
1495     AC_SUBST($1)])
1496    
1497    
1498     # AM_MISSING_HAS_RUN
1499     # ------------------
1500     # Define MISSING if not defined so far and test if it supports --run.
1501     # If it does, set am_missing_run to use it, otherwise, to nothing.
1502     AC_DEFUN([AM_MISSING_HAS_RUN],
1503     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1504     test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1505     # Use eval to expand $SHELL
1506     if eval "$MISSING --run true"; then
1507     am_missing_run="$MISSING --run "
1508     else
1509     am_missing_run=
1510     AC_MSG_WARN([`missing' script is too old or missing])
1511     fi
1512     ])
1513    
1514     # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
1515     #
1516     # This file is free software; the Free Software Foundation
1517     # gives unlimited permission to copy and/or distribute it,
1518     # with or without modifications, as long as this notice is preserved.
1519    
1520     # AM_PROG_MKDIR_P
1521     # ---------------
1522     # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
1523     #
1524     # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
1525     # created by `make install' are always world readable, even if the
1526     # installer happens to have an overly restrictive umask (e.g. 077).
1527     # This was a mistake. There are at least two reasons why we must not
1528     # use `-m 0755':
1529     # - it causes special bits like SGID to be ignored,
1530     # - it may be too restrictive (some setups expect 775 directories).
1531     #
1532     # Do not use -m 0755 and let people choose whatever they expect by
1533     # setting umask.
1534     #
1535     # We cannot accept any implementation of `mkdir' that recognizes `-p'.
1536     # Some implementations (such as Solaris 8's) are not thread-safe: if a
1537     # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
1538     # concurrently, both version can detect that a/ is missing, but only
1539     # one can create it and the other will error out. Consequently we
1540     # restrict ourselves to GNU make (using the --version option ensures
1541     # this.)
1542     AC_DEFUN([AM_PROG_MKDIR_P],
1543     [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1544     # We used to keeping the `.' as first argument, in order to
1545     # allow $(mkdir_p) to be used without argument. As in
1546     # $(mkdir_p) $(somedir)
1547     # where $(somedir) is conditionally defined. However this is wrong
1548     # for two reasons:
1549     # 1. if the package is installed by a user who cannot write `.'
1550     # make install will fail,
1551     # 2. the above comment should most certainly read
1552     # $(mkdir_p) $(DESTDIR)$(somedir)
1553     # so it does not work when $(somedir) is undefined and
1554     # $(DESTDIR) is not.
1555     # To support the latter case, we have to write
1556     # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1557     # so the `.' trick is pointless.
1558     mkdir_p='mkdir -p --'
1559     else
1560     # On NextStep and OpenStep, the `mkdir' command does not
1561     # recognize any option. It will interpret all options as
1562     # directories to create, and then abort because `.' already
1563     # exists.
1564     for d in ./-p ./--version;
1565     do
1566     test -d $d && rmdir $d
1567     done
1568     # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1569     if test -f "$ac_aux_dir/mkinstalldirs"; then
1570     mkdir_p='$(mkinstalldirs)'
1571     else
1572     mkdir_p='$(install_sh) -d'
1573     fi
1574     fi
1575     AC_SUBST([mkdir_p])])
1576    
1577     # Helper functions for option handling. -*- Autoconf -*-
1578    
1579     # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1580     #
1581     # This file is free software; the Free Software Foundation
1582     # gives unlimited permission to copy and/or distribute it,
1583     # with or without modifications, as long as this notice is preserved.
1584    
1585     # serial 3
1586    
1587     # _AM_MANGLE_OPTION(NAME)
1588     # -----------------------
1589     AC_DEFUN([_AM_MANGLE_OPTION],
1590     [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1591    
1592     # _AM_SET_OPTION(NAME)
1593     # ------------------------------
1594     # Set option NAME. Presently that only means defining a flag for this option.
1595     AC_DEFUN([_AM_SET_OPTION],
1596     [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1597    
1598     # _AM_SET_OPTIONS(OPTIONS)
1599     # ----------------------------------
1600     # OPTIONS is a space-separated list of Automake options.
1601     AC_DEFUN([_AM_SET_OPTIONS],
1602     [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1603    
1604     # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1605     # -------------------------------------------
1606     # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1607     AC_DEFUN([_AM_IF_OPTION],
1608     [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1609    
1610     # Check to make sure that the build environment is sane. -*- Autoconf -*-
1611    
1612     # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1613     # Free Software Foundation, Inc.
1614     #
1615     # This file is free software; the Free Software Foundation
1616     # gives unlimited permission to copy and/or distribute it,
1617     # with or without modifications, as long as this notice is preserved.
1618    
1619     # serial 4
1620    
1621     # AM_SANITY_CHECK
1622     # ---------------
1623     AC_DEFUN([AM_SANITY_CHECK],
1624     [AC_MSG_CHECKING([whether build environment is sane])
1625     # Just in case
1626     sleep 1
1627     echo timestamp > conftest.file
1628     # Do `set' in a subshell so we don't clobber the current shell's
1629     # arguments. Must try -L first in case configure is actually a
1630     # symlink; some systems play weird games with the mod time of symlinks
1631     # (eg FreeBSD returns the mod time of the symlink's containing
1632     # directory).
1633     if (
1634     set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1635     if test "$[*]" = "X"; then
1636     # -L didn't work.
1637     set X `ls -t $srcdir/configure conftest.file`
1638     fi
1639     rm -f conftest.file
1640     if test "$[*]" != "X $srcdir/configure conftest.file" \
1641     && test "$[*]" != "X conftest.file $srcdir/configure"; then
1642    
1643     # If neither matched, then we have a broken ls. This can happen
1644     # if, for instance, CONFIG_SHELL is bash and it inherits a
1645     # broken ls alias from the environment. This has actually
1646     # happened. Such a system could not be considered "sane".
1647     AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1648     alias in your environment])
1649     fi
1650    
1651     test "$[2]" = conftest.file
1652     )
1653     then
1654     # Ok.
1655     :
1656     else
1657     AC_MSG_ERROR([newly created file is older than distributed files!
1658     Check your system clock])
1659     fi
1660     AC_MSG_RESULT(yes)])
1661    
1662     # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1663     #
1664     # This file is free software; the Free Software Foundation
1665     # gives unlimited permission to copy and/or distribute it,
1666     # with or without modifications, as long as this notice is preserved.
1667    
1668     # AM_PROG_INSTALL_STRIP
1669     # ---------------------
1670     # One issue with vendor `install' (even GNU) is that you can't
1671     # specify the program used to strip binaries. This is especially
1672     # annoying in cross-compiling environments, where the build's strip
1673     # is unlikely to handle the host's binaries.
1674     # Fortunately install-sh will honor a STRIPPROG variable, so we
1675     # always use install-sh in `make install-strip', and initialize
1676     # STRIPPROG with the value of the STRIP variable (set by the user).
1677     AC_DEFUN([AM_PROG_INSTALL_STRIP],
1678     [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1679     # Installed binaries are usually stripped using `strip' when the user
1680     # run `make install-strip'. However `strip' might not be the right
1681     # tool to use in cross-compilation environments, therefore Automake
1682     # will honor the `STRIP' environment variable to overrule this program.
1683     dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1684     if test "$cross_compiling" != no; then
1685     AC_CHECK_TOOL([STRIP], [strip], :)
1686     fi
1687     INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1688     AC_SUBST([INSTALL_STRIP_PROGRAM])])
1689    
1690     # Check how to create a tarball. -*- Autoconf -*-
1691    
1692     # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1693     #
1694     # This file is free software; the Free Software Foundation
1695     # gives unlimited permission to copy and/or distribute it,
1696     # with or without modifications, as long as this notice is preserved.
1697    
1698     # serial 2
1699    
1700     # _AM_PROG_TAR(FORMAT)
1701     # --------------------
1702     # Check how to create a tarball in format FORMAT.
1703     # FORMAT should be one of `v7', `ustar', or `pax'.
1704     #
1705     # Substitute a variable $(am__tar) that is a command
1706     # writing to stdout a FORMAT-tarball containing the directory
1707     # $tardir.
1708     # tardir=directory && $(am__tar) > result.tar
1709     #
1710     # Substitute a variable $(am__untar) that extract such
1711     # a tarball read from stdin.
1712     # $(am__untar) < result.tar
1713     AC_DEFUN([_AM_PROG_TAR],
1714     [# Always define AMTAR for backward compatibility.
1715     AM_MISSING_PROG([AMTAR], [tar])
1716     m4_if([$1], [v7],
1717     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1718     [m4_case([$1], [ustar],, [pax],,
1719     [m4_fatal([Unknown tar format])])
1720     AC_MSG_CHECKING([how to create a $1 tar archive])
1721     # Loop over all known methods to create a tar archive until one works.
1722     _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1723     _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1724     # Do not fold the above two line into one, because Tru64 sh and
1725     # Solaris sh will not grok spaces in the rhs of `-'.
1726     for _am_tool in $_am_tools
1727     do
1728     case $_am_tool in
1729     gnutar)
1730     for _am_tar in tar gnutar gtar;
1731     do
1732     AM_RUN_LOG([$_am_tar --version]) && break
1733     done
1734     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1735     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1736     am__untar="$_am_tar -xf -"
1737     ;;
1738     plaintar)
1739     # Must skip GNU tar: if it does not support --format= it doesn't create
1740     # ustar tarball either.
1741     (tar --version) >/dev/null 2>&1 && continue
1742     am__tar='tar chf - "$$tardir"'
1743     am__tar_='tar chf - "$tardir"'
1744     am__untar='tar xf -'
1745     ;;
1746     pax)
1747     am__tar='pax -L -x $1 -w "$$tardir"'
1748     am__tar_='pax -L -x $1 -w "$tardir"'
1749     am__untar='pax -r'
1750     ;;
1751     cpio)
1752     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1753     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1754     am__untar='cpio -i -H $1 -d'
1755     ;;
1756     none)
1757     am__tar=false
1758     am__tar_=false
1759     am__untar=false
1760     ;;
1761     esac
1762    
1763     # If the value was cached, stop now. We just wanted to have am__tar
1764     # and am__untar set.
1765     test -n "${am_cv_prog_tar_$1}" && break
1766    
1767     # tar/untar a dummy directory, and stop if the command works
1768     rm -rf conftest.dir
1769     mkdir conftest.dir
1770     echo GrepMe > conftest.dir/file
1771     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1772     rm -rf conftest.dir
1773     if test -s conftest.tar; then
1774     AM_RUN_LOG([$am__untar <conftest.tar])
1775     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1776     fi
1777     done
1778     rm -rf conftest.dir
1779    
1780     AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1781     AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1782     AC_SUBST([am__tar])
1783     AC_SUBST([am__untar])
1784     ]) # _AM_PROG_TAR
1785    

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26