1.1.19
by Didier Roche
Import upstream version 0.13.1 |
1 |
# generated automatically by aclocal 1.11.1 -*- Autoconf -*- |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
2 |
|
3 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
4 |
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
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 |
||
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
14 |
m4_ifndef([AC_AUTOCONF_VERSION], |
15 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
16 |
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, |
17 |
[m4_warning([this file was generated for autoconf 2.66. |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
18 |
You have another version of autoconf. It may work, but is not guaranteed to.
|
19 |
If you have problems, you may need to regenerate the build system entirely.
|
|
20 |
To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
|
21 |
||
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
22 |
# Copyright (C) 1995-2002 Free Software Foundation, Inc. |
23 |
# Copyright (C) 2001-2003,2004 Red Hat, Inc. |
|
24 |
#
|
|
25 |
# This file is free software, distributed under the terms of the GNU |
|
26 |
# General Public License. As a special exception to the GNU General |
|
27 |
# Public License, this file may be distributed as part of a program |
|
28 |
# that contains a configuration script generated by Autoconf, under |
|
29 |
# the same distribution terms as the rest of that program. |
|
30 |
#
|
|
31 |
# This file can be copied and used freely without restrictions. It can |
|
32 |
# be used in projects which are not available under the GNU Public License |
|
33 |
# but which still want to provide support for the GNU gettext functionality. |
|
34 |
#
|
|
35 |
# Macro to add for using GNU gettext. |
|
36 |
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
|
37 |
#
|
|
38 |
# Modified to never use included libintl. |
|
39 |
# Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
|
40 |
#
|
|
41 |
# Major rework to remove unused code |
|
42 |
# Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
|
43 |
#
|
|
44 |
# Added better handling of ALL_LINGUAS from GNU gettext version |
|
45 |
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
|
46 |
#
|
|
47 |
# Modified to require ngettext |
|
48 |
# Matthias Clasen <mclasen@redhat.com> 08/06/2004 |
|
49 |
#
|
|
50 |
# We need this here as well, since someone might use autoconf-2.5x |
|
51 |
# to configure GLib then an older version to configure a package |
|
52 |
# using AM_GLIB_GNU_GETTEXT |
|
53 |
AC_PREREQ(2.53) |
|
54 |
||
55 |
dnl
|
|
56 |
dnl We go to great lengths to make sure that aclocal won't |
|
57 |
dnl try to pull in the installed version of these macros
|
|
58 |
dnl when running aclocal in the glib directory.
|
|
59 |
dnl
|
|
60 |
m4_copy([AC_DEFUN],[glib_DEFUN])
|
|
61 |
m4_copy([AC_REQUIRE],[glib_REQUIRE])
|
|
62 |
dnl
|
|
63 |
dnl At the end, if we're not within glib, we'll define the public |
|
64 |
dnl definitions in terms of our private definitions.
|
|
65 |
dnl
|
|
66 |
||
67 |
# GLIB_LC_MESSAGES
|
|
68 |
#--------------------
|
|
69 |
glib_DEFUN([GLIB_LC_MESSAGES],
|
|
70 |
[AC_CHECK_HEADERS([locale.h])
|
|
71 |
if test $ac_cv_header_locale_h = yes; then
|
|
72 |
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
|
73 |
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
|
74 |
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
|
75 |
if test $am_cv_val_LC_MESSAGES = yes; then
|
|
76 |
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
|
77 |
[Define if your <locale.h> file defines LC_MESSAGES.])
|
|
78 |
fi
|
|
79 |
fi])
|
|
80 |
||
81 |
# GLIB_PATH_PROG_WITH_TEST
|
|
82 |
#----------------------------
|
|
83 |
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
|
84 |
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|
85 |
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
|
|
86 |
[# Extract the first word of "$2", so it can be a program name with args.
|
|
87 |
set dummy $2; ac_word=[$]2
|
|
88 |
AC_MSG_CHECKING([for $ac_word])
|
|
89 |
AC_CACHE_VAL(ac_cv_path_$1,
|
|
90 |
[case "[$]$1" in
|
|
91 |
/*)
|
|
92 |
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|
93 |
;;
|
|
94 |
*)
|
|
95 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
96 |
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|
97 |
test -z "$ac_dir" && ac_dir=.
|
|
98 |
if test -f $ac_dir/$ac_word; then
|
|
99 |
if [$3]; then
|
|
100 |
ac_cv_path_$1="$ac_dir/$ac_word"
|
|
101 |
break
|
|
102 |
fi
|
|
103 |
fi
|
|
104 |
done
|
|
105 |
IFS="$ac_save_ifs"
|
|
106 |
dnl If no 4th arg is given, leave the cache variable unset,
|
|
107 |
dnl so AC_PATH_PROGS will keep looking.
|
|
108 |
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|
109 |
])dnl
|
|
110 |
;;
|
|
111 |
esac])dnl
|
|
112 |
$1="$ac_cv_path_$1"
|
|
113 |
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
|
114 |
AC_MSG_RESULT([$]$1)
|
|
115 |
else
|
|
116 |
AC_MSG_RESULT(no)
|
|
117 |
fi
|
|
118 |
AC_SUBST($1)dnl
|
|
119 |
])
|
|
120 |
||
121 |
# GLIB_WITH_NLS
|
|
122 |
#-----------------
|
|
123 |
glib_DEFUN([GLIB_WITH_NLS],
|
|
124 |
dnl NLS is obligatory
|
|
125 |
[USE_NLS=yes
|
|
126 |
AC_SUBST(USE_NLS)
|
|
127 |
||
128 |
gt_cv_have_gettext=no
|
|
129 |
||
130 |
CATOBJEXT=NONE
|
|
131 |
XGETTEXT=:
|
|
132 |
INTLLIBS=
|
|
133 |
||
134 |
AC_CHECK_HEADER(libintl.h,
|
|
135 |
[gt_cv_func_dgettext_libintl="no"
|
|
136 |
libintl_extra_libs=""
|
|
137 |
||
138 |
#
|
|
139 |
# First check in libc
|
|
140 |
#
|
|
141 |
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
|
|
142 |
[AC_TRY_LINK([
|
|
143 |
#include <libintl.h>
|
|
144 |
],
|
|
145 |
[return !ngettext ("","", 1)],
|
|
146 |
gt_cv_func_ngettext_libc=yes,
|
|
147 |
gt_cv_func_ngettext_libc=no)
|
|
148 |
])
|
|
149 |
|
|
150 |
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
|
151 |
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
|
152 |
[AC_TRY_LINK([
|
|
153 |
#include <libintl.h>
|
|
154 |
],
|
|
155 |
[return !dgettext ("","")],
|
|
156 |
gt_cv_func_dgettext_libc=yes,
|
|
157 |
gt_cv_func_dgettext_libc=no)
|
|
158 |
])
|
|
159 |
fi
|
|
160 |
|
|
161 |
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
|
162 |
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
|
163 |
fi
|
|
164 |
||
165 |
#
|
|
166 |
# If we don't have everything we want, check in libintl |
|
167 |
# |
|
168 |
if test "$gt_cv_func_dgettext_libc" != "yes" \ |
|
169 |
|| test "$gt_cv_func_ngettext_libc" != "yes" \ |
|
170 |
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
|
171 |
|
|
172 |
AC_CHECK_LIB(intl, bindtextdomain, |
|
173 |
[AC_CHECK_LIB(intl, ngettext, |
|
174 |
[AC_CHECK_LIB(intl, dgettext,
|
|
175 |
gt_cv_func_dgettext_libintl=yes)])]) |
|
176 |
||
177 |
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
|
178 |
AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
|
179 |
AC_MSG_RESULT([]) |
|
180 |
AC_CHECK_LIB(intl, ngettext, |
|
181 |
[AC_CHECK_LIB(intl, dcgettext, |
|
182 |
[gt_cv_func_dgettext_libintl=yes
|
|
183 |
libintl_extra_libs=-liconv], |
|
184 |
:,-liconv)], |
|
185 |
:,-liconv) |
|
186 |
fi |
|
187 |
||
188 |
# |
|
189 |
# If we found libintl, then check in it for bind_textdomain_codeset(); |
|
190 |
# we'll prefer libc if neither have bind_textdomain_codeset(), |
|
191 |
# and both have dgettext and ngettext
|
|
192 |
#
|
|
193 |
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
|
|
194 |
glib_save_LIBS="$LIBS"
|
|
195 |
LIBS="$LIBS -lintl $libintl_extra_libs"
|
|
196 |
unset ac_cv_func_bind_textdomain_codeset
|
|
197 |
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
|
198 |
LIBS="$glib_save_LIBS"
|
|
199 |
||
200 |
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
|
|
201 |
gt_cv_func_dgettext_libc=no
|
|
202 |
else
|
|
203 |
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
|
204 |
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
|
|
205 |
gt_cv_func_dgettext_libintl=no
|
|
206 |
fi
|
|
207 |
fi
|
|
208 |
fi
|
|
209 |
fi
|
|
210 |
||
211 |
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
|
212 |
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
|
213 |
gt_cv_have_gettext=yes
|
|
214 |
fi
|
|
215 |
|
|
216 |
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
|
217 |
INTLLIBS="-lintl $libintl_extra_libs"
|
|
218 |
fi
|
|
219 |
|
|
220 |
if test "$gt_cv_have_gettext" = "yes"; then
|
|
221 |
AC_DEFINE(HAVE_GETTEXT,1,
|
|
222 |
[Define if the GNU gettext() function is already present or preinstalled.])
|
|
223 |
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
224 |
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
|
225 |
if test "$MSGFMT" != "no"; then
|
|
226 |
glib_save_LIBS="$LIBS"
|
|
227 |
LIBS="$LIBS $INTLLIBS"
|
|
228 |
AC_CHECK_FUNCS(dcgettext)
|
|
229 |
MSGFMT_OPTS=
|
|
230 |
AC_MSG_CHECKING([if msgfmt accepts -c])
|
|
231 |
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
|
|
232 |
msgid ""
|
|
233 |
msgstr ""
|
|
234 |
"Content-Type: text/plain; charset=UTF-8\n"
|
|
235 |
"Project-Id-Version: test 1.0\n"
|
|
236 |
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
|
|
237 |
"Last-Translator: test <foo@bar.xx>\n"
|
|
238 |
"Language-Team: C <LL@li.org>\n"
|
|
239 |
"MIME-Version: 1.0\n"
|
|
240 |
"Content-Transfer-Encoding: 8bit\n"
|
|
241 |
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
|
242 |
AC_SUBST(MSGFMT_OPTS)
|
|
243 |
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
244 |
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
245 |
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
|
246 |
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
|
247 |
return _nl_msg_cat_cntr],
|
|
248 |
[CATOBJEXT=.gmo
|
|
249 |
DATADIRNAME=share],
|
|
250 |
[case $host in
|
|
251 |
*-*-solaris*)
|
|
252 |
dnl On Solaris, if bind_textdomain_codeset is in libc,
|
|
253 |
dnl GNU format message catalog is always supported,
|
|
254 |
dnl since both are added to the libc all together.
|
|
255 |
dnl Hence, we'd like to go with DATADIRNAME=share and |
|
256 |
dnl and CATOBJEXT=.gmo in this case. |
|
257 |
AC_CHECK_FUNC(bind_textdomain_codeset, |
|
258 |
[CATOBJEXT=.gmo |
|
259 |
DATADIRNAME=share], |
|
260 |
[CATOBJEXT=.mo |
|
261 |
DATADIRNAME=lib]) |
|
262 |
;; |
|
263 |
*) |
|
264 |
CATOBJEXT=.mo |
|
265 |
DATADIRNAME=lib |
|
266 |
;; |
|
267 |
esac]) |
|
268 |
LIBS="$glib_save_LIBS" |
|
269 |
INSTOBJEXT=.mo |
|
270 |
else |
|
271 |
gt_cv_have_gettext=no |
|
272 |
fi |
|
273 |
fi |
|
274 |
]) |
|
275 |
||
276 |
if test "$gt_cv_have_gettext" = "yes" ; then |
|
277 |
AC_DEFINE(ENABLE_NLS, 1, |
|
278 |
[always defined to indicate that i18n is enabled]) |
|
279 |
fi |
|
280 |
||
281 |
dnl Test whether we really found GNU xgettext. |
|
282 |
if test "$XGETTEXT" != ":"; then |
|
283 |
dnl If it is not GNU xgettext we define it as : so that the |
|
284 |
dnl Makefiles still can work. |
|
285 |
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
|
286 |
: ; |
|
287 |
else |
|
288 |
AC_MSG_RESULT( |
|
289 |
[found xgettext program is not GNU xgettext; ignore it]) |
|
290 |
XGETTEXT=":" |
|
291 |
fi |
|
292 |
fi |
|
293 |
||
294 |
# We need to process the po/ directory. |
|
295 |
POSUB=po |
|
296 |
||
297 |
AC_OUTPUT_COMMANDS( |
|
298 |
[case "$CONFIG_FILES" in *po/Makefile.in*) |
|
299 |
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
|
300 |
esac]) |
|
301 |
||
302 |
dnl These rules are solely for the distribution goal. While doing this |
|
303 |
dnl we only have to keep exactly one list of the available catalogs |
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
304 |
dnl in configure.ac. |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
305 |
for lang in $ALL_LINGUAS; do |
306 |
GMOFILES="$GMOFILES $lang.gmo" |
|
307 |
POFILES="$POFILES $lang.po" |
|
308 |
done |
|
309 |
||
310 |
dnl Make all variables we use known to autoconf. |
|
311 |
AC_SUBST(CATALOGS) |
|
312 |
AC_SUBST(CATOBJEXT) |
|
313 |
AC_SUBST(DATADIRNAME) |
|
314 |
AC_SUBST(GMOFILES) |
|
315 |
AC_SUBST(INSTOBJEXT) |
|
316 |
AC_SUBST(INTLLIBS) |
|
317 |
AC_SUBST(PO_IN_DATADIR_TRUE) |
|
318 |
AC_SUBST(PO_IN_DATADIR_FALSE) |
|
319 |
AC_SUBST(POFILES) |
|
320 |
AC_SUBST(POSUB) |
|
321 |
]) |
|
322 |
||
323 |
# AM_GLIB_GNU_GETTEXT |
|
324 |
# ------------------- |
|
325 |
# Do checks necessary for use of gettext. If a suitable implementation |
|
326 |
# of gettext is found in either in libintl or in the C library, |
|
327 |
# it will set INTLLIBS to the libraries needed for use of gettext |
|
328 |
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
|
329 |
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
|
330 |
# on various variables needed by the Makefile.in.in installed by |
|
331 |
# glib-gettextize. |
|
332 |
dnl
|
|
333 |
glib_DEFUN([GLIB_GNU_GETTEXT], |
|
334 |
[AC_REQUIRE([AC_PROG_CC])dnl |
|
335 |
AC_REQUIRE([AC_HEADER_STDC])dnl |
|
336 |
|
|
337 |
GLIB_LC_MESSAGES |
|
338 |
GLIB_WITH_NLS |
|
339 |
||
340 |
if test "$gt_cv_have_gettext" = "yes"; then |
|
341 |
if test "x$ALL_LINGUAS" = "x"; then |
|
342 |
LINGUAS= |
|
343 |
else |
|
344 |
AC_MSG_CHECKING(for catalogs to be installed) |
|
345 |
NEW_LINGUAS= |
|
346 |
for presentlang in $ALL_LINGUAS; do |
|
347 |
useit=no |
|
348 |
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
|
349 |
desiredlanguages="$LINGUAS" |
|
350 |
else |
|
351 |
desiredlanguages="$ALL_LINGUAS" |
|
352 |
fi |
|
353 |
for desiredlang in $desiredlanguages; do |
|
354 |
# Use the presentlang catalog if desiredlang is |
|
355 |
# a. equal to presentlang, or |
|
356 |
# b. a variant of presentlang (because in this case, |
|
357 |
# presentlang can be used as a fallback for messages |
|
358 |
# which are not translated in the desiredlang catalog). |
|
359 |
case "$desiredlang" in |
|
360 |
"$presentlang"*) useit=yes;; |
|
361 |
esac |
|
362 |
done |
|
363 |
if test $useit = yes; then |
|
364 |
NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
|
365 |
fi |
|
366 |
done |
|
367 |
LINGUAS=$NEW_LINGUAS |
|
368 |
AC_MSG_RESULT($LINGUAS) |
|
369 |
fi |
|
370 |
||
371 |
dnl Construct list of names of catalog files to be constructed. |
|
372 |
if test -n "$LINGUAS"; then |
|
373 |
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
|
374 |
fi |
|
375 |
fi |
|
376 |
||
377 |
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
|
378 |
dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
|
379 |
dnl Try to locate is. |
|
380 |
MKINSTALLDIRS= |
|
381 |
if test -n "$ac_aux_dir"; then |
|
382 |
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
|
383 |
fi |
|
384 |
if test -z "$MKINSTALLDIRS"; then |
|
385 |
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
|
386 |
fi |
|
387 |
AC_SUBST(MKINSTALLDIRS) |
|
388 |
||
389 |
dnl Generate list of files to be processed by xgettext which will |
|
390 |
dnl be included in po/Makefile. |
|
391 |
test -d po || mkdir po |
|
392 |
if test "x$srcdir" != "x."; then |
|
393 |
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
|
394 |
posrcprefix="$srcdir/" |
|
395 |
else |
|
396 |
posrcprefix="../$srcdir/" |
|
397 |
fi |
|
398 |
else |
|
399 |
posrcprefix="../" |
|
400 |
fi |
|
401 |
rm -f po/POTFILES |
|
402 |
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
|
403 |
< $srcdir/po/POTFILES.in > po/POTFILES |
|
404 |
]) |
|
405 |
||
406 |
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
|
407 |
# ------------------------------- |
|
408 |
# Define VARIABLE to the location where catalog files will |
|
409 |
# be installed by po/Makefile. |
|
410 |
glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
|
411 |
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
|
412 |
glib_save_prefix="$prefix" |
|
413 |
glib_save_exec_prefix="$exec_prefix" |
|
414 |
glib_save_datarootdir="$datarootdir" |
|
415 |
test "x$prefix" = xNONE && prefix=$ac_default_prefix |
|
416 |
test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
|
417 |
datarootdir=`eval echo "${datarootdir}"` |
|
418 |
if test "x$CATOBJEXT" = "x.mo" ; then |
|
419 |
localedir=`eval echo "${libdir}/locale"` |
|
420 |
else
|
|
421 |
localedir=`eval echo "${datadir}/locale"` |
|
422 |
fi
|
|
423 |
prefix="$glib_save_prefix" |
|
424 |
exec_prefix="$glib_save_exec_prefix" |
|
425 |
datarootdir="$glib_save_datarootdir" |
|
426 |
AC_DEFINE_UNQUOTED($1, "$localedir", |
|
427 |
[Define the location where the catalogs will be installed]) |
|
428 |
]) |
|
429 |
||
430 |
dnl
|
|
431 |
dnl Now the definitions that aclocal will find |
|
432 |
dnl
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
433 |
ifdef(glib_configure_ac,[],[ |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
434 |
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
435 |
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
|
436 |
])dnl |
|
437 |
||
438 |
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) |
|
439 |
# |
|
440 |
# Create a temporary file with TEST-FILE as its contents and pass the |
|
441 |
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with |
|
442 |
# 0 and perform ACTION-IF-FAIL for any other exit status. |
|
443 |
AC_DEFUN([GLIB_RUN_PROG], |
|
444 |
[cat >conftest.foo <<_ACEOF |
|
445 |
$2
|
|
446 |
_ACEOF
|
|
447 |
if AC_RUN_LOG([$1 conftest.foo]); then |
|
448 |
m4_ifval([$3], [$3], [:]) |
|
449 |
m4_ifvaln([$4], [else $4])dnl |
|
450 |
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD |
|
451 |
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD |
|
452 |
fi]) |
|
453 |
||
454 |
||
455 |
||
456 |
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) |
|
457 |
# serial 40 IT_PROG_INTLTOOL |
|
458 |
AC_DEFUN([IT_PROG_INTLTOOL], [ |
|
459 |
AC_PREREQ([2.50])dnl |
|
460 |
AC_REQUIRE([AM_NLS])dnl |
|
461 |
||
462 |
case "$am__api_version" in |
|
463 |
1.[01234]) |
|
464 |
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) |
|
465 |
;; |
|
466 |
*) |
|
467 |
;; |
|
468 |
esac
|
|
469 |
||
470 |
if test -n "$1"; then |
|
471 |
AC_MSG_CHECKING([for intltool >= $1]) |
|
472 |
||
473 |
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
|
474 |
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` |
|
475 |
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
|
476 |
] |
|
477 |
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
|
478 |
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || |
|
479 |
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) |
|
480 |
fi
|
|
481 |
||
482 |
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) |
|
483 |
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) |
|
484 |
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) |
|
485 |
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then |
|
486 |
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) |
|
487 |
fi
|
|
488 |
||
489 |
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
490 |
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
491 |
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
492 |
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
493 |
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' |
|
494 |
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
495 |
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
496 |
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
497 |
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
498 |
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
499 |
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
500 |
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' |
|
501 |
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
502 |
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
503 |
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
504 |
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
505 |
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
506 |
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
507 |
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
|
508 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
509 |
_IT_SUBST(INTLTOOL_DESKTOP_RULE) |
510 |
_IT_SUBST(INTLTOOL_DIRECTORY_RULE) |
|
511 |
_IT_SUBST(INTLTOOL_KEYS_RULE) |
|
512 |
_IT_SUBST(INTLTOOL_PROP_RULE) |
|
513 |
_IT_SUBST(INTLTOOL_OAF_RULE) |
|
514 |
_IT_SUBST(INTLTOOL_PONG_RULE) |
|
515 |
_IT_SUBST(INTLTOOL_SERVER_RULE) |
|
516 |
_IT_SUBST(INTLTOOL_SHEET_RULE) |
|
517 |
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) |
|
518 |
_IT_SUBST(INTLTOOL_UI_RULE) |
|
519 |
_IT_SUBST(INTLTOOL_XAM_RULE) |
|
520 |
_IT_SUBST(INTLTOOL_KBD_RULE) |
|
521 |
_IT_SUBST(INTLTOOL_XML_RULE) |
|
522 |
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) |
|
523 |
_IT_SUBST(INTLTOOL_CAVES_RULE) |
|
524 |
_IT_SUBST(INTLTOOL_SCHEMAS_RULE) |
|
525 |
_IT_SUBST(INTLTOOL_THEME_RULE) |
|
526 |
_IT_SUBST(INTLTOOL_SERVICE_RULE) |
|
527 |
_IT_SUBST(INTLTOOL_POLICY_RULE) |
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
528 |
|
529 |
# Check the gettext tools to make sure they are GNU |
|
530 |
AC_PATH_PROG(XGETTEXT, xgettext) |
|
531 |
AC_PATH_PROG(MSGMERGE, msgmerge) |
|
532 |
AC_PATH_PROG(MSGFMT, msgfmt) |
|
533 |
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
|
534 |
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then |
|
535 |
AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
|
536 |
fi
|
|
537 |
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" |
|
538 |
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" |
|
539 |
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" |
|
540 |
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then |
|
541 |
AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
|
542 |
fi
|
|
543 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
544 |
AC_PATH_PROG(INTLTOOL_PERL, perl) |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
545 |
if test -z "$INTLTOOL_PERL"; then |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
546 |
AC_MSG_ERROR([perl not found]) |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
547 |
fi
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
548 |
AC_MSG_CHECKING([for perl >= 5.8.1]) |
549 |
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 |
|
550 |
if test $? -ne 0; then |
|
551 |
AC_MSG_ERROR([perl 5.8.1 is required for intltool]) |
|
552 |
else
|
|
553 |
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" |
|
554 |
AC_MSG_RESULT([$IT_PERL_VERSION]) |
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
555 |
fi
|
556 |
if test "x$2" != "xno-xml"; then |
|
557 |
AC_MSG_CHECKING([for XML::Parser]) |
|
558 |
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then |
|
559 |
AC_MSG_RESULT([ok]) |
|
560 |
else |
|
561 |
AC_MSG_ERROR([XML::Parser perl module is required for intltool]) |
|
562 |
fi |
|
563 |
fi
|
|
564 |
||
565 |
# Substitute ALL_LINGUAS so we can use it in po/Makefile |
|
566 |
AC_SUBST(ALL_LINGUAS) |
|
567 |
||
568 |
# Set DATADIRNAME correctly if it is not set yet |
|
569 |
# (copied from glib-gettext.m4) |
|
570 |
if test -z "$DATADIRNAME"; then |
|
571 |
AC_LINK_IFELSE( |
|
572 |
[AC_LANG_PROGRAM([[]], |
|
573 |
[[extern int _nl_msg_cat_cntr; |
|
574 |
return _nl_msg_cat_cntr]])], |
|
575 |
[DATADIRNAME=share], |
|
576 |
[case $host in |
|
577 |
*-*-solaris*)
|
|
578 |
dnl On Solaris, if bind_textdomain_codeset is in libc,
|
|
579 |
dnl GNU format message catalog is always supported,
|
|
580 |
dnl since both are added to the libc all together.
|
|
581 |
dnl Hence, we'd like to go with DATADIRNAME=share
|
|
582 |
dnl in this case.
|
|
583 |
AC_CHECK_FUNC(bind_textdomain_codeset,
|
|
584 |
[DATADIRNAME=share], [DATADIRNAME=lib]) |
|
585 |
;; |
|
586 |
*) |
|
587 |
[DATADIRNAME=lib] |
|
588 |
;; |
|
589 |
esac]) |
|
590 |
fi
|
|
591 |
AC_SUBST(DATADIRNAME) |
|
592 |
||
593 |
IT_PO_SUBDIR([po]) |
|
594 |
||
595 |
]) |
|
596 |
||
597 |
||
598 |
# IT_PO_SUBDIR(DIRNAME) |
|
599 |
# --------------------- |
|
600 |
# All po subdirs have to be declared with this macro; the subdir "po" is |
|
601 |
# declared by IT_PROG_INTLTOOL. |
|
602 |
#
|
|
603 |
AC_DEFUN([IT_PO_SUBDIR], |
|
604 |
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. |
|
605 |
dnl
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
606 |
dnl The following CONFIG_COMMANDS should be executed at the very end |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
607 |
dnl of config.status. |
608 |
AC_CONFIG_COMMANDS_PRE([ |
|
609 |
AC_CONFIG_COMMANDS([$1/stamp-it], [ |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
610 |
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then |
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
611 |
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) |
612 |
fi |
|
613 |
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" |
|
614 |
>"$1/stamp-it.tmp" |
|
615 |
[sed '/^#/d |
|
616 |
s/^[[].*] *// |
|
617 |
/^[ ]*$/d |
|
618 |
'"s|^| $ac_top_srcdir/|" \ |
|
619 |
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" |
|
620 |
]
|
|
621 |
[sed '/^POTFILES =/,/[^\\]$/ { |
|
622 |
/^POTFILES =/!d |
|
623 |
r $1/POTFILES |
|
624 |
} |
|
625 |
' "$1/Makefile.in" >"$1/Makefile"] |
|
626 |
rm -f "$1/Makefile.tmp"
|
|
627 |
mv "$1/stamp-it.tmp" "$1/stamp-it"
|
|
628 |
])
|
|
629 |
])dnl
|
|
630 |
])
|
|
631 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
632 |
# _IT_SUBST(VARIABLE)
|
633 |
# -------------------
|
|
634 |
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
|
|
635 |
#
|
|
636 |
AC_DEFUN([_IT_SUBST],
|
|
637 |
[
|
|
638 |
AC_SUBST([$1])
|
|
639 |
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
|
|
640 |
]
|
|
641 |
)
|
|
642 |
||
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
643 |
# deprecated macros
|
644 |
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
|
|
645 |
# A hint is needed for aclocal from Automake <= 1.9.4:
|
|
646 |
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
|
|
647 |
||
648 |
||
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
649 |
# nls.m4 serial 5 (gettext-0.18)
|
650 |
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
|
|
651 |
dnl Inc.
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
652 |
dnl This file is free software; the Free Software Foundation
|
653 |
dnl gives unlimited permission to copy and/or distribute it,
|
|
654 |
dnl with or without modifications, as long as this notice is preserved.
|
|
655 |
dnl
|
|
656 |
dnl This file can can be used in projects which are not available under
|
|
657 |
dnl the GNU General Public License or the GNU Library General Public
|
|
658 |
dnl License but which still want to provide support for the GNU gettext
|
|
659 |
dnl functionality.
|
|
660 |
dnl Please note that the actual code of the GNU gettext library is covered
|
|
661 |
dnl by the GNU Library General Public License, and the rest of the GNU
|
|
662 |
dnl gettext package package is covered by the GNU General Public License.
|
|
663 |
dnl They are *not* in the public domain.
|
|
664 |
||
665 |
dnl Authors:
|
|
666 |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
|
667 |
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
|
668 |
||
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
669 |
AC_PREREQ([2.50])
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
670 |
|
671 |
AC_DEFUN([AM_NLS],
|
|
672 |
[
|
|
673 |
AC_MSG_CHECKING([whether NLS is requested])
|
|
674 |
dnl Default is enabled NLS
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
675 |
AC_ARG_ENABLE([nls],
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
676 |
[ --disable-nls do not use Native Language Support],
|
677 |
USE_NLS=$enableval, USE_NLS=yes)
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
678 |
AC_MSG_RESULT([$USE_NLS])
|
679 |
AC_SUBST([USE_NLS])
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
680 |
])
|
681 |
||
682 |
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
683 |
# serial 1 (pkg-config-0.24)
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
684 |
#
|
685 |
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
|
686 |
#
|
|
687 |
# This program is free software; you can redistribute it and/or modify
|
|
688 |
# it under the terms of the GNU General Public License as published by
|
|
689 |
# the Free Software Foundation; either version 2 of the License, or
|
|
690 |
# (at your option) any later version.
|
|
691 |
#
|
|
692 |
# This program is distributed in the hope that it will be useful, but
|
|
693 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
694 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
695 |
# General Public License for more details.
|
|
696 |
#
|
|
697 |
# You should have received a copy of the GNU General Public License
|
|
698 |
# along with this program; if not, write to the Free Software
|
|
699 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
700 |
#
|
|
701 |
# As a special exception to the GNU General Public License, if you
|
|
702 |
# distribute this file as part of a program that contains a
|
|
703 |
# configuration script generated by Autoconf, you may include it under
|
|
704 |
# the same distribution terms that you use for the rest of that program.
|
|
705 |
||
706 |
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
|
707 |
# ----------------------------------
|
|
708 |
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
|
709 |
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
|
710 |
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
711 |
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
712 |
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
|
713 |
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
|
714 |
||
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
715 |
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
716 |
AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
|
717 |
fi
|
|
718 |
if test -n "$PKG_CONFIG"; then |
|
719 |
_pkg_min_version=m4_default([$1], [0.9.0]) |
|
720 |
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
|
721 |
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
|
722 |
AC_MSG_RESULT([yes]) |
|
723 |
else |
|
724 |
AC_MSG_RESULT([no]) |
|
725 |
PKG_CONFIG="" |
|
726 |
fi |
|
727 |
fi[]dnl |
|
728 |
])# PKG_PROG_PKG_CONFIG |
|
729 |
||
730 |
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
|
731 |
#
|
|
732 |
# Check to see whether a particular set of modules exists. Similar |
|
733 |
# to PKG_CHECK_MODULES(), but does not set variables or print errors. |
|
734 |
#
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
735 |
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
736 |
# only at the first occurence in configure.ac, so if the first place |
|
737 |
# it's called might be skipped (such as if it is within an "if", you |
|
738 |
# have to call PKG_CHECK_EXISTS manually
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
739 |
# --------------------------------------------------------------
|
740 |
AC_DEFUN([PKG_CHECK_EXISTS],
|
|
741 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
742 |
if test -n "$PKG_CONFIG" && \
|
|
743 |
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
744 |
m4_default([$2], [:])
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
745 |
m4_ifvaln([$3], [else
|
746 |
$3])dnl
|
|
747 |
fi])
|
|
748 |
||
749 |
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
|
750 |
# ---------------------------------------------
|
|
751 |
m4_define([_PKG_CONFIG],
|
|
752 |
[if test -n "$$1"; then
|
|
753 |
pkg_cv_[]$1="$$1"
|
|
754 |
elif test -n "$PKG_CONFIG"; then
|
|
755 |
PKG_CHECK_EXISTS([$3],
|
|
756 |
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
|
757 |
[pkg_failed=yes])
|
|
758 |
else
|
|
759 |
pkg_failed=untried
|
|
760 |
fi[]dnl
|
|
761 |
])# _PKG_CONFIG
|
|
762 |
||
763 |
# _PKG_SHORT_ERRORS_SUPPORTED
|
|
764 |
# -----------------------------
|
|
765 |
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
|
766 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
767 |
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
768 |
_pkg_short_errors_supported=yes
|
|
769 |
else
|
|
770 |
_pkg_short_errors_supported=no
|
|
771 |
fi[]dnl
|
|
772 |
])# _PKG_SHORT_ERRORS_SUPPORTED
|
|
773 |
||
774 |
||
775 |
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
776 |
# [ACTION-IF-NOT-FOUND])
|
|
777 |
#
|
|
778 |
#
|
|
779 |
# Note that if there is a possibility the first call to
|
|
780 |
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
|
781 |
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
|
782 |
#
|
|
783 |
#
|
|
784 |
# --------------------------------------------------------------
|
|
785 |
AC_DEFUN([PKG_CHECK_MODULES],
|
|
786 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
787 |
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|
788 |
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
|
789 |
||
790 |
pkg_failed=no
|
|
791 |
AC_MSG_CHECKING([for $1])
|
|
792 |
||
793 |
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
|
794 |
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
|
795 |
||
796 |
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
|
797 |
and $1[]_LIBS to avoid the need to call pkg-config.
|
|
798 |
See the pkg-config man page for more details.])
|
|
799 |
||
800 |
if test $pkg_failed = yes; then
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
801 |
AC_MSG_RESULT([no])
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
802 |
_PKG_SHORT_ERRORS_SUPPORTED
|
803 |
if test $_pkg_short_errors_supported = yes; then
|
|
804 |
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
|
805 |
else
|
|
806 |
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
|
807 |
fi
|
|
808 |
# Put the nasty error message in config.log where it belongs
|
|
809 |
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
|
810 |
||
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
811 |
m4_default([$4], [AC_MSG_ERROR(
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
812 |
[Package requirements ($2) were not met:
|
813 |
||
814 |
$$1_PKG_ERRORS
|
|
815 |
||
816 |
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
817 |
installed software in a non-standard prefix.
|
|
818 |
||
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
819 |
_PKG_TEXT])
|
820 |
])
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
821 |
elif test $pkg_failed = untried; then
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
822 |
AC_MSG_RESULT([no])
|
823 |
m4_default([$4], [AC_MSG_FAILURE(
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
824 |
[The pkg-config script could not be found or is too old. Make sure it
|
825 |
is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
826 |
path to pkg-config.
|
|
827 |
||
828 |
_PKG_TEXT
|
|
829 |
||
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
830 |
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
|
831 |
])
|
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
832 |
else
|
833 |
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
|
834 |
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
|
835 |
AC_MSG_RESULT([yes])
|
|
1.1.20
by Didier Roche
Import upstream version 0.13.2 |
836 |
$3
|
1.1.16
by Andreas Moog
Import upstream version 0.12.1 |
837 |
fi[]dnl
|
838 |
])# PKG_CHECK_MODULES
|
|
839 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
840 |
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
841 |
#
|
842 |
# This file is free software; the Free Software Foundation
|
|
843 |
# gives unlimited permission to copy and/or distribute it,
|
|
844 |
# with or without modifications, as long as this notice is preserved.
|
|
845 |
||
846 |
# AM_AUTOMAKE_VERSION(VERSION)
|
|
847 |
# ----------------------------
|
|
848 |
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
|
849 |
# generated from the m4 files accompanying Automake X.Y.
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
850 |
# (This private macro should not be called outside this file.)
|
851 |
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
852 |
[am__api_version='1.11' |
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
853 |
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
854 |
dnl require some minimum version. Point them to the right macro.
|
|
1.1.19
by Didier Roche
Import upstream version 0.13.1 |
855 |
m4_if([$1], [1.11.1], [],
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
856 |
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
857 |
])
|
|
858 |
||
859 |
# _AM_AUTOCONF_VERSION(VERSION)
|
|
860 |
# -----------------------------
|
|
861 |
# aclocal traces this macro to find the Autoconf version.
|
|
862 |
# This is a private macro too. Using m4_define simplifies
|
|
863 |
# the logic in aclocal, which can simply ignore this definition.
|
|
864 |
m4_define([_AM_AUTOCONF_VERSION], [])
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
865 |
|
866 |
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
|
867 |
# -------------------------------
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
868 |
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
869 |
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
870 |
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
1.1.19
by Didier Roche
Import upstream version 0.13.1 |
871 |
[AM_AUTOMAKE_VERSION([1.11.1])dnl
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
872 |
m4_ifndef([AC_AUTOCONF_VERSION],
|
873 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
874 |
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
875 |
|
876 |
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
|
877 |
||
878 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
879 |
#
|
|
880 |
# This file is free software; the Free Software Foundation
|
|
881 |
# gives unlimited permission to copy and/or distribute it,
|
|
882 |
# with or without modifications, as long as this notice is preserved.
|
|
883 |
||
884 |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
|
885 |
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
|
886 |
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
|
887 |
#
|
|
888 |
# Of course, Automake must honor this variable whenever it calls a
|
|
889 |
# tool from the auxiliary directory. The problem is that $srcdir (and
|
|
890 |
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
|
891 |
# depending on how configure is run. This is pretty annoying, since
|
|
892 |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
|
893 |
# source directory, any form will work fine, but in subdirectories a
|
|
894 |
# relative path needs to be adjusted first.
|
|
895 |
#
|
|
896 |
# $ac_aux_dir/missing
|
|
897 |
# fails when called from a subdirectory if $ac_aux_dir is relative
|
|
898 |
# $top_srcdir/$ac_aux_dir/missing
|
|
899 |
# fails if $ac_aux_dir is absolute,
|
|
900 |
# fails when called from a subdirectory in a VPATH build with
|
|
901 |
# a relative $ac_aux_dir
|
|
902 |
#
|
|
903 |
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
|
904 |
# are both prefixed by $srcdir. In an in-source build this is usually
|
|
905 |
# harmless because $srcdir is `.', but things will broke when you |
|
906 |
# start a VPATH build or use an absolute $srcdir. |
|
907 |
#
|
|
908 |
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
|
909 |
# iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
|
910 |
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
|
911 |
# and then we would define $MISSING as |
|
912 |
# MISSING="\${SHELL} $am_aux_dir/missing" |
|
913 |
# This will work as long as MISSING is not called from configure, because |
|
914 |
# unfortunately $(top_srcdir) has no meaning in configure. |
|
915 |
# However there are other variables, like CC, which are often used in |
|
916 |
# configure, and could therefore not use this "fixed" $ac_aux_dir. |
|
917 |
#
|
|
918 |
# Another solution, used here, is to always expand $ac_aux_dir to an |
|
919 |
# absolute PATH. The drawback is that using absolute paths prevent a |
|
920 |
# configured tree to be moved without reconfiguration. |
|
921 |
||
922 |
AC_DEFUN([AM_AUX_DIR_EXPAND], |
|
923 |
[dnl Rely on autoconf to set up CDPATH properly. |
|
924 |
AC_PREREQ([2.50])dnl |
|
925 |
# expand $ac_aux_dir to an absolute path |
|
926 |
am_aux_dir=`cd $ac_aux_dir && pwd` |
|
927 |
]) |
|
928 |
||
929 |
# AM_CONDITIONAL -*- Autoconf -*- |
|
930 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
931 |
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
932 |
# Free Software Foundation, Inc. |
933 |
#
|
|
934 |
# This file is free software; the Free Software Foundation |
|
935 |
# gives unlimited permission to copy and/or distribute it, |
|
936 |
# with or without modifications, as long as this notice is preserved. |
|
937 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
938 |
# serial 9 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
939 |
|
940 |
# AM_CONDITIONAL(NAME, SHELL-CONDITION) |
|
941 |
# ------------------------------------- |
|
942 |
# Define a conditional. |
|
943 |
AC_DEFUN([AM_CONDITIONAL], |
|
944 |
[AC_PREREQ(2.52)dnl |
|
945 |
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
|
946 |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
947 |
AC_SUBST([$1_TRUE])dnl |
948 |
AC_SUBST([$1_FALSE])dnl |
|
949 |
_AM_SUBST_NOTMAKE([$1_TRUE])dnl |
|
950 |
_AM_SUBST_NOTMAKE([$1_FALSE])dnl |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
951 |
m4_define([_AM_COND_VALUE_$1], [$2])dnl |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
952 |
if $2; then |
953 |
$1_TRUE= |
|
954 |
$1_FALSE='#' |
|
955 |
else
|
|
956 |
$1_TRUE='#' |
|
957 |
$1_FALSE= |
|
958 |
fi
|
|
959 |
AC_CONFIG_COMMANDS_PRE( |
|
960 |
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
|
961 |
AC_MSG_ERROR([[conditional "$1" was never defined.
|
|
962 |
Usually this means the macro was only invoked conditionally.]]) |
|
963 |
fi])]) |
|
964 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
965 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
966 |
# Free Software Foundation, Inc. |
967 |
#
|
|
968 |
# This file is free software; the Free Software Foundation |
|
969 |
# gives unlimited permission to copy and/or distribute it, |
|
970 |
# with or without modifications, as long as this notice is preserved. |
|
971 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
972 |
# serial 10 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
973 |
|
974 |
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
|
975 |
# written in clear, in which case automake, when reading aclocal.m4,
|
|
976 |
# will think it sees a *use*, and therefore will trigger all it's |
|
977 |
# C support machinery. Also note that it means that autoscan, seeing |
|
978 |
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
|
979 |
||
980 |
||
981 |
# _AM_DEPENDENCIES(NAME) |
|
982 |
# ---------------------- |
|
983 |
# See how the compiler implements dependency checking. |
|
984 |
# NAME is "CC", "CXX", "GCJ", or "OBJC". |
|
985 |
# We try a few techniques and use that to set a single cache variable. |
|
986 |
#
|
|
987 |
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
|
988 |
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
|
989 |
# dependency, and given that the user is not expected to run this macro,
|
|
990 |
# just rely on AC_PROG_CC.
|
|
991 |
AC_DEFUN([_AM_DEPENDENCIES],
|
|
992 |
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
|
993 |
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
|
994 |
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
|
995 |
AC_REQUIRE([AM_DEP_TRACK])dnl
|
|
996 |
||
997 |
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
|
998 |
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
|
999 |
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1000 |
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1001 |
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
1002 |
[depcc="$$1" am_compiler_list=])
|
|
1003 |
||
1004 |
AC_CACHE_CHECK([dependency style of $depcc],
|
|
1005 |
[am_cv_$1_dependencies_compiler_type],
|
|
1006 |
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
|
1007 |
# We make a subdir and do the tests there. Otherwise we can end up
|
|
1008 |
# making bogus files that we don't know about and never remove. For |
|
1009 |
# instance it was reported that on HP-UX the gcc test will end up |
|
1010 |
# making a dummy file named `D' -- because `-MD' means `put the output |
|
1011 |
# in D'. |
|
1012 |
mkdir conftest.dir
|
|
1013 |
# Copy depcomp to subdir because otherwise we won't find it if we're |
|
1014 |
# using a relative directory.
|
|
1015 |
cp "$am_depcomp" conftest.dir
|
|
1016 |
cd conftest.dir
|
|
1017 |
# We will build objects and dependencies in a subdirectory because
|
|
1018 |
# it helps to detect inapplicable dependency modes. For instance
|
|
1019 |
# both Tru64's cc and ICC support -MD to output dependencies as a |
|
1020 |
# side effect of compilation, but ICC will put the dependencies in |
|
1021 |
# the current directory while Tru64 will put them in the object |
|
1022 |
# directory. |
|
1023 |
mkdir sub |
|
1024 |
||
1025 |
am_cv_$1_dependencies_compiler_type=none |
|
1026 |
if test "$am_compiler_list" = ""; then |
|
1027 |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
|
1028 |
fi
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1029 |
am__universal=false
|
1030 |
m4_case([$1], [CC],
|
|
1031 |
[case " $depcc " in #(
|
|
1032 |
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
|
1033 |
esac],
|
|
1034 |
[CXX],
|
|
1035 |
[case " $depcc " in #(
|
|
1036 |
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
|
1037 |
esac])
|
|
1038 |
||
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1039 |
for depmode in $am_compiler_list; do
|
1040 |
# Setup a source with many dependencies, because some compilers
|
|
1041 |
# like to wrap large dependency lists on column 80 (with \), and
|
|
1042 |
# we should not choose a depcomp mode which is confused by this.
|
|
1043 |
#
|
|
1044 |
# We need to recreate these files for each test, as the compiler may
|
|
1045 |
# overwrite some of them when testing with obscure command lines.
|
|
1046 |
# This happens at least with the AIX C compiler.
|
|
1047 |
: > sub/conftest.c
|
|
1048 |
for i in 1 2 3 4 5 6; do
|
|
1049 |
echo '#include "conftst'$i'.h"' >> sub/conftest.c |
|
1050 |
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
|
1051 |
# Solaris 8's {/usr,}/bin/sh. |
|
1052 |
touch sub/conftst$i.h
|
|
1053 |
done
|
|
1054 |
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
|
1055 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1056 |
# We check with `-c' and `-o' for the sake of the "dashmstdout" |
1057 |
# mode. It turns out that the SunPro C++ compiler does not properly
|
|
1058 |
# handle `-M -o', and we need to detect this. Also, some Intel |
|
1059 |
# versions had trouble with output in subdirs |
|
1060 |
am__obj=sub/conftest.${OBJEXT-o} |
|
1061 |
am__minus_obj="-o $am__obj" |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1062 |
case $depmode in |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1063 |
gcc) |
1064 |
# This depmode causes a compiler race in universal mode. |
|
1065 |
test "$am__universal" = false || continue |
|
1066 |
;; |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1067 |
nosideeffect) |
1068 |
# after this tag, mechanisms are not by side-effect, so they'll |
|
1069 |
# only be used when explicitly requested
|
|
1070 |
if test "x$enable_dependency_tracking" = xyes; then
|
|
1071 |
continue
|
|
1072 |
else
|
|
1073 |
break
|
|
1074 |
fi
|
|
1075 |
;;
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1076 |
msvisualcpp | msvcmsys)
|
1077 |
# This compiler won't grok `-c -o', but also, the minuso test has |
|
1078 |
# not run yet. These depmodes are late enough in the game, and
|
|
1079 |
# so weak that their functioning should not be impacted.
|
|
1080 |
am__obj=conftest.${OBJEXT-o}
|
|
1081 |
am__minus_obj=
|
|
1082 |
;;
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1083 |
none) break ;;
|
1084 |
esac
|
|
1085 |
if depmode=$depmode \
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1086 |
source=sub/conftest.c object=$am__obj \
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1087 |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1088 |
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1089 |
>/dev/null 2>conftest.err &&
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1090 |
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1091 |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1092 |
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1093 |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
1094 |
# icc doesn't choke on unknown options, it will just issue warnings |
|
1095 |
# or remarks (even with -Werror). So we grep stderr for any message |
|
1096 |
# that says an option was ignored or not supported. |
|
1097 |
# When given -MP, icc 7.0 and 7.1 complain thusly: |
|
1098 |
# icc: Command line warning: ignoring option '-M'; no argument required |
|
1099 |
# The diagnosis changed in icc 8.0: |
|
1100 |
# icc: Command line remark: option '-MP' not supported |
|
1101 |
if (grep 'ignoring option' conftest.err || |
|
1102 |
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
|
1103 |
am_cv_$1_dependencies_compiler_type=$depmode |
|
1104 |
break |
|
1105 |
fi |
|
1106 |
fi |
|
1107 |
done |
|
1108 |
||
1109 |
cd .. |
|
1110 |
rm -rf conftest.dir |
|
1111 |
else
|
|
1112 |
am_cv_$1_dependencies_compiler_type=none |
|
1113 |
fi
|
|
1114 |
]) |
|
1115 |
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
|
1116 |
AM_CONDITIONAL([am__fastdep$1], [ |
|
1117 |
test "x$enable_dependency_tracking" != xno \
|
|
1118 |
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
|
1119 |
]) |
|
1120 |
||
1121 |
||
1122 |
# AM_SET_DEPDIR |
|
1123 |
# ------------- |
|
1124 |
# Choose a directory name for dependency files. |
|
1125 |
# This macro is AC_REQUIREd in _AM_DEPENDENCIES |
|
1126 |
AC_DEFUN([AM_SET_DEPDIR], |
|
1127 |
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
|
1128 |
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
|
1129 |
]) |
|
1130 |
||
1131 |
||
1132 |
# AM_DEP_TRACK |
|
1133 |
# ------------ |
|
1134 |
AC_DEFUN([AM_DEP_TRACK], |
|
1135 |
[AC_ARG_ENABLE(dependency-tracking, |
|
1136 |
[ --disable-dependency-tracking speeds up one-time build
|
|
1137 |
--enable-dependency-tracking do not reject slow dependency extractors]) |
|
1138 |
if test "x$enable_dependency_tracking" != xno; then |
|
1139 |
am_depcomp="$ac_aux_dir/depcomp" |
|
1140 |
AMDEPBACKSLASH='\' |
|
1141 |
fi
|
|
1142 |
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1143 |
AC_SUBST([AMDEPBACKSLASH])dnl |
1144 |
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1145 |
]) |
1146 |
||
1147 |
# Generate code to set up dependency tracking. -*- Autoconf -*- |
|
1148 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1149 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1150 |
# Free Software Foundation, Inc. |
1151 |
#
|
|
1152 |
# This file is free software; the Free Software Foundation |
|
1153 |
# gives unlimited permission to copy and/or distribute it, |
|
1154 |
# with or without modifications, as long as this notice is preserved. |
|
1155 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1156 |
#serial 5 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1157 |
|
1158 |
# _AM_OUTPUT_DEPENDENCY_COMMANDS |
|
1159 |
# ------------------------------ |
|
1160 |
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1161 |
[{ |
1162 |
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
|
1163 |
# are listed without --file. Let's play safe and only enable the eval
|
|
1164 |
# if we detect the quoting.
|
|
1165 |
case $CONFIG_FILES in
|
|
1166 |
*\'*) eval set x "$CONFIG_FILES" ;;
|
|
1167 |
*) set x $CONFIG_FILES ;;
|
|
1168 |
esac
|
|
1169 |
shift
|
|
1170 |
for mf
|
|
1171 |
do
|
|
1172 |
# Strip MF so we end up with the name of the file.
|
|
1173 |
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
|
1174 |
# Check whether this is an Automake generated Makefile or not.
|
|
1175 |
# We used to match only the files named `Makefile.in', but
|
|
1176 |
# some people rename them; so instead we look at the file content.
|
|
1177 |
# Grep'ing the first line is not enough: some people post-process
|
|
1178 |
# each Makefile.in and add a new line on top of each file to say so.
|
|
1179 |
# Grep'ing the whole file is not good either: AIX grep has a line
|
|
1180 |
# limit of 2048, but all sed's we know have understand at least 4000.
|
|
1181 |
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
|
1182 |
dirpart=`AS_DIRNAME("$mf")`
|
|
1183 |
else
|
|
1184 |
continue
|
|
1185 |
fi
|
|
1186 |
# Extract the definition of DEPDIR, am__include, and am__quote
|
|
1187 |
# from the Makefile without running `make'.
|
|
1188 |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
|
1189 |
test -z "$DEPDIR" && continue
|
|
1190 |
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
|
1191 |
test -z "am__include" && continue
|
|
1192 |
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
|
1193 |
# When using ansi2knr, U may be empty or an underscore; expand it
|
|
1194 |
U=`sed -n 's/^U = //p' < "$mf"`
|
|
1195 |
# Find all dependency output files, they are included files with
|
|
1196 |
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
|
1197 |
# simplest approach to changing $(DEPDIR) to its actual value in the
|
|
1198 |
# expansion.
|
|
1199 |
for file in `sed -n "
|
|
1200 |
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
|
1201 |
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
|
1202 |
# Make sure the directory exists.
|
|
1203 |
test -f "$dirpart/$file" && continue
|
|
1204 |
fdir=`AS_DIRNAME(["$file"])` |
|
1205 |
AS_MKDIR_P([$dirpart/$fdir]) |
|
1206 |
# echo "creating $dirpart/$file" |
|
1207 |
echo '# dummy' > "$dirpart/$file" |
|
1208 |
done |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1209 |
done |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1210 |
}
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1211 |
])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
1212 |
||
1213 |
||
1214 |
# AM_OUTPUT_DEPENDENCY_COMMANDS |
|
1215 |
# ----------------------------- |
|
1216 |
# This macro should only be invoked once -- use via AC_REQUIRE. |
|
1217 |
#
|
|
1218 |
# This code is only required when automatic dependency tracking |
|
1219 |
# is enabled. FIXME. This creates each `.P' file that we will |
|
1220 |
# need in order to bootstrap the dependency handling code.
|
|
1221 |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|
1222 |
[AC_CONFIG_COMMANDS([depfiles],
|
|
1223 |
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|
1224 |
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
|
1225 |
])
|
|
1226 |
||
1227 |
# Do all the work for Automake. -*- Autoconf -*-
|
|
1228 |
||
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1229 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1230 |
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1231 |
#
|
1232 |
# This file is free software; the Free Software Foundation
|
|
1233 |
# gives unlimited permission to copy and/or distribute it,
|
|
1234 |
# with or without modifications, as long as this notice is preserved.
|
|
1235 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1236 |
# serial 16
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1237 |
|
1238 |
# This macro actually does too much. Some checks are only needed if
|
|
1239 |
# your package does certain things. But this isn't really a big deal. |
|
1240 |
||
1241 |
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
|
1242 |
# AM_INIT_AUTOMAKE([OPTIONS]) |
|
1243 |
# ----------------------------------------------- |
|
1244 |
# The call with PACKAGE and VERSION arguments is the old style |
|
1245 |
# call (pre autoconf-2.50), which is being phased out. PACKAGE |
|
1246 |
# and VERSION should now be passed to AC_INIT and removed from |
|
1247 |
# the call to AM_INIT_AUTOMAKE. |
|
1248 |
# We support both call styles for the transition. After |
|
1249 |
# the next Automake release, Autoconf can make the AC_INIT |
|
1250 |
# arguments mandatory, and then we can depend on a new Autoconf |
|
1251 |
# release and drop the old call support. |
|
1252 |
AC_DEFUN([AM_INIT_AUTOMAKE], |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1253 |
[AC_PREREQ([2.62])dnl |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1254 |
dnl Autoconf wants to disallow AM_ names. We explicitly allow |
1255 |
dnl the ones we care about. |
|
1256 |
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
|
1257 |
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
|
1258 |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1259 |
if test "`cd $srcdir && pwd`" != "`pwd`"; then |
1260 |
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
|
1261 |
# is not polluted with repeated "-I."
|
|
1262 |
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
|
1263 |
# test to see if srcdir already configured
|
|
1264 |
if test -f $srcdir/config.status; then
|
|
1265 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|
1266 |
fi
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1267 |
fi
|
1268 |
||
1269 |
# test whether we have cygpath
|
|
1270 |
if test -z "$CYGPATH_W"; then
|
|
1271 |
if (cygpath --version) >/dev/null 2>/dev/null; then
|
|
1272 |
CYGPATH_W='cygpath -w' |
|
1273 |
else
|
|
1274 |
CYGPATH_W=echo
|
|
1275 |
fi
|
|
1276 |
fi
|
|
1277 |
AC_SUBST([CYGPATH_W])
|
|
1278 |
||
1279 |
# Define the identity of the package.
|
|
1280 |
dnl Distinguish between old-style and new-style calls.
|
|
1281 |
m4_ifval([$2],
|
|
1282 |
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|
1283 |
AC_SUBST([PACKAGE], [$1])dnl
|
|
1284 |
AC_SUBST([VERSION], [$2])],
|
|
1285 |
[_AM_SET_OPTIONS([$1])dnl
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1286 |
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
1287 |
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
|
1288 |
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1289 |
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
1290 |
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
|
1291 |
||
1292 |
_AM_IF_OPTION([no-define],,
|
|
1293 |
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|
1294 |
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
|
1295 |
||
1296 |
# Some tools Automake needs.
|
|
1297 |
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
|
1298 |
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
|
1299 |
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
|
1300 |
AM_MISSING_PROG(AUTOCONF, autoconf)
|
|
1301 |
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
|
1302 |
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
|
1303 |
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1304 |
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
1305 |
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1306 |
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
1307 |
# We need awk for the "check" target. The system "awk" is bad on
|
|
1308 |
# some platforms.
|
|
1309 |
AC_REQUIRE([AC_PROG_AWK])dnl
|
|
1310 |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|
1311 |
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|
1312 |
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1313 |
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
1314 |
[_AM_PROG_TAR([v7])])])
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1315 |
_AM_IF_OPTION([no-dependencies],,
|
1316 |
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1317 |
[_AM_DEPENDENCIES(CC)],
|
1318 |
[define([AC_PROG_CC],
|
|
1319 |
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1320 |
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1321 |
[_AM_DEPENDENCIES(CXX)],
|
1322 |
[define([AC_PROG_CXX],
|
|
1323 |
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1324 |
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1325 |
[_AM_DEPENDENCIES(OBJC)],
|
1326 |
[define([AC_PROG_OBJC],
|
|
1327 |
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
|
1328 |
])
|
|
1329 |
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
|
1330 |
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the |
|
1331 |
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro |
|
1332 |
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
|
1333 |
AC_CONFIG_COMMANDS_PRE(dnl
|
|
1334 |
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
|
1335 |
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
|
1336 |
])
|
|
1337 |
||
1338 |
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
|
1339 |
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
|
1340 |
dnl mangled by Autoconf and run in a shell conditional statement. |
|
1341 |
m4_define([_AC_COMPILER_EXEEXT], |
|
1342 |
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1343 |
|
1344 |
||
1345 |
# When config.status generates a header, we must update the stamp-h file. |
|
1346 |
# This file resides in the same directory as the config header |
|
1347 |
# that is generated. The stamp files are numbered to have different names. |
|
1348 |
||
1349 |
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
|
1350 |
# loop where config.status creates the headers, so we can generate |
|
1351 |
# our stamp files there. |
|
1352 |
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
|
1353 |
[# Compute $1's index in $config_headers. |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1354 |
_am_arg=$1
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1355 |
_am_stamp_count=1
|
1356 |
for _am_header in $config_headers :; do
|
|
1357 |
case $_am_header in
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1358 |
$_am_arg | $_am_arg:* )
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1359 |
break ;;
|
1360 |
* )
|
|
1361 |
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
|
1362 |
esac
|
|
1363 |
done
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1364 |
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1365 |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1366 |
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1367 |
#
|
1368 |
# This file is free software; the Free Software Foundation |
|
1369 |
# gives unlimited permission to copy and/or distribute it, |
|
1370 |
# with or without modifications, as long as this notice is preserved. |
|
1371 |
||
1372 |
# AM_PROG_INSTALL_SH |
|
1373 |
# ------------------ |
|
1374 |
# Define $install_sh. |
|
1375 |
AC_DEFUN([AM_PROG_INSTALL_SH], |
|
1376 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1377 |
if test x"${install_sh}" != xset; then |
1378 |
case $am_aux_dir in |
|
1379 |
*\ * | *\ *) |
|
1380 |
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
|
1381 |
*) |
|
1382 |
install_sh="\${SHELL} $am_aux_dir/install-sh" |
|
1383 |
esac |
|
1384 |
fi
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1385 |
AC_SUBST(install_sh)]) |
1386 |
||
1387 |
# Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
|
1388 |
#
|
|
1389 |
# This file is free software; the Free Software Foundation |
|
1390 |
# gives unlimited permission to copy and/or distribute it, |
|
1391 |
# with or without modifications, as long as this notice is preserved. |
|
1392 |
||
1393 |
# serial 2 |
|
1394 |
||
1395 |
# Check whether the underlying file-system supports filenames |
|
1396 |
# with a leading dot. For instance MS-DOS doesn't. |
|
1397 |
AC_DEFUN([AM_SET_LEADING_DOT],
|
|
1398 |
[rm -rf .tst 2>/dev/null
|
|
1399 |
mkdir .tst 2>/dev/null
|
|
1400 |
if test -d .tst; then
|
|
1401 |
am__leading_dot=.
|
|
1402 |
else
|
|
1403 |
am__leading_dot=_
|
|
1404 |
fi
|
|
1405 |
rmdir .tst 2>/dev/null
|
|
1406 |
AC_SUBST([am__leading_dot])])
|
|
1407 |
||
1408 |
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
|
1409 |
# From Jim Meyering
|
|
1410 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1411 |
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1412 |
# Free Software Foundation, Inc.
|
1413 |
#
|
|
1414 |
# This file is free software; the Free Software Foundation
|
|
1415 |
# gives unlimited permission to copy and/or distribute it,
|
|
1416 |
# with or without modifications, as long as this notice is preserved.
|
|
1417 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1418 |
# serial 5
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1419 |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1420 |
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
1421 |
# ----------------------------------
|
|
1422 |
# Control maintainer-specific portions of Makefiles.
|
|
1423 |
# Default is to disable them, unless `enable' is passed literally. |
|
1424 |
# For symmetry, `disable' may be passed as well. Anyway, the user |
|
1425 |
# can override the default with the --enable/--disable switch.
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1426 |
AC_DEFUN([AM_MAINTAINER_MODE],
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1427 |
[m4_case(m4_default([$1], [disable]),
|
1428 |
[enable], [m4_define([am_maintainer_other], [disable])],
|
|
1429 |
[disable], [m4_define([am_maintainer_other], [enable])],
|
|
1430 |
[m4_define([am_maintainer_other], [enable])
|
|
1431 |
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
|
1432 |
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
|
|
1433 |
dnl maintainer-mode's default is 'disable' unless 'enable' is passed |
|
1434 |
AC_ARG_ENABLE([maintainer-mode], |
|
1435 |
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1436 |
(and sometimes confusing) to the casual installer], |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1437 |
[USE_MAINTAINER_MODE=$enableval], |
1438 |
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1439 |
AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1440 |
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1441 |
MAINT=$MAINTAINER_MODE_TRUE |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1442 |
AC_SUBST([MAINT])dnl |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1443 |
]
|
1444 |
)
|
|
1445 |
||
1446 |
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) |
|
1447 |
||
1448 |
# Check to see how 'make' treats includes. -*- Autoconf -*- |
|
1449 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1450 |
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1451 |
#
|
1452 |
# This file is free software; the Free Software Foundation |
|
1453 |
# gives unlimited permission to copy and/or distribute it, |
|
1454 |
# with or without modifications, as long as this notice is preserved. |
|
1455 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1456 |
# serial 4 |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1457 |
|
1458 |
# AM_MAKE_INCLUDE() |
|
1459 |
# ----------------- |
|
1460 |
# Check to see how make treats includes. |
|
1461 |
AC_DEFUN([AM_MAKE_INCLUDE], |
|
1462 |
[am_make=${MAKE-make} |
|
1463 |
cat > confinc << 'END'
|
|
1464 |
am__doit:
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1465 |
@echo this is the am__doit target
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1466 |
.PHONY: am__doit
|
1467 |
END
|
|
1468 |
# If we don't find an include directive, just comment out the code.
|
|
1469 |
AC_MSG_CHECKING([for style of include used by $am_make]) |
|
1470 |
am__include="#" |
|
1471 |
am__quote= |
|
1472 |
_am_result=none |
|
1473 |
# First try GNU make style include. |
|
1474 |
echo "include confinc" > confmf |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1475 |
# Ignore all kinds of additional output from `make'. |
1476 |
case `$am_make -s -f confmf 2> /dev/null` in #(
|
|
1477 |
*the\ am__doit\ target*)
|
|
1478 |
am__include=include
|
|
1479 |
am__quote=
|
|
1480 |
_am_result=GNU
|
|
1481 |
;;
|
|
1482 |
esac
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1483 |
# Now try BSD make style include.
|
1484 |
if test "$am__include" = "#"; then
|
|
1485 |
echo '.include "confinc"' > confmf |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1486 |
case `$am_make -s -f confmf 2> /dev/null` in #(
|
1487 |
*the\ am__doit\ target*)
|
|
1488 |
am__include=.include
|
|
1489 |
am__quote="\""
|
|
1490 |
_am_result=BSD
|
|
1491 |
;;
|
|
1492 |
esac
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1493 |
fi
|
1494 |
AC_SUBST([am__include])
|
|
1495 |
AC_SUBST([am__quote])
|
|
1496 |
AC_MSG_RESULT([$_am_result])
|
|
1497 |
rm -f confinc confmf
|
|
1498 |
])
|
|
1499 |
||
1500 |
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
|
1501 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1502 |
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1503 |
# Free Software Foundation, Inc.
|
1504 |
#
|
|
1505 |
# This file is free software; the Free Software Foundation
|
|
1506 |
# gives unlimited permission to copy and/or distribute it,
|
|
1507 |
# with or without modifications, as long as this notice is preserved.
|
|
1508 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1509 |
# serial 6
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1510 |
|
1511 |
# AM_MISSING_PROG(NAME, PROGRAM)
|
|
1512 |
# ------------------------------
|
|
1513 |
AC_DEFUN([AM_MISSING_PROG],
|
|
1514 |
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
|
1515 |
$1=${$1-"${am_missing_run}$2"}
|
|
1516 |
AC_SUBST($1)])
|
|
1517 |
||
1518 |
||
1519 |
# AM_MISSING_HAS_RUN
|
|
1520 |
# ------------------
|
|
1521 |
# Define MISSING if not defined so far and test if it supports --run.
|
|
1522 |
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
|
1523 |
AC_DEFUN([AM_MISSING_HAS_RUN],
|
|
1524 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1525 |
AC_REQUIRE_AUX_FILE([missing])dnl
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1526 |
if test x"${MISSING+set}" != xset; then
|
1527 |
case $am_aux_dir in
|
|
1528 |
*\ * | *\ *)
|
|
1529 |
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
|
1530 |
*)
|
|
1531 |
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
|
1532 |
esac
|
|
1533 |
fi
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1534 |
# Use eval to expand $SHELL
|
1535 |
if eval "$MISSING --run true"; then
|
|
1536 |
am_missing_run="$MISSING --run "
|
|
1537 |
else
|
|
1538 |
am_missing_run=
|
|
1539 |
AC_MSG_WARN([`missing' script is too old or missing]) |
|
1540 |
fi
|
|
1541 |
]) |
|
1542 |
||
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1543 |
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1544 |
#
|
1545 |
# This file is free software; the Free Software Foundation |
|
1546 |
# gives unlimited permission to copy and/or distribute it, |
|
1547 |
# with or without modifications, as long as this notice is preserved. |
|
1548 |
||
1549 |
# AM_PROG_MKDIR_P |
|
1550 |
# --------------- |
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1551 |
# Check for `mkdir -p'. |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1552 |
AC_DEFUN([AM_PROG_MKDIR_P],
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1553 |
[AC_PREREQ([2.60])dnl
|
1554 |
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
|
1555 |
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
|
1556 |
dnl while keeping a definition of mkdir_p for backward compatibility.
|
|
1557 |
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
|
1558 |
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
|
1559 |
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
|
1560 |
dnl adjustment using top_builddir (which is defined more often than
|
|
1561 |
dnl MKDIR_P).
|
|
1562 |
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
|
1563 |
case $mkdir_p in
|
|
1564 |
[[\\/$]]* | ?:[[\\/]]*) ;;
|
|
1565 |
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
|
1566 |
esac
|
|
1567 |
])
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1568 |
|
1569 |
# Helper functions for option handling. -*- Autoconf -*-
|
|
1570 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1571 |
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1572 |
#
|
1573 |
# This file is free software; the Free Software Foundation
|
|
1574 |
# gives unlimited permission to copy and/or distribute it,
|
|
1575 |
# with or without modifications, as long as this notice is preserved.
|
|
1576 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1577 |
# serial 4
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1578 |
|
1579 |
# _AM_MANGLE_OPTION(NAME)
|
|
1580 |
# -----------------------
|
|
1581 |
AC_DEFUN([_AM_MANGLE_OPTION],
|
|
1582 |
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
|
1583 |
||
1584 |
# _AM_SET_OPTION(NAME)
|
|
1585 |
# ------------------------------
|
|
1586 |
# Set option NAME. Presently that only means defining a flag for this option.
|
|
1587 |
AC_DEFUN([_AM_SET_OPTION],
|
|
1588 |
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
|
1589 |
||
1590 |
# _AM_SET_OPTIONS(OPTIONS)
|
|
1591 |
# ----------------------------------
|
|
1592 |
# OPTIONS is a space-separated list of Automake options.
|
|
1593 |
AC_DEFUN([_AM_SET_OPTIONS],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1594 |
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1595 |
|
1596 |
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
|
1597 |
# -------------------------------------------
|
|
1598 |
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
|
1599 |
AC_DEFUN([_AM_IF_OPTION],
|
|
1600 |
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
|
1601 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1602 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1603 |
# Free Software Foundation, Inc.
|
1604 |
#
|
|
1605 |
# This file is free software; the Free Software Foundation
|
|
1606 |
# gives unlimited permission to copy and/or distribute it,
|
|
1607 |
# with or without modifications, as long as this notice is preserved.
|
|
1608 |
||
1609 |
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
1610 |
# ---------------------------------------------------------------------------
|
|
1611 |
# Adds support for distributing Python modules and packages. To
|
|
1612 |
# install modules, copy them to $(pythondir), using the python_PYTHON
|
|
1613 |
# automake variable. To install a package with the same name as the
|
|
1614 |
# automake package, install to $(pkgpythondir), or use the
|
|
1615 |
# pkgpython_PYTHON automake variable.
|
|
1616 |
#
|
|
1617 |
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
|
|
1618 |
# locations to install python extension modules (shared libraries).
|
|
1619 |
# Another macro is required to find the appropriate flags to compile
|
|
1620 |
# extension modules.
|
|
1621 |
#
|
|
1622 |
# If your package is configured with a different prefix to python,
|
|
1623 |
# users will have to add the install directory to the PYTHONPATH
|
|
1624 |
# environment variable, or create a .pth file (see the python
|
|
1625 |
# documentation for details).
|
|
1626 |
#
|
|
1627 |
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
|
|
1628 |
# cause an error if the version of python installed on the system
|
|
1629 |
# doesn't meet the requirement. MINIMUM-VERSION should consist of |
|
1630 |
# numbers and dots only. |
|
1631 |
AC_DEFUN([AM_PATH_PYTHON], |
|
1632 |
[ |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1633 |
dnl Find a Python interpreter. Python versions prior to 2.0 are not
|
1634 |
dnl supported. (2.0 was released on October 16, 2000).
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1635 |
m4_define_default([_AM_PYTHON_INTERPRETER_LIST], |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1636 |
[python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl |
1637 |
python2.1 python2.0]) |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1638 |
|
1639 |
m4_if([$1],[],[ |
|
1640 |
dnl No version check is needed.
|
|
1641 |
# Find any Python interpreter.
|
|
1642 |
if test -z "$PYTHON"; then
|
|
1643 |
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) |
|
1644 |
fi |
|
1645 |
am_display_PYTHON=python |
|
1646 |
], [ |
|
1647 |
dnl A version check is needed.
|
|
1648 |
if test -n "$PYTHON"; then
|
|
1649 |
# If the user set $PYTHON, use it and don't search something else.
|
|
1650 |
AC_MSG_CHECKING([whether $PYTHON version >= $1]) |
|
1651 |
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], |
|
1652 |
[AC_MSG_RESULT(yes)], |
|
1653 |
[AC_MSG_ERROR(too old)]) |
|
1654 |
am_display_PYTHON=$PYTHON |
|
1655 |
else |
|
1656 |
# Otherwise, try each interpreter until we find one that satisfies |
|
1657 |
# VERSION. |
|
1658 |
AC_CACHE_CHECK([for a Python interpreter with version >= $1], |
|
1659 |
[am_cv_pathless_PYTHON],[ |
|
1660 |
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
|
|
1661 |
test "$am_cv_pathless_PYTHON" = none && break
|
|
1662 |
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) |
|
1663 |
done]) |
|
1664 |
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. |
|
1665 |
if test "$am_cv_pathless_PYTHON" = none; then |
|
1666 |
PYTHON=: |
|
1667 |
else |
|
1668 |
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) |
|
1669 |
fi |
|
1670 |
am_display_PYTHON=$am_cv_pathless_PYTHON |
|
1671 |
fi |
|
1672 |
]) |
|
1673 |
||
1674 |
if test "$PYTHON" = :; then |
|
1675 |
dnl Run any user-specified action, or abort. |
|
1676 |
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) |
|
1677 |
else |
|
1678 |
||
1679 |
dnl Query Python for its version number. Getting [:3] seems to be |
|
1680 |
dnl the best way to do this; it's what "site.py" does in the standard |
|
1681 |
dnl library.
|
|
1682 |
||
1683 |
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1684 |
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1685 |
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
|
1686 |
||
1687 |
dnl Use the values of $prefix and $exec_prefix for the corresponding
|
|
1688 |
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
|
|
1689 |
dnl distinct variables so they can be overridden if need be. However,
|
|
1690 |
dnl general consensus is that you shouldn't need this ability. |
|
1691 |
||
1692 |
AC_SUBST([PYTHON_PREFIX], ['${prefix}']) |
|
1693 |
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) |
|
1694 |
||
1695 |
dnl At times (like when building shared libraries) you may want |
|
1696 |
dnl to know which OS platform Python thinks this is. |
|
1697 |
||
1698 |
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1699 |
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1700 |
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) |
1701 |
||
1702 |
||
1703 |
dnl Set up 4 directories: |
|
1704 |
||
1705 |
dnl pythondir -- where to install python scripts. This is the |
|
1706 |
dnl site-packages directory, not the python standard library |
|
1707 |
dnl directory like in previous automake betas. This behavior |
|
1708 |
dnl is more consistent with lispdir.m4 for example. |
|
1709 |
dnl Query distutils for this directory. distutils does not exist in |
|
1710 |
dnl Python 1.5, so we fall back to the hardcoded directory if it |
|
1711 |
dnl doesn't work. |
|
1712 |
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
|
|
1713 |
[am_cv_python_pythondir],
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1714 |
[if test "x$prefix" = xNONE
|
1715 |
then
|
|
1716 |
am_py_prefix=$ac_default_prefix
|
|
1717 |
else
|
|
1718 |
am_py_prefix=$prefix
|
|
1719 |
fi
|
|
1720 |
am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || |
|
1721 |
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
|
1722 |
case $am_cv_python_pythondir in
|
|
1723 |
$am_py_prefix*)
|
|
1724 |
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` |
|
1725 |
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
|
|
1726 |
;;
|
|
1.1.19
by Didier Roche
Import upstream version 0.13.1 |
1727 |
*)
|
1728 |
case $am_py_prefix in
|
|
1729 |
/usr|/System*) ;;
|
|
1730 |
*)
|
|
1731 |
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
|
|
1732 |
;;
|
|
1733 |
esac
|
|
1734 |
;;
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1735 |
esac
|
1736 |
])
|
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1737 |
AC_SUBST([pythondir], [$am_cv_python_pythondir])
|
1738 |
||
1739 |
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
|
|
1740 |
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
|
|
1741 |
dnl more consistent with the rest of automake.
|
|
1742 |
||
1743 |
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
|
|
1744 |
||
1745 |
dnl pyexecdir -- directory for installing python extension modules
|
|
1746 |
dnl (shared libraries)
|
|
1747 |
dnl Query distutils for this directory. distutils does not exist in
|
|
1748 |
dnl Python 1.5, so we fall back to the hardcoded directory if it
|
|
1749 |
dnl doesn't work. |
|
1750 |
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], |
|
1751 |
[am_cv_python_pyexecdir], |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1752 |
[if test "x$exec_prefix" = xNONE |
1753 |
then
|
|
1754 |
am_py_exec_prefix=$am_py_prefix
|
|
1755 |
else
|
|
1756 |
am_py_exec_prefix=$exec_prefix
|
|
1757 |
fi
|
|
1758 |
am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
|
|
1759 |
echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
|
1760 |
case $am_cv_python_pyexecdir in
|
|
1761 |
$am_py_exec_prefix*)
|
|
1762 |
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
|
|
1763 |
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
|
|
1764 |
;;
|
|
1.1.19
by Didier Roche
Import upstream version 0.13.1 |
1765 |
*)
|
1766 |
case $am_py_exec_prefix in
|
|
1767 |
/usr|/System*) ;;
|
|
1768 |
*)
|
|
1769 |
am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
|
|
1770 |
;;
|
|
1771 |
esac
|
|
1772 |
;;
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1773 |
esac
|
1774 |
]) |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1775 |
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) |
1776 |
||
1777 |
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) |
|
1778 |
||
1779 |
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) |
|
1780 |
||
1781 |
dnl Run any user-specified action. |
|
1782 |
$2 |
|
1783 |
fi |
|
1784 |
||
1785 |
]) |
|
1786 |
||
1787 |
||
1788 |
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
|
1789 |
# --------------------------------------------------------------------------- |
|
1790 |
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. |
|
1791 |
# Run ACTION-IF-FALSE otherwise. |
|
1792 |
# This test uses sys.hexversion instead of the string equivalent (first |
|
1793 |
# word of sys.version), in order to cope with versions such as 2.2c1. |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1794 |
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1795 |
AC_DEFUN([AM_PYTHON_CHECK_VERSION], |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1796 |
[prog="import sys |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1797 |
# split strings by '.' and convert to numeric. Append some zeros
|
1798 |
# because we need at least 4 digits for the hex conversion.
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1799 |
# map returns an iterator in Python 3.0 and a list in 2.x
|
1800 |
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1801 |
minverhex = 0 |
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1802 |
# xrange is not present in Python 3.0 and range returns an iterator |
1803 |
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] |
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1804 |
sys.exit(sys.hexversion < minverhex)" |
1805 |
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) |
|
1806 |
||
1807 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
1808 |
#
|
|
1809 |
# This file is free software; the Free Software Foundation
|
|
1810 |
# gives unlimited permission to copy and/or distribute it,
|
|
1811 |
# with or without modifications, as long as this notice is preserved.
|
|
1812 |
||
1813 |
# AM_RUN_LOG(COMMAND)
|
|
1814 |
# -------------------
|
|
1815 |
# Run COMMAND, save the exit status in ac_status, and log it.
|
|
1816 |
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
|
1817 |
AC_DEFUN([AM_RUN_LOG],
|
|
1818 |
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD |
|
1819 |
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
|
1820 |
ac_status=$?
|
|
1821 |
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
|
1822 |
(exit $ac_status); }])
|
|
1823 |
||
1824 |
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
|
1825 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1826 |
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1827 |
# Free Software Foundation, Inc.
|
1828 |
#
|
|
1829 |
# This file is free software; the Free Software Foundation
|
|
1830 |
# gives unlimited permission to copy and/or distribute it,
|
|
1831 |
# with or without modifications, as long as this notice is preserved.
|
|
1832 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1833 |
# serial 5
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1834 |
|
1835 |
# AM_SANITY_CHECK
|
|
1836 |
# ---------------
|
|
1837 |
AC_DEFUN([AM_SANITY_CHECK],
|
|
1838 |
[AC_MSG_CHECKING([whether build environment is sane])
|
|
1839 |
# Just in case
|
|
1840 |
sleep 1
|
|
1841 |
echo timestamp > conftest.file
|
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1842 |
# Reject unsafe characters in $srcdir or the absolute working directory
|
1843 |
# name. Accept space and tab only in the latter.
|
|
1844 |
am_lf='
|
|
1845 |
'
|
|
1846 |
case `pwd` in
|
|
1847 |
*[[\\\"\#\$\&\'\`$am_lf]]*) |
|
1848 |
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
|
1849 |
esac
|
|
1850 |
case $srcdir in
|
|
1851 |
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
|
1852 |
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; |
|
1853 |
esac
|
|
1854 |
||
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1855 |
# Do `set' in a subshell so we don't clobber the current shell's |
1856 |
# arguments. Must try -L first in case configure is actually a
|
|
1857 |
# symlink; some systems play weird games with the mod time of symlinks
|
|
1858 |
# (eg FreeBSD returns the mod time of the symlink's containing |
|
1859 |
# directory). |
|
1860 |
if ( |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1861 |
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1862 |
if test "$[*]" = "X"; then |
1863 |
# -L didn't work. |
|
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1864 |
set X `ls -t "$srcdir/configure" conftest.file`
|
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1865 |
fi
|
1866 |
rm -f conftest.file
|
|
1867 |
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
|
1868 |
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
|
1869 |
||
1870 |
# If neither matched, then we have a broken ls. This can happen
|
|
1871 |
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
|
1872 |
# broken ls alias from the environment. This has actually
|
|
1873 |
# happened. Such a system could not be considered "sane".
|
|
1874 |
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|
1875 |
alias in your environment])
|
|
1876 |
fi
|
|
1877 |
||
1878 |
test "$[2]" = conftest.file
|
|
1879 |
)
|
|
1880 |
then
|
|
1881 |
# Ok.
|
|
1882 |
:
|
|
1883 |
else
|
|
1884 |
AC_MSG_ERROR([newly created file is older than distributed files!
|
|
1885 |
Check your system clock])
|
|
1886 |
fi
|
|
1887 |
AC_MSG_RESULT(yes)])
|
|
1888 |
||
1889 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
1890 |
#
|
|
1891 |
# This file is free software; the Free Software Foundation
|
|
1892 |
# gives unlimited permission to copy and/or distribute it,
|
|
1893 |
# with or without modifications, as long as this notice is preserved.
|
|
1894 |
||
1895 |
# AM_PROG_INSTALL_STRIP
|
|
1896 |
# ---------------------
|
|
1897 |
# One issue with vendor `install' (even GNU) is that you can't |
|
1898 |
# specify the program used to strip binaries. This is especially
|
|
1899 |
# annoying in cross-compiling environments, where the build's strip |
|
1900 |
# is unlikely to handle the host's binaries. |
|
1901 |
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
|
1902 |
# always use install-sh in `make install-strip', and initialize |
|
1903 |
# STRIPPROG with the value of the STRIP variable (set by the user). |
|
1904 |
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
|
1905 |
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
|
1906 |
# Installed binaries are usually stripped using `strip' when the user |
|
1907 |
# run `make install-strip'. However `strip' might not be the right |
|
1908 |
# tool to use in cross-compilation environments, therefore Automake
|
|
1909 |
# will honor the `STRIP' environment variable to overrule this program. |
|
1910 |
dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
|
1911 |
if test "$cross_compiling" != no; then |
|
1912 |
AC_CHECK_TOOL([STRIP], [strip], :) |
|
1913 |
fi
|
|
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1914 |
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1915 |
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1916 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1917 |
# Copyright (C) 2006, 2008 Free Software Foundation, Inc. |
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1918 |
#
|
1919 |
# This file is free software; the Free Software Foundation |
|
1920 |
# gives unlimited permission to copy and/or distribute it, |
|
1921 |
# with or without modifications, as long as this notice is preserved. |
|
1922 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1923 |
# serial 2 |
1924 |
||
1.1.9
by Sebastien Bacher
Import upstream version 0.11.4 |
1925 |
# _AM_SUBST_NOTMAKE(VARIABLE) |
1926 |
# --------------------------- |
|
1927 |
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
|
1928 |
# This macro is traced by Automake. |
|
1929 |
AC_DEFUN([_AM_SUBST_NOTMAKE]) |
|
1930 |
||
1.1.17
by Sebastien Bacher
Import upstream version 0.12.3 |
1931 |
# AM_SUBST_NOTMAKE(VARIABLE) |
1932 |
# --------------------------- |
|
1933 |
# Public sister of _AM_SUBST_NOTMAKE. |
|
1934 |
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
|
1935 |
||
1.1.1
by Sebastien Bacher
Import upstream version 0.9.2 |
1936 |
# Check how to create a tarball. -*- Autoconf -*- |
1937 |
||
1938 |
# Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
|
1939 |
#
|
|
1940 |
# This file is free software; the Free Software Foundation |
|
1941 |
# gives unlimited permission to copy and/or distribute it, |
|
1942 |
# with or without modifications, as long as this notice is preserved. |
|
1943 |
||
1944 |
# serial 2 |
|
1945 |
||
1946 |
# _AM_PROG_TAR(FORMAT) |
|
1947 |
# -------------------- |
|
1948 |
# Check how to create a tarball in format FORMAT. |
|
1949 |
# FORMAT should be one of `v7', `ustar', or `pax'. |
|
1950 |
#
|
|
1951 |
# Substitute a variable $(am__tar) that is a command
|
|
1952 |
# writing to stdout a FORMAT-tarball containing the directory
|
|
1953 |
# $tardir.
|
|
1954 |
# tardir=directory && $(am__tar) > result.tar
|
|
1955 |
#
|
|
1956 |
# Substitute a variable $(am__untar) that extract such
|
|
1957 |
# a tarball read from stdin.
|
|
1958 |
# $(am__untar) < result.tar
|
|
1959 |
AC_DEFUN([_AM_PROG_TAR],
|
|
1960 |
[# Always define AMTAR for backward compatibility.
|
|
1961 |
AM_MISSING_PROG([AMTAR], [tar])
|
|
1962 |
m4_if([$1], [v7],
|
|
1963 |
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], |
|
1964 |
[m4_case([$1], [ustar],, [pax],,
|
|
1965 |
[m4_fatal([Unknown tar format])])
|
|
1966 |
AC_MSG_CHECKING([how to create a $1 tar archive])
|
|
1967 |
# Loop over all known methods to create a tar archive until one works.
|
|
1968 |
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
|
1969 |
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
|
1970 |
# Do not fold the above two line into one, because Tru64 sh and
|
|
1971 |
# Solaris sh will not grok spaces in the rhs of `-'. |
|
1972 |
for _am_tool in $_am_tools |
|
1973 |
do
|
|
1974 |
case $_am_tool in |
|
1975 |
gnutar) |
|
1976 |
for _am_tar in tar gnutar gtar; |
|
1977 |
do |
|
1978 |
AM_RUN_LOG([$_am_tar --version]) && break |
|
1979 |
done |
|
1980 |
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
|
1981 |
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
|
1982 |
am__untar="$_am_tar -xf -" |
|
1983 |
;; |
|
1984 |
plaintar) |
|
1985 |
# Must skip GNU tar: if it does not support --format= it doesn't create |
|
1986 |
# ustar tarball either.
|
|
1987 |
(tar --version) >/dev/null 2>&1 && continue
|
|
1988 |
am__tar='tar chf - "$$tardir"' |
|
1989 |
am__tar_='tar chf - "$tardir"' |
|
1990 |
am__untar='tar xf -' |
|
1991 |
;;
|
|
1992 |
pax)
|
|
1993 |
am__tar='pax -L -x $1 -w "$$tardir"' |
|
1994 |
am__tar_='pax -L -x $1 -w "$tardir"' |
|
1995 |
am__untar='pax -r' |
|
1996 |
;;
|
|
1997 |
cpio)
|
|
1998 |
am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
|
1999 |
am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
|
2000 |
am__untar='cpio -i -H $1 -d' |
|
2001 |
;; |
|
2002 |
none) |
|
2003 |
am__tar=false |
|
2004 |
am__tar_=false |
|
2005 |
am__untar=false |
|
2006 |
;; |
|
2007 |
esac |
|
2008 |
||
2009 |
# If the value was cached, stop now. We just wanted to have am__tar |
|
2010 |
# and am__untar set. |
|
2011 |
test -n "${am_cv_prog_tar_$1}" && break |
|
2012 |
||
2013 |
# tar/untar a dummy directory, and stop if the command works |
|
2014 |
rm -rf conftest.dir |
|
2015 |
mkdir conftest.dir |
|
2016 |
echo GrepMe > conftest.dir/file |
|
2017 |
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
|
2018 |
rm -rf conftest.dir |
|
2019 |
if test -s conftest.tar; then |
|
2020 |
AM_RUN_LOG([$am__untar <conftest.tar]) |
|
2021 |
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
|
2022 |
fi |
|
2023 |
done
|
|
2024 |
rm -rf conftest.dir |
|
2025 |
||
2026 |
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
|
2027 |
AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
|
2028 |
AC_SUBST([am__tar]) |
|
2029 |
AC_SUBST([am__untar]) |
|
2030 |
]) # _AM_PROG_TAR |
|
2031 |
||
2032 |
m4_include([acinclude.m4]) |