]> git.draconx.ca Git - gob-dx.git/blob - aclocal.m4
Release 2.0.2
[gob-dx.git] / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
2
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
12
13 # Like AC_CONFIG_HEADER, but automatically create stamp file.
14
15 AC_DEFUN([AM_CONFIG_HEADER],
16 [AC_PREREQ([2.12])
17 AC_CONFIG_HEADER([$1])
18 dnl When config.status generates a header, we must update the stamp-h file.
19 dnl This file resides in the same directory as the config header
20 dnl that is generated.  We must strip everything past the first ":",
21 dnl and everything past the last "/".
22 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
25 <<am_indx=1
26 for am_file in <<$1>>; do
27   case " <<$>>CONFIG_HEADERS " in
28   *" <<$>>am_file "*<<)>>
29     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
30     ;;
31   esac
32   am_indx=`expr "<<$>>am_indx" + 1`
33 done<<>>dnl>>)
34 changequote([,]))])
35
36 # Do all the work for Automake.  This macro actually does too much --
37 # some checks are only needed if your package does certain things.
38 # But this isn't really a big deal.
39
40 # serial 1
41
42 dnl Usage:
43 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
44
45 AC_DEFUN([AM_INIT_AUTOMAKE],
46 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
47 AC_REQUIRE([AC_PROG_INSTALL])
48 PACKAGE=[$1]
49 AC_SUBST(PACKAGE)
50 VERSION=[$2]
51 AC_SUBST(VERSION)
52 dnl test to see if srcdir already configured
53 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
54   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
55 fi
56 ifelse([$3],,
57 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
58 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
59 AC_REQUIRE([AM_SANITY_CHECK])
60 AC_REQUIRE([AC_ARG_PROGRAM])
61 dnl FIXME This is truly gross.
62 missing_dir=`cd $ac_aux_dir && pwd`
63 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
64 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
65 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
66 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
67 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
68 AC_REQUIRE([AC_PROG_MAKE_SET])])
69
70 # Copyright 2002  Free Software Foundation, Inc.
71
72 # This program is free software; you can redistribute it and/or modify
73 # it under the terms of the GNU General Public License as published by
74 # the Free Software Foundation; either version 2, or (at your option)
75 # any later version.
76
77 # This program is distributed in the hope that it will be useful,
78 # but WITHOUT ANY WARRANTY; without even the implied warranty of
79 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
80 # GNU General Public License for more details.
81
82 # You should have received a copy of the GNU General Public License
83 # along with this program; if not, write to the Free Software
84 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
85
86 # AM_AUTOMAKE_VERSION(VERSION)
87 # ----------------------------
88 # Automake X.Y traces this macro to ensure aclocal.m4 has been
89 # generated from the m4 files accompanying Automake X.Y.
90 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
91
92 # AM_SET_CURRENT_AUTOMAKE_VERSION
93 # -------------------------------
94 # Call AM_AUTOMAKE_VERSION so it can be traced.
95 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
96 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
97          [AM_AUTOMAKE_VERSION([1.4-p6])])
98
99 #
100 # Check to make sure that the build environment is sane.
101 #
102
103 AC_DEFUN([AM_SANITY_CHECK],
104 [AC_MSG_CHECKING([whether build environment is sane])
105 # Just in case
106 sleep 1
107 echo timestamp > conftestfile
108 # Do `set' in a subshell so we don't clobber the current shell's
109 # arguments.  Must try -L first in case configure is actually a
110 # symlink; some systems play weird games with the mod time of symlinks
111 # (eg FreeBSD returns the mod time of the symlink's containing
112 # directory).
113 if (
114    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
115    if test "[$]*" = "X"; then
116       # -L didn't work.
117       set X `ls -t $srcdir/configure conftestfile`
118    fi
119    if test "[$]*" != "X $srcdir/configure conftestfile" \
120       && test "[$]*" != "X conftestfile $srcdir/configure"; then
121
122       # If neither matched, then we have a broken ls.  This can happen
123       # if, for instance, CONFIG_SHELL is bash and it inherits a
124       # broken ls alias from the environment.  This has actually
125       # happened.  Such a system could not be considered "sane".
126       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
127 alias in your environment])
128    fi
129
130    test "[$]2" = conftestfile
131    )
132 then
133    # Ok.
134    :
135 else
136    AC_MSG_ERROR([newly created file is older than distributed files!
137 Check your system clock])
138 fi
139 rm -f conftest*
140 AC_MSG_RESULT(yes)])
141
142 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
143 dnl The program must properly implement --version.
144 AC_DEFUN([AM_MISSING_PROG],
145 [AC_MSG_CHECKING(for working $2)
146 # Run test in a subshell; some versions of sh will print an error if
147 # an executable is not found, even if stderr is redirected.
148 # Redirect stdin to placate older versions of autoconf.  Sigh.
149 if ($2 --version) < /dev/null > /dev/null 2>&1; then
150    $1=$2
151    AC_MSG_RESULT(found)
152 else
153    $1="$3/missing $2"
154    AC_MSG_RESULT(missing)
155 fi
156 AC_SUBST($1)])
157
158 # Add --enable-maintainer-mode option to configure.
159 # From Jim Meyering
160
161 # serial 1
162
163 AC_DEFUN([AM_MAINTAINER_MODE],
164 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
165   dnl maintainer-mode is disabled by default
166   AC_ARG_ENABLE(maintainer-mode,
167 [  --enable-maintainer-mode enable make rules and dependencies not useful
168                           (and sometimes confusing) to the casual installer],
169       USE_MAINTAINER_MODE=$enableval,
170       USE_MAINTAINER_MODE=no)
171   AC_MSG_RESULT($USE_MAINTAINER_MODE)
172   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
173   MAINT=$MAINTAINER_MODE_TRUE
174   AC_SUBST(MAINT)dnl
175 ]
176 )
177
178 # Define a conditional.
179
180 AC_DEFUN([AM_CONDITIONAL],
181 [AC_SUBST($1_TRUE)
182 AC_SUBST($1_FALSE)
183 if $2; then
184   $1_TRUE=
185   $1_FALSE='#'
186 else
187   $1_TRUE='#'
188   $1_FALSE=
189 fi])
190
191 #serial 1
192 # This test replaces the one in autoconf.
193 # Currently this macro should have the same name as the autoconf macro
194 # because gettext's gettext.m4 (distributed in the automake package)
195 # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
196 # give these diagnostics:
197 #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
198 #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
199
200 undefine([AC_ISC_POSIX])
201
202 AC_DEFUN([AC_ISC_POSIX],
203   [
204     dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
205     AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
206   ]
207 )
208
209
210 dnl AM_PROG_LEX
211 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
212 AC_DEFUN([AM_PROG_LEX],
213 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
214 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
215 AC_PROG_LEX
216 AC_DECL_YYTEXT])
217
218
219 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
220 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
221 dnl also defines GSTUFF_PKG_ERRORS on error
222 AC_DEFUN(PKG_CHECK_MODULES, [
223   succeeded=no
224
225   if test -z "$PKG_CONFIG"; then
226     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
227   fi
228
229   if test "$PKG_CONFIG" = "no" ; then
230      echo "*** The pkg-config script could not be found. Make sure it is"
231      echo "*** in your path, or set the PKG_CONFIG environment variable"
232      echo "*** to the full path to pkg-config."
233      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
234   else
235      PKG_CONFIG_MIN_VERSION=0.9.0
236      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
237         AC_MSG_CHECKING(for $2)
238
239         if $PKG_CONFIG --exists "$2" ; then
240             AC_MSG_RESULT(yes)
241             succeeded=yes
242
243             AC_MSG_CHECKING($1_CFLAGS)
244             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
245             AC_MSG_RESULT($$1_CFLAGS)
246
247             AC_MSG_CHECKING($1_LIBS)
248             $1_LIBS=`$PKG_CONFIG --libs "$2"`
249             AC_MSG_RESULT($$1_LIBS)
250         else
251             $1_CFLAGS=""
252             $1_LIBS=""
253             ## If we have a custom action on failure, don't print errors, but 
254             ## do set a variable so people can do so.
255             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
256             ifelse([$4], ,echo $$1_PKG_ERRORS,)
257         fi
258
259         AC_SUBST($1_CFLAGS)
260         AC_SUBST($1_LIBS)
261      else
262         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
263         echo "*** See http://www.freedesktop.org/software/pkgconfig"
264      fi
265   fi
266
267   if test $succeeded = yes; then
268      ifelse([$3], , :, [$3])
269   else
270      ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
271   fi
272 ])
273
274
275