|
|
1.1.1.2 root 1: # aclocal.m4 generated automatically by aclocal 1.5
1.1 root 2:
1.1.1.2 root 3: # Copyright 1996, 1997, 1998, 1999, 2000, 2001
4: # 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.
1.1 root 13:
14: # Do all the work for Automake. This macro actually does too much --
15: # some checks are only needed if your package does certain things.
16: # But this isn't really a big deal.
17:
1.1.1.2 root 18: # serial 5
1.1 root 19:
1.1.1.2 root 20: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21: # written in clear, in which case automake, when reading aclocal.m4,
22: # will think it sees a *use*, and therefore will trigger all it's
23: # C support machinery. Also note that it means that autoscan, seeing
24: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
25:
26:
27: # We require 2.13 because we rely on SHELL being computed by configure.
28: AC_PREREQ([2.13])
29:
30: # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
31: # -----------------------------------------------------------
32: # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
33: # The purpose of this macro is to provide the user with a means to
34: # check macros which are provided without letting her know how the
35: # information is coded.
36: # If this macro is not defined by Autoconf, define it here.
37: ifdef([AC_PROVIDE_IFELSE],
38: [],
39: [define([AC_PROVIDE_IFELSE],
40: [ifdef([AC_PROVIDE_$1],
41: [$2], [$3])])])
42:
43:
44: # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
45: # ----------------------------------------------
46: AC_DEFUN([AM_INIT_AUTOMAKE],
47: [AC_REQUIRE([AC_PROG_INSTALL])dnl
48: # test to see if srcdir already configured
49: if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
50: test -f $srcdir/config.status; then
51: AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
1.1 root 52: fi
1.1.1.2 root 53:
54: # Define the identity of the package.
55: PACKAGE=$1
56: AC_SUBST(PACKAGE)dnl
57: VERSION=$2
58: AC_SUBST(VERSION)dnl
1.1 root 59: ifelse([$3],,
1.1.1.2 root 60: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
61: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
62:
63: # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
64: # the ones we care about.
65: ifdef([m4_pattern_allow],
66: [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
67:
68: # Autoconf 2.50 always computes EXEEXT. However we need to be
69: # compatible with 2.13, for now. So we always define EXEEXT, but we
70: # don't compute it.
71: AC_SUBST(EXEEXT)
72: # Similar for OBJEXT -- only we only use OBJEXT if the user actually
73: # requests that it be used. This is a bit dumb.
74: : ${OBJEXT=o}
75: AC_SUBST(OBJEXT)
76:
77: # Some tools Automake needs.
78: AC_REQUIRE([AM_SANITY_CHECK])dnl
79: AC_REQUIRE([AC_ARG_PROGRAM])dnl
80: AM_MISSING_PROG(ACLOCAL, aclocal)
81: AM_MISSING_PROG(AUTOCONF, autoconf)
82: AM_MISSING_PROG(AUTOMAKE, automake)
83: AM_MISSING_PROG(AUTOHEADER, autoheader)
84: AM_MISSING_PROG(MAKEINFO, makeinfo)
85: AM_MISSING_PROG(AMTAR, tar)
86: AM_PROG_INSTALL_SH
87: AM_PROG_INSTALL_STRIP
88: # We need awk for the "check" target. The system "awk" is bad on
89: # some platforms.
90: AC_REQUIRE([AC_PROG_AWK])dnl
91: AC_REQUIRE([AC_PROG_MAKE_SET])dnl
92: AC_REQUIRE([AM_DEP_TRACK])dnl
93: AC_REQUIRE([AM_SET_DEPDIR])dnl
94: AC_PROVIDE_IFELSE([AC_PROG_][CC],
95: [_AM_DEPENDENCIES(CC)],
96: [define([AC_PROG_][CC],
97: defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
98: AC_PROVIDE_IFELSE([AC_PROG_][CXX],
99: [_AM_DEPENDENCIES(CXX)],
100: [define([AC_PROG_][CXX],
101: defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
102: ])
1.1 root 103:
104: #
105: # Check to make sure that the build environment is sane.
106: #
107:
1.1.1.2 root 108: # serial 3
109:
110: # AM_SANITY_CHECK
111: # ---------------
112: AC_DEFUN([AM_SANITY_CHECK],
1.1 root 113: [AC_MSG_CHECKING([whether build environment is sane])
114: # Just in case
115: sleep 1
1.1.1.2 root 116: echo timestamp > conftest.file
1.1 root 117: # Do `set' in a subshell so we don't clobber the current shell's
118: # arguments. Must try -L first in case configure is actually a
119: # symlink; some systems play weird games with the mod time of symlinks
120: # (eg FreeBSD returns the mod time of the symlink's containing
121: # directory).
122: if (
1.1.1.2 root 123: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
124: if test "$[*]" = "X"; then
1.1 root 125: # -L didn't work.
1.1.1.2 root 126: set X `ls -t $srcdir/configure conftest.file`
1.1 root 127: fi
1.1.1.2 root 128: rm -f conftest.file
129: if test "$[*]" != "X $srcdir/configure conftest.file" \
130: && test "$[*]" != "X conftest.file $srcdir/configure"; then
1.1 root 131:
132: # If neither matched, then we have a broken ls. This can happen
133: # if, for instance, CONFIG_SHELL is bash and it inherits a
134: # broken ls alias from the environment. This has actually
135: # happened. Such a system could not be considered "sane".
136: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
137: alias in your environment])
138: fi
139:
1.1.1.2 root 140: test "$[2]" = conftest.file
1.1 root 141: )
142: then
143: # Ok.
144: :
145: else
146: AC_MSG_ERROR([newly created file is older than distributed files!
147: Check your system clock])
148: fi
149: AC_MSG_RESULT(yes)])
150:
1.1.1.2 root 151:
152: # serial 2
153:
154: # AM_MISSING_PROG(NAME, PROGRAM)
155: # ------------------------------
156: AC_DEFUN([AM_MISSING_PROG],
157: [AC_REQUIRE([AM_MISSING_HAS_RUN])
158: $1=${$1-"${am_missing_run}$2"}
159: AC_SUBST($1)])
160:
161:
162: # AM_MISSING_HAS_RUN
163: # ------------------
164: # Define MISSING if not defined so far and test if it supports --run.
165: # If it does, set am_missing_run to use it, otherwise, to nothing.
166: AC_DEFUN([AM_MISSING_HAS_RUN],
167: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
168: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
169: # Use eval to expand $SHELL
170: if eval "$MISSING --run true"; then
171: am_missing_run="$MISSING --run "
1.1 root 172: else
1.1.1.2 root 173: am_missing_run=
174: am_backtick='`'
175: AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
1.1 root 176: fi
1.1.1.2 root 177: ])
178:
179: # AM_AUX_DIR_EXPAND
180:
181: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
182: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
183: # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
184: #
185: # Of course, Automake must honor this variable whenever it calls a
186: # tool from the auxiliary directory. The problem is that $srcdir (and
187: # therefore $ac_aux_dir as well) can be either absolute or relative,
188: # depending on how configure is run. This is pretty annoying, since
189: # it makes $ac_aux_dir quite unusable in subdirectories: in the top
190: # source directory, any form will work fine, but in subdirectories a
191: # relative path needs to be adjusted first.
192: #
193: # $ac_aux_dir/missing
194: # fails when called from a subdirectory if $ac_aux_dir is relative
195: # $top_srcdir/$ac_aux_dir/missing
196: # fails if $ac_aux_dir is absolute,
197: # fails when called from a subdirectory in a VPATH build with
198: # a relative $ac_aux_dir
199: #
200: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
201: # are both prefixed by $srcdir. In an in-source build this is usually
202: # harmless because $srcdir is `.', but things will broke when you
203: # start a VPATH build or use an absolute $srcdir.
204: #
205: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
206: # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
207: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
208: # and then we would define $MISSING as
209: # MISSING="\${SHELL} $am_aux_dir/missing"
210: # This will work as long as MISSING is not called from configure, because
211: # unfortunately $(top_srcdir) has no meaning in configure.
212: # However there are other variables, like CC, which are often used in
213: # configure, and could therefore not use this "fixed" $ac_aux_dir.
214: #
215: # Another solution, used here, is to always expand $ac_aux_dir to an
216: # absolute PATH. The drawback is that using absolute paths prevent a
217: # configured tree to be moved without reconfiguration.
218:
219: AC_DEFUN([AM_AUX_DIR_EXPAND], [
220: # expand $ac_aux_dir to an absolute path
221: am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
222: ])
223:
224: # AM_PROG_INSTALL_SH
225: # ------------------
226: # Define $install_sh.
227: AC_DEFUN([AM_PROG_INSTALL_SH],
228: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
229: install_sh=${install_sh-"$am_aux_dir/install-sh"}
230: AC_SUBST(install_sh)])
231:
232: # One issue with vendor `install' (even GNU) is that you can't
233: # specify the program used to strip binaries. This is especially
234: # annoying in cross-compiling environments, where the build's strip
235: # is unlikely to handle the host's binaries.
236: # Fortunately install-sh will honor a STRIPPROG variable, so we
237: # always use install-sh in `make install-strip', and initialize
238: # STRIPPROG with the value of the STRIP variable (set by the user).
239: AC_DEFUN([AM_PROG_INSTALL_STRIP],
240: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
241: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
242: AC_SUBST([INSTALL_STRIP_PROGRAM])])
243:
244: # serial 4 -*- Autoconf -*-
245:
246:
247:
248: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
249: # written in clear, in which case automake, when reading aclocal.m4,
250: # will think it sees a *use*, and therefore will trigger all it's
251: # C support machinery. Also note that it means that autoscan, seeing
252: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
253:
254:
255:
256: # _AM_DEPENDENCIES(NAME)
257: # ---------------------
258: # See how the compiler implements dependency checking.
259: # NAME is "CC", "CXX" or "OBJC".
260: # We try a few techniques and use that to set a single cache variable.
261: #
262: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
263: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
264: # dependency, and given that the user is not expected to run this macro,
265: # just rely on AC_PROG_CC.
266: AC_DEFUN([_AM_DEPENDENCIES],
267: [AC_REQUIRE([AM_SET_DEPDIR])dnl
268: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
269: AC_REQUIRE([AM_MAKE_INCLUDE])dnl
270: AC_REQUIRE([AM_DEP_TRACK])dnl
271:
272: ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
273: [$1], CXX, [depcc="$CXX" am_compiler_list=],
274: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
275: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
276: [depcc="$$1" am_compiler_list=])
277:
278: AC_CACHE_CHECK([dependency style of $depcc],
279: [am_cv_$1_dependencies_compiler_type],
280: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
281: # We make a subdir and do the tests there. Otherwise we can end up
282: # making bogus files that we don't know about and never remove. For
283: # instance it was reported that on HP-UX the gcc test will end up
284: # making a dummy file named `D' -- because `-MD' means `put the output
285: # in D'.
286: mkdir conftest.dir
287: # Copy depcomp to subdir because otherwise we won't find it if we're
288: # using a relative directory.
289: cp "$am_depcomp" conftest.dir
290: cd conftest.dir
291:
292: am_cv_$1_dependencies_compiler_type=none
293: if test "$am_compiler_list" = ""; then
294: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
295: fi
296: for depmode in $am_compiler_list; do
297: # We need to recreate these files for each test, as the compiler may
298: # overwrite some of them when testing with obscure command lines.
299: # This happens at least with the AIX C compiler.
300: echo '#include "conftest.h"' > conftest.c
301: echo 'int i;' > conftest.h
302: echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
303:
304: case $depmode in
305: nosideeffect)
306: # after this tag, mechanisms are not by side-effect, so they'll
307: # only be used when explicitly requested
308: if test "x$enable_dependency_tracking" = xyes; then
309: continue
310: else
311: break
312: fi
313: ;;
314: none) break ;;
315: esac
316: # We check with `-c' and `-o' for the sake of the "dashmstdout"
317: # mode. It turns out that the SunPro C++ compiler does not properly
318: # handle `-M -o', and we need to detect this.
319: if depmode=$depmode \
320: source=conftest.c object=conftest.o \
321: depfile=conftest.Po tmpdepfile=conftest.TPo \
322: $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
323: grep conftest.h conftest.Po > /dev/null 2>&1 &&
324: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
325: am_cv_$1_dependencies_compiler_type=$depmode
326: break
327: fi
328: done
329:
330: cd ..
331: rm -rf conftest.dir
332: else
333: am_cv_$1_dependencies_compiler_type=none
334: fi
335: ])
336: $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
337: AC_SUBST([$1DEPMODE])
338: ])
339:
340:
341: # AM_SET_DEPDIR
342: # -------------
343: # Choose a directory name for dependency files.
344: # This macro is AC_REQUIREd in _AM_DEPENDENCIES
345: AC_DEFUN([AM_SET_DEPDIR],
346: [rm -f .deps 2>/dev/null
347: mkdir .deps 2>/dev/null
348: if test -d .deps; then
349: DEPDIR=.deps
350: else
351: # MS-DOS does not allow filenames that begin with a dot.
352: DEPDIR=_deps
353: fi
354: rmdir .deps 2>/dev/null
355: AC_SUBST(DEPDIR)
356: ])
357:
358:
359: # AM_DEP_TRACK
360: # ------------
361: AC_DEFUN([AM_DEP_TRACK],
362: [AC_ARG_ENABLE(dependency-tracking,
363: [ --disable-dependency-tracking Speeds up one-time builds
364: --enable-dependency-tracking Do not reject slow dependency extractors])
365: if test "x$enable_dependency_tracking" != xno; then
366: am_depcomp="$ac_aux_dir/depcomp"
367: AMDEPBACKSLASH='\'
368: fi
369: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
370: pushdef([subst], defn([AC_SUBST]))
371: subst(AMDEPBACKSLASH)
372: popdef([subst])
373: ])
374:
375: # Generate code to set up dependency tracking.
376: # This macro should only be invoked once -- use via AC_REQUIRE.
377: # Usage:
378: # AM_OUTPUT_DEPENDENCY_COMMANDS
379:
380: #
381: # This code is only required when automatic dependency tracking
382: # is enabled. FIXME. This creates each `.P' file that we will
383: # need in order to bootstrap the dependency handling code.
384: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
385: AC_OUTPUT_COMMANDS([
386: test x"$AMDEP_TRUE" != x"" ||
387: for mf in $CONFIG_FILES; do
388: case "$mf" in
389: Makefile) dirpart=.;;
390: */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
391: *) continue;;
392: esac
393: grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
394: # Extract the definition of DEP_FILES from the Makefile without
395: # running `make'.
396: DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
397: test -z "$DEPDIR" && continue
398: # When using ansi2knr, U may be empty or an underscore; expand it
399: U=`sed -n -e '/^U = / s///p' < "$mf"`
400: test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
401: # We invoke sed twice because it is the simplest approach to
402: # changing $(DEPDIR) to its actual value in the expansion.
403: for file in `sed -n -e '
404: /^DEP_FILES = .*\\\\$/ {
405: s/^DEP_FILES = //
406: :loop
407: s/\\\\$//
408: p
409: n
410: /\\\\$/ b loop
411: p
412: }
413: /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
414: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
415: # Make sure the directory exists.
416: test -f "$dirpart/$file" && continue
417: fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
418: $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
419: # echo "creating $dirpart/$file"
420: echo '# dummy' > "$dirpart/$file"
421: done
422: done
423: ], [AMDEP_TRUE="$AMDEP_TRUE"
424: ac_aux_dir="$ac_aux_dir"])])
425:
426: # AM_MAKE_INCLUDE()
427: # -----------------
428: # Check to see how make treats includes.
429: AC_DEFUN([AM_MAKE_INCLUDE],
430: [am_make=${MAKE-make}
431: cat > confinc << 'END'
432: doit:
433: @echo done
434: END
435: # If we don't find an include directive, just comment out the code.
436: AC_MSG_CHECKING([for style of include used by $am_make])
437: am__include='#'
438: am__quote=
439: _am_result=none
440: # First try GNU make style include.
441: echo "include confinc" > confmf
442: # We grep out `Entering directory' and `Leaving directory'
443: # messages which can occur if `w' ends up in MAKEFLAGS.
444: # In particular we don't look at `^make:' because GNU make might
445: # be invoked under some other name (usually "gmake"), in which
446: # case it prints its new name instead of `make'.
447: if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
448: am__include=include
449: am__quote=
450: _am_result=GNU
451: fi
452: # Now try BSD make style include.
453: if test "$am__include" = "#"; then
454: echo '.include "confinc"' > confmf
455: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
456: am__include=.include
457: am__quote='"'
458: _am_result=BSD
459: fi
460: fi
461: AC_SUBST(am__include)
462: AC_SUBST(am__quote)
463: AC_MSG_RESULT($_am_result)
464: rm -f confinc confmf
465: ])
466:
467: # serial 3
468:
469: # AM_CONDITIONAL(NAME, SHELL-CONDITION)
470: # -------------------------------------
471: # Define a conditional.
472: #
473: # FIXME: Once using 2.50, use this:
474: # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
475: AC_DEFUN([AM_CONDITIONAL],
476: [ifelse([$1], [TRUE],
477: [errprint(__file__:__line__: [$0: invalid condition: $1
478: ])dnl
479: m4exit(1)])dnl
480: ifelse([$1], [FALSE],
481: [errprint(__file__:__line__: [$0: invalid condition: $1
482: ])dnl
483: m4exit(1)])dnl
484: AC_SUBST([$1_TRUE])
485: AC_SUBST([$1_FALSE])
486: if $2; then
487: $1_TRUE=
488: $1_FALSE='#'
489: else
490: $1_TRUE='#'
491: $1_FALSE=
492: fi])
1.1 root 493:
494: # Like AC_CONFIG_HEADER, but automatically create stamp file.
495:
1.1.1.2 root 496: # serial 3
497:
498: # When config.status generates a header, we must update the stamp-h file.
499: # This file resides in the same directory as the config header
500: # that is generated. We must strip everything past the first ":",
501: # and everything past the last "/".
502:
503: AC_PREREQ([2.12])
504:
505: AC_DEFUN([AM_CONFIG_HEADER],
506: [ifdef([AC_FOREACH],dnl
507: [dnl init our file count if it isn't already
508: m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
509: dnl prepare to store our destination file list for use in config.status
510: AC_FOREACH([_AM_File], [$1],
511: [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
512: m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
513: dnl and add it to the list of files AC keeps track of, along
514: dnl with our hook
515: AC_CONFIG_HEADERS(_AM_File,
516: dnl COMMANDS, [, INIT-CMDS]
517: [# update the timestamp
518: echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
519: ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
520: m4_popdef([_AM_Dest])])],dnl
521: [AC_CONFIG_HEADER([$1])
522: AC_OUTPUT_COMMANDS(
523: ifelse(patsubst([$1], [[^ ]], []),
524: [],
525: [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
526: patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
527: [am_indx=1
528: for am_file in $1; do
529: case " \$CONFIG_HEADERS " in
530: *" \$am_file "*)
531: am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
532: if test -n "\$am_dir"; then
533: am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
534: for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
535: am_tmpdir=\$am_tmpdir\$am_subdir/
536: if test ! -d \$am_tmpdir; then
537: mkdir \$am_tmpdir
538: fi
539: done
540: fi
541: echo timestamp > "\$am_dir"stamp-h\$am_indx
1.1 root 542: ;;
543: esac
1.1.1.2 root 544: am_indx=\`expr \$am_indx + 1\`
545: done])
546: ])]) # AM_CONFIG_HEADER
547:
548: # _AM_DIRNAME(PATH)
549: # -----------------
550: # Like AS_DIRNAME, only do it during macro expansion
551: AC_DEFUN([_AM_DIRNAME],
552: [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
553: m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
554: m4_if(m4_regexp([$1], [^/.*]), -1,
555: [.],
556: m4_patsubst([$1], [^\(/\).*], [\1])),
557: m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
558: m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
559: ]) # _AM_DIRNAME
560:
1.1.1.3 ! root 561: #serial 1
! 562: # This test replaces the one in autoconf.
! 563: # Currently this macro should have the same name as the autoconf macro
! 564: # because gettext's gettext.m4 (distributed in the automake package)
! 565: # still uses it. Otherwise, the use in gettext.m4 makes autoheader
! 566: # give these diagnostics:
! 567: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
! 568: # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
! 569:
! 570: undefine([AC_ISC_POSIX])
! 571:
! 572: AC_DEFUN([AC_ISC_POSIX],
! 573: [
! 574: dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
! 575: AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
! 576: ]
! 577: )
! 578:
1.1.1.2 root 579: # Configure paths for GTK+
580: # Owen Taylor 97-11-3
581:
582: dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
583: dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
584: dnl
585: AC_DEFUN(AM_PATH_GTK,
586: [dnl
587: dnl Get the cflags and libraries from the gtk-config script
588: dnl
589: AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
590: gtk_config_prefix="$withval", gtk_config_prefix="")
591: AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
592: gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
593: AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
594: , enable_gtktest=yes)
595:
596: for module in . $4
597: do
598: case "$module" in
599: gthread)
600: gtk_config_args="$gtk_config_args gthread"
601: ;;
602: esac
603: done
604:
605: if test x$gtk_config_exec_prefix != x ; then
606: gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
607: if test x${GTK_CONFIG+set} != xset ; then
608: GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
609: fi
610: fi
611: if test x$gtk_config_prefix != x ; then
612: gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
613: if test x${GTK_CONFIG+set} != xset ; then
614: GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
615: fi
616: fi
617:
618: AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
619: min_gtk_version=ifelse([$1], ,0.99.7,$1)
620: AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
621: no_gtk=""
622: if test "$GTK_CONFIG" = "no" ; then
623: no_gtk=yes
624: else
625: GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
626: GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
627: gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
628: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
629: gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
630: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
631: gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
632: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
633: if test "x$enable_gtktest" = "xyes" ; then
634: ac_save_CFLAGS="$CFLAGS"
635: ac_save_LIBS="$LIBS"
636: CFLAGS="$CFLAGS $GTK_CFLAGS"
637: LIBS="$GTK_LIBS $LIBS"
638: dnl
639: dnl Now check if the installed GTK is sufficiently new. (Also sanity
640: dnl checks the results of gtk-config to some extent
641: dnl
642: rm -f conf.gtktest
643: AC_TRY_RUN([
644: #include <gtk/gtk.h>
645: #include <stdio.h>
646: #include <stdlib.h>
647:
648: int
649: main ()
650: {
651: int major, minor, micro;
652: char *tmp_version;
653:
654: system ("touch conf.gtktest");
655:
656: /* HP/UX 9 (%@#!) writes to sscanf strings */
657: tmp_version = g_strdup("$min_gtk_version");
658: if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
659: printf("%s, bad version string\n", "$min_gtk_version");
660: exit(1);
661: }
662:
663: if ((gtk_major_version != $gtk_config_major_version) ||
664: (gtk_minor_version != $gtk_config_minor_version) ||
665: (gtk_micro_version != $gtk_config_micro_version))
666: {
667: printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
668: $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
669: gtk_major_version, gtk_minor_version, gtk_micro_version);
670: printf ("*** was found! If gtk-config was correct, then it is best\n");
671: printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
672: printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
673: printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
674: printf("*** required on your system.\n");
675: printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
676: printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
677: printf("*** before re-running configure\n");
678: }
679: #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
680: else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
681: (gtk_minor_version != GTK_MINOR_VERSION) ||
682: (gtk_micro_version != GTK_MICRO_VERSION))
683: {
684: printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
685: GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
686: printf("*** library (version %d.%d.%d)\n",
687: gtk_major_version, gtk_minor_version, gtk_micro_version);
688: }
689: #endif /* defined (GTK_MAJOR_VERSION) ... */
690: else
691: {
692: if ((gtk_major_version > major) ||
693: ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
694: ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
695: {
696: return 0;
697: }
698: else
699: {
700: printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
701: gtk_major_version, gtk_minor_version, gtk_micro_version);
702: printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
703: major, minor, micro);
704: printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
705: printf("***\n");
706: printf("*** If you have already installed a sufficiently new version, this error\n");
707: printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
708: printf("*** being found. The easiest way to fix this is to remove the old version\n");
709: printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
710: printf("*** correct copy of gtk-config. (In this case, you will have to\n");
711: printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
712: printf("*** so that the correct libraries are found at run-time))\n");
713: }
714: }
715: return 1;
716: }
717: ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
718: CFLAGS="$ac_save_CFLAGS"
719: LIBS="$ac_save_LIBS"
720: fi
721: fi
722: if test "x$no_gtk" = x ; then
723: AC_MSG_RESULT(yes)
724: ifelse([$2], , :, [$2])
725: else
726: AC_MSG_RESULT(no)
727: if test "$GTK_CONFIG" = "no" ; then
728: echo "*** The gtk-config script installed by GTK could not be found"
729: echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
730: echo "*** your path, or set the GTK_CONFIG environment variable to the"
731: echo "*** full path to gtk-config."
732: else
733: if test -f conf.gtktest ; then
734: :
735: else
736: echo "*** Could not run GTK test program, checking why..."
737: CFLAGS="$CFLAGS $GTK_CFLAGS"
738: LIBS="$LIBS $GTK_LIBS"
739: AC_TRY_LINK([
740: #include <gtk/gtk.h>
741: #include <stdio.h>
742: ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
743: [ echo "*** The test program compiled, but did not run. This usually means"
744: echo "*** that the run-time linker is not finding GTK or finding the wrong"
745: echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
746: echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
747: echo "*** to the installed location Also, make sure you have run ldconfig if that"
748: echo "*** is required on your system"
749: echo "***"
750: echo "*** If you have an old version installed, it is best to remove it, although"
751: echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
752: echo "***"
753: echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
754: echo "*** came with the system with the command"
755: echo "***"
756: echo "*** rpm --erase --nodeps gtk gtk-devel" ],
757: [ echo "*** The test program failed to compile or link. See the file config.log for the"
758: echo "*** exact error that occured. This usually means GTK was incorrectly installed"
759: echo "*** or that you have moved GTK since it was installed. In the latter case, you"
760: echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
761: CFLAGS="$ac_save_CFLAGS"
762: LIBS="$ac_save_LIBS"
763: fi
764: fi
765: GTK_CFLAGS=""
766: GTK_LIBS=""
767: ifelse([$3], , :, [$3])
768: fi
769: AC_SUBST(GTK_CFLAGS)
770: AC_SUBST(GTK_LIBS)
771: rm -f conf.gtktest
772: ])
773:
774: # Configure paths for SDL
775: # Sam Lantinga 9/21/99
776: # stolen from Manish Singh
777: # stolen back from Frank Belew
778: # stolen from Manish Singh
779: # Shamelessly stolen from Owen Taylor
780:
781: dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
782: dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
783: dnl
784: AC_DEFUN(AM_PATH_SDL,
785: [dnl
786: dnl Get the cflags and libraries from the sdl-config script
787: dnl
788: AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
789: sdl_prefix="$withval", sdl_prefix="")
790: AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
791: sdl_exec_prefix="$withval", sdl_exec_prefix="")
792: AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
793: , enable_sdltest=yes)
794:
795: if test x$sdl_exec_prefix != x ; then
796: sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
797: if test x${SDL_CONFIG+set} != xset ; then
798: SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
799: fi
800: fi
801: if test x$sdl_prefix != x ; then
802: sdl_args="$sdl_args --prefix=$sdl_prefix"
803: if test x${SDL_CONFIG+set} != xset ; then
804: SDL_CONFIG=$sdl_prefix/bin/sdl-config
805: fi
806: fi
807:
1.1.1.3 ! root 808: AC_REQUIRE([AC_CANONICAL_TARGET])
1.1.1.2 root 809: AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
810: min_sdl_version=ifelse([$1], ,0.11.0,$1)
811: AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
812: no_sdl=""
813: if test "$SDL_CONFIG" = "no" ; then
814: no_sdl=yes
815: else
816: SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
817: SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
818:
819: sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
820: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
821: sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
822: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
823: sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
824: sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
825: if test "x$enable_sdltest" = "xyes" ; then
826: ac_save_CFLAGS="$CFLAGS"
827: ac_save_LIBS="$LIBS"
828: CFLAGS="$CFLAGS $SDL_CFLAGS"
829: LIBS="$LIBS $SDL_LIBS"
830: dnl
831: dnl Now check if the installed SDL is sufficiently new. (Also sanity
832: dnl checks the results of sdl-config to some extent
833: dnl
834: rm -f conf.sdltest
835: AC_TRY_RUN([
836: #include <stdio.h>
837: #include <stdlib.h>
838: #include <string.h>
839: #include "SDL.h"
840:
841: char*
842: my_strdup (char *str)
843: {
844: char *new_str;
845:
846: if (str)
847: {
848: new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
849: strcpy (new_str, str);
850: }
851: else
852: new_str = NULL;
853:
854: return new_str;
855: }
856:
857: int main (int argc, char *argv[])
858: {
859: int major, minor, micro;
860: char *tmp_version;
861:
862: /* This hangs on some systems (?)
863: system ("touch conf.sdltest");
864: */
865: { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
866:
867: /* HP/UX 9 (%@#!) writes to sscanf strings */
868: tmp_version = my_strdup("$min_sdl_version");
869: if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
870: printf("%s, bad version string\n", "$min_sdl_version");
871: exit(1);
872: }
873:
874: if (($sdl_major_version > major) ||
875: (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
876: (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
877: {
878: return 0;
879: }
880: else
881: {
882: printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
883: printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
884: printf("*** best to upgrade to the required version.\n");
885: printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
886: printf("*** to point to the correct copy of sdl-config, and remove the file\n");
887: printf("*** config.cache before re-running configure\n");
888: return 1;
889: }
890: }
891:
892: ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
893: CFLAGS="$ac_save_CFLAGS"
894: LIBS="$ac_save_LIBS"
895: fi
896: fi
897: if test "x$no_sdl" = x ; then
898: AC_MSG_RESULT(yes)
899: ifelse([$2], , :, [$2])
900: else
901: AC_MSG_RESULT(no)
902: if test "$SDL_CONFIG" = "no" ; then
903: echo "*** The sdl-config script installed by SDL could not be found"
904: echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
905: echo "*** your path, or set the SDL_CONFIG environment variable to the"
906: echo "*** full path to sdl-config."
907: else
908: if test -f conf.sdltest ; then
909: :
910: else
911: echo "*** Could not run SDL test program, checking why..."
912: CFLAGS="$CFLAGS $SDL_CFLAGS"
913: LIBS="$LIBS $SDL_LIBS"
914: AC_TRY_LINK([
915: #include <stdio.h>
916: #include "SDL.h"
917:
918: int main(int argc, char *argv[])
919: { return 0; }
920: #undef main
921: #define main K_and_R_C_main
922: ], [ return 0; ],
923: [ echo "*** The test program compiled, but did not run. This usually means"
924: echo "*** that the run-time linker is not finding SDL or finding the wrong"
925: echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
926: echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
927: echo "*** to the installed location Also, make sure you have run ldconfig if that"
928: echo "*** is required on your system"
929: echo "***"
930: echo "*** If you have an old version installed, it is best to remove it, although"
931: echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
932: [ echo "*** The test program failed to compile or link. See the file config.log for the"
933: echo "*** exact error that occured. This usually means SDL was incorrectly installed"
934: echo "*** or that you have moved SDL since it was installed. In the latter case, you"
935: echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
936: CFLAGS="$ac_save_CFLAGS"
937: LIBS="$ac_save_LIBS"
938: fi
939: fi
940: SDL_CFLAGS=""
941: SDL_LIBS=""
942: ifelse([$3], , :, [$3])
943: fi
944: AC_SUBST(SDL_CFLAGS)
945: AC_SUBST(SDL_LIBS)
946: rm -f conf.sdltest
947: ])
1.1 root 948:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.