"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "pan-0.133/aclocal.m4" of archive pan-0.133.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(AC_AUTOCONF_VERSION, [2.61],,
17 [m4_warning([this file was generated for autoconf 2.61.
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
22 # Configure paths for GLIB
23 # Owen Taylor 1997-2001
24
25 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
27 dnl gthread, or gio is specified in MODULES, pass to pkg-config
28 dnl
29 AC_DEFUN([AM_PATH_GLIB_2_0],
30 [dnl
31 dnl Get the cflags and libraries from pkg-config
32 dnl
33 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
34 , enable_glibtest=yes)
35
36 pkg_config_args=glib-2.0
37 for module in . $4
38 do
39 case "$module" in
40 gmodule)
41 pkg_config_args="$pkg_config_args gmodule-2.0"
42 ;;
43 gmodule-no-export)
44 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
45 ;;
46 gobject)
47 pkg_config_args="$pkg_config_args gobject-2.0"
48 ;;
49 gthread)
50 pkg_config_args="$pkg_config_args gthread-2.0"
51 ;;
52 gio*)
53 pkg_config_args="$pkg_config_args $module-2.0"
54 ;;
55 esac
56 done
57
58 PKG_PROG_PKG_CONFIG([0.16])
59
60 no_glib=""
61
62 if test "x$PKG_CONFIG" = x ; then
63 no_glib=yes
64 PKG_CONFIG=no
65 fi
66
67 min_glib_version=ifelse([$1], ,2.0.0,$1)
68 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
69
70 if test x$PKG_CONFIG != xno ; then
71 ## don't try to run the test against uninstalled libtool libs
72 if $PKG_CONFIG --uninstalled $pkg_config_args; then
73 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
74 enable_glibtest=no
75 fi
76
77 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
78 :
79 else
80 no_glib=yes
81 fi
82 fi
83
84 if test x"$no_glib" = x ; then
85 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
86 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
87 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
88
89 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
90 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
91 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
92 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
93 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
94 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
95 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
96 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
97 if test "x$enable_glibtest" = "xyes" ; then
98 ac_save_CFLAGS="$CFLAGS"
99 ac_save_LIBS="$LIBS"
100 CFLAGS="$CFLAGS $GLIB_CFLAGS"
101 LIBS="$GLIB_LIBS $LIBS"
102 dnl
103 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
104 dnl checks the results of pkg-config to some extent)
105 dnl
106 rm -f conf.glibtest
107 AC_TRY_RUN([
108 #include <glib.h>
109 #include <stdio.h>
110 #include <stdlib.h>
111
112 int
113 main ()
114 {
115 int major, minor, micro;
116 char *tmp_version;
117
118 system ("touch conf.glibtest");
119
120 /* HP/UX 9 (%@#!) writes to sscanf strings */
121 tmp_version = g_strdup("$min_glib_version");
122 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
123 printf("%s, bad version string\n", "$min_glib_version");
124 exit(1);
125 }
126
127 if ((glib_major_version != $glib_config_major_version) ||
128 (glib_minor_version != $glib_config_minor_version) ||
129 (glib_micro_version != $glib_config_micro_version))
130 {
131 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
132 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
133 glib_major_version, glib_minor_version, glib_micro_version);
134 printf ("*** was found! If pkg-config was correct, then it is best\n");
135 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
136 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
137 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
138 printf("*** required on your system.\n");
139 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
140 printf("*** to point to the correct configuration files\n");
141 }
142 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
143 (glib_minor_version != GLIB_MINOR_VERSION) ||
144 (glib_micro_version != GLIB_MICRO_VERSION))
145 {
146 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
147 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
148 printf("*** library (version %d.%d.%d)\n",
149 glib_major_version, glib_minor_version, glib_micro_version);
150 }
151 else
152 {
153 if ((glib_major_version > major) ||
154 ((glib_major_version == major) && (glib_minor_version > minor)) ||
155 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
156 {
157 return 0;
158 }
159 else
160 {
161 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
162 glib_major_version, glib_minor_version, glib_micro_version);
163 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
164 major, minor, micro);
165 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
166 printf("***\n");
167 printf("*** If you have already installed a sufficiently new version, this error\n");
168 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
169 printf("*** being found. The easiest way to fix this is to remove the old version\n");
170 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
171 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
172 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
173 printf("*** so that the correct libraries are found at run-time))\n");
174 }
175 }
176 return 1;
177 }
178 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
179 CFLAGS="$ac_save_CFLAGS"
180 LIBS="$ac_save_LIBS"
181 fi
182 fi
183 if test "x$no_glib" = x ; then
184 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
185 ifelse([$2], , :, [$2])
186 else
187 AC_MSG_RESULT(no)
188 if test "$PKG_CONFIG" = "no" ; then
189 echo "*** A new enough version of pkg-config was not found."
190 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
191 else
192 if test -f conf.glibtest ; then
193 :
194 else
195 echo "*** Could not run GLIB test program, checking why..."
196 ac_save_CFLAGS="$CFLAGS"
197 ac_save_LIBS="$LIBS"
198 CFLAGS="$CFLAGS $GLIB_CFLAGS"
199 LIBS="$LIBS $GLIB_LIBS"
200 AC_TRY_LINK([
201 #include <glib.h>
202 #include <stdio.h>
203 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
204 [ echo "*** The test program compiled, but did not run. This usually means"
205 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
206 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
207 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
208 echo "*** to the installed location Also, make sure you have run ldconfig if that"
209 echo "*** is required on your system"
210 echo "***"
211 echo "*** If you have an old version installed, it is best to remove it, although"
212 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
213 [ echo "*** The test program failed to compile or link. See the file config.log for the"
214 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
215 CFLAGS="$ac_save_CFLAGS"
216 LIBS="$ac_save_LIBS"
217 fi
218 fi
219 GLIB_CFLAGS=""
220 GLIB_LIBS=""
221 GLIB_GENMARSHAL=""
222 GOBJECT_QUERY=""
223 GLIB_MKENUMS=""
224 ifelse([$3], , :, [$3])
225 fi
226 AC_SUBST(GLIB_CFLAGS)
227 AC_SUBST(GLIB_LIBS)
228 AC_SUBST(GLIB_GENMARSHAL)
229 AC_SUBST(GOBJECT_QUERY)
230 AC_SUBST(GLIB_MKENUMS)
231 rm -f conf.glibtest
232 ])
233
234 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
235 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
236 #
237 # This file is free software, distributed under the terms of the GNU
238 # General Public License. As a special exception to the GNU General
239 # Public License, this file may be distributed as part of a program
240 # that contains a configuration script generated by Autoconf, under
241 # the same distribution terms as the rest of that program.
242 #
243 # This file can be copied and used freely without restrictions. It can
244 # be used in projects which are not available under the GNU Public License
245 # but which still want to provide support for the GNU gettext functionality.
246 #
247 # Macro to add for using GNU gettext.
248 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
249 #
250 # Modified to never use included libintl.
251 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
252 #
253 # Major rework to remove unused code
254 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
255 #
256 # Added better handling of ALL_LINGUAS from GNU gettext version
257 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
258 #
259 # Modified to require ngettext
260 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
261 #
262 # We need this here as well, since someone might use autoconf-2.5x
263 # to configure GLib then an older version to configure a package
264 # using AM_GLIB_GNU_GETTEXT
265 AC_PREREQ(2.53)
266
267 dnl
268 dnl We go to great lengths to make sure that aclocal won't
269 dnl try to pull in the installed version of these macros
270 dnl when running aclocal in the glib directory.
271 dnl
272 m4_copy([AC_DEFUN],[glib_DEFUN])
273 m4_copy([AC_REQUIRE],[glib_REQUIRE])
274 dnl
275 dnl At the end, if we're not within glib, we'll define the public
276 dnl definitions in terms of our private definitions.
277 dnl
278
279 # GLIB_LC_MESSAGES
280 #--------------------
281 glib_DEFUN([GLIB_LC_MESSAGES],
282 [AC_CHECK_HEADERS([locale.h])
283 if test $ac_cv_header_locale_h = yes; then
284 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
285 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
286 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
287 if test $am_cv_val_LC_MESSAGES = yes; then
288 AC_DEFINE(HAVE_LC_MESSAGES, 1,
289 [Define if your <locale.h> file defines LC_MESSAGES.])
290 fi
291 fi])
292
293 # GLIB_PATH_PROG_WITH_TEST
294 #----------------------------
295 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
296 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
297 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
298 [# Extract the first word of "$2", so it can be a program name with args.
299 set dummy $2; ac_word=[$]2
300 AC_MSG_CHECKING([for $ac_word])
301 AC_CACHE_VAL(ac_cv_path_$1,
302 [case "[$]$1" in
303 /*)
304 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
305 ;;
306 *)
307 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
308 for ac_dir in ifelse([$5], , $PATH, [$5]); do
309 test -z "$ac_dir" && ac_dir=.
310 if test -f $ac_dir/$ac_word; then
311 if [$3]; then
312 ac_cv_path_$1="$ac_dir/$ac_word"
313 break
314 fi
315 fi
316 done
317 IFS="$ac_save_ifs"
318 dnl If no 4th arg is given, leave the cache variable unset,
319 dnl so AC_PATH_PROGS will keep looking.
320 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
321 ])dnl
322 ;;
323 esac])dnl
324 $1="$ac_cv_path_$1"
325 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
326 AC_MSG_RESULT([$]$1)
327 else
328 AC_MSG_RESULT(no)
329 fi
330 AC_SUBST($1)dnl
331 ])
332
333 # GLIB_WITH_NLS
334 #-----------------
335 glib_DEFUN([GLIB_WITH_NLS],
336 dnl NLS is obligatory
337 [USE_NLS=yes
338 AC_SUBST(USE_NLS)
339
340 gt_cv_have_gettext=no
341
342 CATOBJEXT=NONE
343 XGETTEXT=:
344 INTLLIBS=
345
346 AC_CHECK_HEADER(libintl.h,
347 [gt_cv_func_dgettext_libintl="no"
348 libintl_extra_libs=""
349
350 #
351 # First check in libc
352 #
353 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
354 [AC_TRY_LINK([
355 #include <libintl.h>
356 ],
357 [return !ngettext ("","", 1)],
358 gt_cv_func_ngettext_libc=yes,
359 gt_cv_func_ngettext_libc=no)
360 ])
361
362 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
363 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
364 [AC_TRY_LINK([
365 #include <libintl.h>
366 ],
367 [return !dgettext ("","")],
368 gt_cv_func_dgettext_libc=yes,
369 gt_cv_func_dgettext_libc=no)
370 ])
371 fi
372
373 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
374 AC_CHECK_FUNCS(bind_textdomain_codeset)
375 fi
376
377 #
378 # If we don't have everything we want, check in libintl
379 #
380 if test "$gt_cv_func_dgettext_libc" != "yes" \
381 || test "$gt_cv_func_ngettext_libc" != "yes" \
382 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
383
384 AC_CHECK_LIB(intl, bindtextdomain,
385 [AC_CHECK_LIB(intl, ngettext,
386 [AC_CHECK_LIB(intl, dgettext,
387 gt_cv_func_dgettext_libintl=yes)])])
388
389 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
390 AC_MSG_CHECKING([if -liconv is needed to use gettext])
391 AC_MSG_RESULT([])
392 AC_CHECK_LIB(intl, ngettext,
393 [AC_CHECK_LIB(intl, dcgettext,
394 [gt_cv_func_dgettext_libintl=yes
395 libintl_extra_libs=-liconv],
396 :,-liconv)],
397 :,-liconv)
398 fi
399
400 #
401 # If we found libintl, then check in it for bind_textdomain_codeset();
402 # we'll prefer libc if neither have bind_textdomain_codeset(),
403 # and both have dgettext and ngettext
404 #
405 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
406 glib_save_LIBS="$LIBS"
407 LIBS="$LIBS -lintl $libintl_extra_libs"
408 unset ac_cv_func_bind_textdomain_codeset
409 AC_CHECK_FUNCS(bind_textdomain_codeset)
410 LIBS="$glib_save_LIBS"
411
412 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
413 gt_cv_func_dgettext_libc=no
414 else
415 if test "$gt_cv_func_dgettext_libc" = "yes" \
416 && test "$gt_cv_func_ngettext_libc" = "yes"; then
417 gt_cv_func_dgettext_libintl=no
418 fi
419 fi
420 fi
421 fi
422
423 if test "$gt_cv_func_dgettext_libc" = "yes" \
424 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
425 gt_cv_have_gettext=yes
426 fi
427
428 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
429 INTLLIBS="-lintl $libintl_extra_libs"
430 fi
431
432 if test "$gt_cv_have_gettext" = "yes"; then
433 AC_DEFINE(HAVE_GETTEXT,1,
434 [Define if the GNU gettext() function is already present or preinstalled.])
435 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
436 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
437 if test "$MSGFMT" != "no"; then
438 glib_save_LIBS="$LIBS"
439 LIBS="$LIBS $INTLLIBS"
440 AC_CHECK_FUNCS(dcgettext)
441 MSGFMT_OPTS=
442 AC_MSG_CHECKING([if msgfmt accepts -c])
443 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
444 msgid ""
445 msgstr ""
446 "Content-Type: text/plain; charset=UTF-8\n"
447 "Project-Id-Version: test 1.0\n"
448 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
449 "Last-Translator: test <foo@bar.xx>\n"
450 "Language-Team: C <LL@li.org>\n"
451 "MIME-Version: 1.0\n"
452 "Content-Transfer-Encoding: 8bit\n"
453 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
454 AC_SUBST(MSGFMT_OPTS)
455 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
456 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
457 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
458 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
459 return _nl_msg_cat_cntr],
460 [CATOBJEXT=.gmo
461 DATADIRNAME=share],
462 [case $host in
463 *-*-solaris*)
464 dnl On Solaris, if bind_textdomain_codeset is in libc,
465 dnl GNU format message catalog is always supported,
466 dnl since both are added to the libc all together.
467 dnl Hence, we'd like to go with DATADIRNAME=share and
468 dnl and CATOBJEXT=.gmo in this case.
469 AC_CHECK_FUNC(bind_textdomain_codeset,
470 [CATOBJEXT=.gmo
471 DATADIRNAME=share],
472 [CATOBJEXT=.mo
473 DATADIRNAME=lib])
474 ;;
475 *)
476 CATOBJEXT=.mo
477 DATADIRNAME=lib
478 ;;
479 esac])
480 LIBS="$glib_save_LIBS"
481 INSTOBJEXT=.mo
482 else
483 gt_cv_have_gettext=no
484 fi
485 fi
486 ])
487
488 if test "$gt_cv_have_gettext" = "yes" ; then
489 AC_DEFINE(ENABLE_NLS, 1,
490 [always defined to indicate that i18n is enabled])
491 fi
492
493 dnl Test whether we really found GNU xgettext.
494 if test "$XGETTEXT" != ":"; then
495 dnl If it is not GNU xgettext we define it as : so that the
496 dnl Makefiles still can work.
497 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
498 : ;
499 else
500 AC_MSG_RESULT(
501 [found xgettext program is not GNU xgettext; ignore it])
502 XGETTEXT=":"
503 fi
504 fi
505
506 # We need to process the po/ directory.
507 POSUB=po
508
509 AC_OUTPUT_COMMANDS(
510 [case "$CONFIG_FILES" in *po/Makefile.in*)
511 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
512 esac])
513
514 dnl These rules are solely for the distribution goal. While doing this
515 dnl we only have to keep exactly one list of the available catalogs
516 dnl in configure.in.
517 for lang in $ALL_LINGUAS; do
518 GMOFILES="$GMOFILES $lang.gmo"
519 POFILES="$POFILES $lang.po"
520 done
521
522 dnl Make all variables we use known to autoconf.
523 AC_SUBST(CATALOGS)
524 AC_SUBST(CATOBJEXT)
525 AC_SUBST(DATADIRNAME)
526 AC_SUBST(GMOFILES)
527 AC_SUBST(INSTOBJEXT)
528 AC_SUBST(INTLLIBS)
529 AC_SUBST(PO_IN_DATADIR_TRUE)
530 AC_SUBST(PO_IN_DATADIR_FALSE)
531 AC_SUBST(POFILES)
532 AC_SUBST(POSUB)
533 ])
534
535 # AM_GLIB_GNU_GETTEXT
536 # -------------------
537 # Do checks necessary for use of gettext. If a suitable implementation
538 # of gettext is found in either in libintl or in the C library,
539 # it will set INTLLIBS to the libraries needed for use of gettext
540 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
541 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
542 # on various variables needed by the Makefile.in.in installed by
543 # glib-gettextize.
544 dnl
545 glib_DEFUN([GLIB_GNU_GETTEXT],
546 [AC_REQUIRE([AC_PROG_CC])dnl
547 AC_REQUIRE([AC_HEADER_STDC])dnl
548
549 GLIB_LC_MESSAGES
550 GLIB_WITH_NLS
551
552 if test "$gt_cv_have_gettext" = "yes"; then
553 if test "x$ALL_LINGUAS" = "x"; then
554 LINGUAS=
555 else
556 AC_MSG_CHECKING(for catalogs to be installed)
557 NEW_LINGUAS=
558 for presentlang in $ALL_LINGUAS; do
559 useit=no
560 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
561 desiredlanguages="$LINGUAS"
562 else
563 desiredlanguages="$ALL_LINGUAS"
564 fi
565 for desiredlang in $desiredlanguages; do
566 # Use the presentlang catalog if desiredlang is
567 # a. equal to presentlang, or
568 # b. a variant of presentlang (because in this case,
569 # presentlang can be used as a fallback for messages
570 # which are not translated in the desiredlang catalog).
571 case "$desiredlang" in
572 "$presentlang"*) useit=yes;;
573 esac
574 done
575 if test $useit = yes; then
576 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
577 fi
578 done
579 LINGUAS=$NEW_LINGUAS
580 AC_MSG_RESULT($LINGUAS)
581 fi
582
583 dnl Construct list of names of catalog files to be constructed.
584 if test -n "$LINGUAS"; then
585 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
586 fi
587 fi
588
589 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
590 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
591 dnl Try to locate is.
592 MKINSTALLDIRS=
593 if test -n "$ac_aux_dir"; then
594 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
595 fi
596 if test -z "$MKINSTALLDIRS"; then
597 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
598 fi
599 AC_SUBST(MKINSTALLDIRS)
600
601 dnl Generate list of files to be processed by xgettext which will
602 dnl be included in po/Makefile.
603 test -d po || mkdir po
604 if test "x$srcdir" != "x."; then
605 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
606 posrcprefix="$srcdir/"
607 else
608 posrcprefix="../$srcdir/"
609 fi
610 else
611 posrcprefix="../"
612 fi
613 rm -f po/POTFILES
614 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
615 < $srcdir/po/POTFILES.in > po/POTFILES
616 ])
617
618 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
619 # -------------------------------
620 # Define VARIABLE to the location where catalog files will
621 # be installed by po/Makefile.
622 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
623 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
624 glib_save_prefix="$prefix"
625 glib_save_exec_prefix="$exec_prefix"
626 glib_save_datarootdir="$datarootdir"
627 test "x$prefix" = xNONE && prefix=$ac_default_prefix
628 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
629 datarootdir=`eval echo "${datarootdir}"`
630 if test "x$CATOBJEXT" = "x.mo" ; then
631 localedir=`eval echo "${libdir}/locale"`
632 else
633 localedir=`eval echo "${datadir}/locale"`
634 fi
635 prefix="$glib_save_prefix"
636 exec_prefix="$glib_save_exec_prefix"
637 datarootdir="$glib_save_datarootdir"
638 AC_DEFINE_UNQUOTED($1, "$localedir",
639 [Define the location where the catalogs will be installed])
640 ])
641
642 dnl
643 dnl Now the definitions that aclocal will find
644 dnl
645 ifdef(glib_configure_in,[],[
646 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
647 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
648 ])dnl
649
650 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
651 #
652 # Create a temporary file with TEST-FILE as its contents and pass the
653 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
654 # 0 and perform ACTION-IF-FAIL for any other exit status.
655 AC_DEFUN([GLIB_RUN_PROG],
656 [cat >conftest.foo <<_ACEOF
657 $2
658 _ACEOF
659 if AC_RUN_LOG([$1 conftest.foo]); then
660 m4_ifval([$3], [$3], [:])
661 m4_ifvaln([$4], [else $4])dnl
662 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
663 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
664 fi])
665
666
667 # Configure paths for GTK+
668 # Owen Taylor 1997-2001
669
670 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
671 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
672 dnl pass to pkg-config
673 dnl
674 AC_DEFUN([AM_PATH_GTK_2_0],
675 [dnl
676 dnl Get the cflags and libraries from pkg-config
677 dnl
678 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
679 , enable_gtktest=yes)
680
681 pkg_config_args=gtk+-2.0
682 for module in . $4
683 do
684 case "$module" in
685 gthread)
686 pkg_config_args="$pkg_config_args gthread-2.0"
687 ;;
688 esac
689 done
690
691 no_gtk=""
692
693 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
694
695 if test x$PKG_CONFIG != xno ; then
696 if pkg-config --atleast-pkgconfig-version 0.7 ; then
697 :
698 else
699 echo "*** pkg-config too old; version 0.7 or better required."
700 no_gtk=yes
701 PKG_CONFIG=no
702 fi
703 else
704 no_gtk=yes
705 fi
706
707 min_gtk_version=ifelse([$1], ,2.0.0,$1)
708 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
709
710 if test x$PKG_CONFIG != xno ; then
711 ## don't try to run the test against uninstalled libtool libs
712 if $PKG_CONFIG --uninstalled $pkg_config_args; then
713 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
714 enable_gtktest=no
715 fi
716
717 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
718 :
719 else
720 no_gtk=yes
721 fi
722 fi
723
724 if test x"$no_gtk" = x ; then
725 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
726 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
727 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
728 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
729 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
730 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
731 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
732 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
733 if test "x$enable_gtktest" = "xyes" ; then
734 ac_save_CFLAGS="$CFLAGS"
735 ac_save_LIBS="$LIBS"
736 CFLAGS="$CFLAGS $GTK_CFLAGS"
737 LIBS="$GTK_LIBS $LIBS"
738 dnl
739 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
740 dnl checks the results of pkg-config to some extent)
741 dnl
742 rm -f conf.gtktest
743 AC_TRY_RUN([
744 #include <gtk/gtk.h>
745 #include <stdio.h>
746 #include <stdlib.h>
747
748 int
749 main ()
750 {
751 int major, minor, micro;
752 char *tmp_version;
753
754 system ("touch conf.gtktest");
755
756 /* HP/UX 9 (%@#!) writes to sscanf strings */
757 tmp_version = g_strdup("$min_gtk_version");
758 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
759 printf("%s, bad version string\n", "$min_gtk_version");
760 exit(1);
761 }
762
763 if ((gtk_major_version != $gtk_config_major_version) ||
764 (gtk_minor_version != $gtk_config_minor_version) ||
765 (gtk_micro_version != $gtk_config_micro_version))
766 {
767 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
768 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
769 gtk_major_version, gtk_minor_version, gtk_micro_version);
770 printf ("*** was found! If pkg-config was correct, then it is best\n");
771 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
772 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
773 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
774 printf("*** required on your system.\n");
775 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
776 printf("*** to point to the correct configuration files\n");
777 }
778 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
779 (gtk_minor_version != GTK_MINOR_VERSION) ||
780 (gtk_micro_version != GTK_MICRO_VERSION))
781 {
782 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
783 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
784 printf("*** library (version %d.%d.%d)\n",
785 gtk_major_version, gtk_minor_version, gtk_micro_version);
786 }
787 else
788 {
789 if ((gtk_major_version > major) ||
790 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
791 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
792 {
793 return 0;
794 }
795 else
796 {
797 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
798 gtk_major_version, gtk_minor_version, gtk_micro_version);
799 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
800 major, minor, micro);
801 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
802 printf("***\n");
803 printf("*** If you have already installed a sufficiently new version, this error\n");
804 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
805 printf("*** being found. The easiest way to fix this is to remove the old version\n");
806 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
807 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
808 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
809 printf("*** so that the correct libraries are found at run-time))\n");
810 }
811 }
812 return 1;
813 }
814 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
815 CFLAGS="$ac_save_CFLAGS"
816 LIBS="$ac_save_LIBS"
817 fi
818 fi
819 if test "x$no_gtk" = x ; then
820 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
821 ifelse([$2], , :, [$2])
822 else
823 AC_MSG_RESULT(no)
824 if test "$PKG_CONFIG" = "no" ; then
825 echo "*** A new enough version of pkg-config was not found."
826 echo "*** See http://pkgconfig.sourceforge.net"
827 else
828 if test -f conf.gtktest ; then
829 :
830 else
831 echo "*** Could not run GTK+ test program, checking why..."
832 ac_save_CFLAGS="$CFLAGS"
833 ac_save_LIBS="$LIBS"
834 CFLAGS="$CFLAGS $GTK_CFLAGS"
835 LIBS="$LIBS $GTK_LIBS"
836 AC_TRY_LINK([
837 #include <gtk/gtk.h>
838 #include <stdio.h>
839 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
840 [ echo "*** The test program compiled, but did not run. This usually means"
841 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
842 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
843 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
844 echo "*** to the installed location Also, make sure you have run ldconfig if that"
845 echo "*** is required on your system"
846 echo "***"
847 echo "*** If you have an old version installed, it is best to remove it, although"
848 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
849 [ echo "*** The test program failed to compile or link. See the file config.log for the"
850 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
851 CFLAGS="$ac_save_CFLAGS"
852 LIBS="$ac_save_LIBS"
853 fi
854 fi
855 GTK_CFLAGS=""
856 GTK_LIBS=""
857 ifelse([$3], , :, [$3])
858 fi
859 AC_SUBST(GTK_CFLAGS)
860 AC_SUBST(GTK_LIBS)
861 rm -f conf.gtktest
862 ])
863
864
865 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
866 # serial 36 IT_PROG_INTLTOOL
867 AC_DEFUN([IT_PROG_INTLTOOL],
868 [AC_PREREQ([2.50])dnl
869
870 case "$am__api_version" in
871 1.[01234])
872 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
873 ;;
874 *)
875 ;;
876 esac
877
878 if test -n "$1"; then
879 AC_MSG_CHECKING([for intltool >= $1])
880
881 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
882 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
883 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
884 ]
885 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
886 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
887 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
888 fi
889
890 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 $< [$]@'
891 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 $< [$]@'
892 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 $< [$]@'
893 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 $< [$]@'
894 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
895 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 $< [$]@'
896 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 $< [$]@'
897 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 $< [$]@'
898 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 $< [$]@'
899 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 $< [$]@'
900 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 $< [$]@'
901 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
902 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 $< [$]@'
903 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 $< [$]@'
904 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 $< [$]@'
905 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 $< [$]@'
906 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 $< [$]@'
907 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 $< [$]@'
908 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 $< [$]@'
909
910 AC_SUBST(INTLTOOL_DESKTOP_RULE)
911 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
912 AC_SUBST(INTLTOOL_KEYS_RULE)
913 AC_SUBST(INTLTOOL_PROP_RULE)
914 AC_SUBST(INTLTOOL_OAF_RULE)
915 AC_SUBST(INTLTOOL_PONG_RULE)
916 AC_SUBST(INTLTOOL_SERVER_RULE)
917 AC_SUBST(INTLTOOL_SHEET_RULE)
918 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
919 AC_SUBST(INTLTOOL_UI_RULE)
920 AC_SUBST(INTLTOOL_XAM_RULE)
921 AC_SUBST(INTLTOOL_KBD_RULE)
922 AC_SUBST(INTLTOOL_XML_RULE)
923 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
924 AC_SUBST(INTLTOOL_CAVES_RULE)
925 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
926 AC_SUBST(INTLTOOL_THEME_RULE)
927 AC_SUBST(INTLTOOL_SERVICE_RULE)
928 AC_SUBST(INTLTOOL_POLICY_RULE)
929
930 # Check the gettext tools to make sure they are GNU
931 AC_PATH_PROG(XGETTEXT, xgettext)
932 AC_PATH_PROG(MSGMERGE, msgmerge)
933 AC_PATH_PROG(MSGFMT, msgfmt)
934 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
935 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
936 fi
937 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
938 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
939 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
940 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
941 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
942 fi
943
944 # Use the tools built into the package, not the ones that are installed.
945 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
946 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
947 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
948
949 AC_PATH_PROG(INTLTOOL_PERL, perl)
950 if test -z "$INTLTOOL_PERL"; then
951 AC_MSG_ERROR([perl not found; required for intltool])
952 fi
953 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
954 AC_MSG_ERROR([perl 5.x required for intltool])
955 fi
956 if test "x$2" != "xno-xml"; then
957 AC_MSG_CHECKING([for XML::Parser])
958 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
959 AC_MSG_RESULT([ok])
960 else
961 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
962 fi
963 fi
964
965 # Substitute ALL_LINGUAS so we can use it in po/Makefile
966 AC_SUBST(ALL_LINGUAS)
967
968 # Set DATADIRNAME correctly if it is not set yet
969 # (copied from glib-gettext.m4)
970 if test -z "$DATADIRNAME"; then
971 AC_LINK_IFELSE(
972 [AC_LANG_PROGRAM([[]],
973 [[extern int _nl_msg_cat_cntr;
974 return _nl_msg_cat_cntr]])],
975 [DATADIRNAME=share],
976 [case $host in
977 *-*-solaris*)
978 dnl On Solaris, if bind_textdomain_codeset is in libc,
979 dnl GNU format message catalog is always supported,
980 dnl since both are added to the libc all together.
981 dnl Hence, we'd like to go with DATADIRNAME=share
982 dnl in this case.
983 AC_CHECK_FUNC(bind_textdomain_codeset,
984 [DATADIRNAME=share], [DATADIRNAME=lib])
985 ;;
986 *)
987 [DATADIRNAME=lib]
988 ;;
989 esac])
990 fi
991 AC_SUBST(DATADIRNAME)
992
993 IT_PO_SUBDIR([po])
994
995 dnl The following is very similar to
996 dnl
997 dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
998 dnl
999 dnl with the following slight differences:
1000 dnl - the *.in files are in ac_aux_dir,
1001 dnl - if the file haven't changed upon reconfigure, it's not touched,
1002 dnl - the evaluation of the third parameter enables a hack which computes
1003 dnl the actual value of $libdir,
1004 dnl - the user sees "executing intltool commands", instead of
1005 dnl "creating intltool-extract" and such.
1006 dnl
1007 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
1008 dnl a reason for it.
1009
1010 AC_CONFIG_COMMANDS([intltool], [
1011
1012 for file in intltool-extract intltool-merge intltool-update; do
1013 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
1014 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
1015 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
1016 < ${ac_aux_dir}/${file}.in > ${file}.out
1017 if cmp -s ${file} ${file}.out 2>/dev/null; then
1018 rm -f ${file}.out
1019 else
1020 mv -f ${file}.out ${file}
1021 fi
1022 chmod ugo+x ${file}
1023 chmod u+w ${file}
1024 done
1025
1026 ],
1027 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
1028 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
1029 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
1030
1031 ])
1032
1033
1034 # IT_PO_SUBDIR(DIRNAME)
1035 # ---------------------
1036 # All po subdirs have to be declared with this macro; the subdir "po" is
1037 # declared by IT_PROG_INTLTOOL.
1038 #
1039 AC_DEFUN([IT_PO_SUBDIR],
1040 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1041 dnl
1042 dnl The following CONFIG_COMMANDS should be exetuted at the very end
1043 dnl of config.status.
1044 AC_CONFIG_COMMANDS_PRE([
1045 AC_CONFIG_COMMANDS([$1/stamp-it], [
1046 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1047 >"$1/stamp-it.tmp"
1048 [sed '/^#/d
1049 s/^[[].*] *//
1050 /^[ ]*$/d
1051 '"s|^| $ac_top_srcdir/|" \
1052 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1053 ]
1054 if test ! -f "$1/Makefile"; then
1055 AC_MSG_ERROR([$1/Makefile is not ready.])
1056 fi
1057 mv "$1/Makefile" "$1/Makefile.tmp"
1058 [sed '/^POTFILES =/,/[^\\]$/ {
1059 /^POTFILES =/!d
1060 r $1/POTFILES
1061 }
1062 ' "$1/Makefile.tmp" >"$1/Makefile"]
1063 rm -f "$1/Makefile.tmp"
1064 mv "$1/stamp-it.tmp" "$1/stamp-it"
1065 ])
1066 ])dnl
1067 ])
1068
1069
1070 # deprecated macros
1071 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1072 # A hint is needed for aclocal from Automake <= 1.9.4:
1073 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1074
1075
1076 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1077 #
1078 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1079 #
1080 # This program is free software; you can redistribute it and/or modify
1081 # it under the terms of the GNU General Public License as published by
1082 # the Free Software Foundation; either version 2 of the License, or
1083 # (at your option) any later version.
1084 #
1085 # This program is distributed in the hope that it will be useful, but
1086 # WITHOUT ANY WARRANTY; without even the implied warranty of
1087 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1088 # General Public License for more details.
1089 #
1090 # You should have received a copy of the GNU General Public License
1091 # along with this program; if not, write to the Free Software
1092 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1093 #
1094 # As a special exception to the GNU General Public License, if you
1095 # distribute this file as part of a program that contains a
1096 # configuration script generated by Autoconf, you may include it under
1097 # the same distribution terms that you use for the rest of that program.
1098
1099 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1100 # ----------------------------------
1101 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1102 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1103 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1104 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1105 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1106 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1107 fi
1108 if test -n "$PKG_CONFIG"; then
1109 _pkg_min_version=m4_default([$1], [0.9.0])
1110 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1111 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1112 AC_MSG_RESULT([yes])
1113 else
1114 AC_MSG_RESULT([no])
1115 PKG_CONFIG=""
1116 fi
1117
1118 fi[]dnl
1119 ])# PKG_PROG_PKG_CONFIG
1120
1121 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1122 #
1123 # Check to see whether a particular set of modules exists. Similar
1124 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1125 #
1126 #
1127 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
1128 # this or PKG_CHECK_MODULES is called, or make sure to call
1129 # PKG_CHECK_EXISTS manually
1130 # --------------------------------------------------------------
1131 AC_DEFUN([PKG_CHECK_EXISTS],
1132 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1133 if test -n "$PKG_CONFIG" && \
1134 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1135 m4_ifval([$2], [$2], [:])
1136 m4_ifvaln([$3], [else
1137 $3])dnl
1138 fi])
1139
1140
1141 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1142 # ---------------------------------------------
1143 m4_define([_PKG_CONFIG],
1144 [if test -n "$$1"; then
1145 pkg_cv_[]$1="$$1"
1146 elif test -n "$PKG_CONFIG"; then
1147 PKG_CHECK_EXISTS([$3],
1148 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1149 [pkg_failed=yes])
1150 else
1151 pkg_failed=untried
1152 fi[]dnl
1153 ])# _PKG_CONFIG
1154
1155 # _PKG_SHORT_ERRORS_SUPPORTED
1156 # -----------------------------
1157 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1158 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1159 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1160 _pkg_short_errors_supported=yes
1161 else
1162 _pkg_short_errors_supported=no
1163 fi[]dnl
1164 ])# _PKG_SHORT_ERRORS_SUPPORTED
1165
1166
1167 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1168 # [ACTION-IF-NOT-FOUND])
1169 #
1170 #
1171 # Note that if there is a possibility the first call to
1172 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1173 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1174 #
1175 #
1176 # --------------------------------------------------------------
1177 AC_DEFUN([PKG_CHECK_MODULES],
1178 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1179 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1180 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1181
1182 pkg_failed=no
1183 AC_MSG_CHECKING([for $1])
1184
1185 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1186 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1187
1188 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1189 and $1[]_LIBS to avoid the need to call pkg-config.
1190 See the pkg-config man page for more details.])
1191
1192 if test $pkg_failed = yes; then
1193 _PKG_SHORT_ERRORS_SUPPORTED
1194 if test $_pkg_short_errors_supported = yes; then
1195 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1196 else
1197 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1198 fi
1199 # Put the nasty error message in config.log where it belongs
1200 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1201
1202 ifelse([$4], , [AC_MSG_ERROR(dnl
1203 [Package requirements ($2) were not met:
1204
1205 $$1_PKG_ERRORS
1206
1207 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1208 installed software in a non-standard prefix.
1209
1210 _PKG_TEXT
1211 ])],
1212 [AC_MSG_RESULT([no])
1213 $4])
1214 elif test $pkg_failed = untried; then
1215 ifelse([$4], , [AC_MSG_FAILURE(dnl
1216 [The pkg-config script could not be found or is too old. Make sure it
1217 is in your PATH or set the PKG_CONFIG environment variable to the full
1218 path to pkg-config.
1219
1220 _PKG_TEXT
1221
1222 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1223 [$4])
1224 else
1225 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1226 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1227 AC_MSG_RESULT([yes])
1228 ifelse([$3], , :, [$3])
1229 fi[]dnl
1230 ])# PKG_CHECK_MODULES
1231
1232 # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
1233 #
1234 # This file is free software; the Free Software Foundation
1235 # gives unlimited permission to copy and/or distribute it,
1236 # with or without modifications, as long as this notice is preserved.
1237
1238 # AM_AUTOMAKE_VERSION(VERSION)
1239 # ----------------------------
1240 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1241 # generated from the m4 files accompanying Automake X.Y.
1242 # (This private macro should not be called outside this file.)
1243 AC_DEFUN([AM_AUTOMAKE_VERSION],
1244 [am__api_version='1.10'
1245 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1246 dnl require some minimum version. Point them to the right macro.
1247 m4_if([$1], [1.10.1], [],
1248 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1249 ])
1250
1251 # _AM_AUTOCONF_VERSION(VERSION)
1252 # -----------------------------
1253 # aclocal traces this macro to find the Autoconf version.
1254 # This is a private macro too. Using m4_define simplifies
1255 # the logic in aclocal, which can simply ignore this definition.
1256 m4_define([_AM_AUTOCONF_VERSION], [])
1257
1258 # AM_SET_CURRENT_AUTOMAKE_VERSION
1259 # -------------------------------
1260 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1261 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1262 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1263 [AM_AUTOMAKE_VERSION([1.10.1])dnl
1264 m4_ifndef([AC_AUTOCONF_VERSION],
1265 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1266 _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
1267
1268 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1269
1270 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1271 #
1272 # This file is free software; the Free Software Foundation
1273 # gives unlimited permission to copy and/or distribute it,
1274 # with or without modifications, as long as this notice is preserved.
1275
1276 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1277 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1278 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1279 #
1280 # Of course, Automake must honor this variable whenever it calls a
1281 # tool from the auxiliary directory. The problem is that $srcdir (and
1282 # therefore $ac_aux_dir as well) can be either absolute or relative,
1283 # depending on how configure is run. This is pretty annoying, since
1284 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1285 # source directory, any form will work fine, but in subdirectories a
1286 # relative path needs to be adjusted first.
1287 #
1288 # $ac_aux_dir/missing
1289 # fails when called from a subdirectory if $ac_aux_dir is relative
1290 # $top_srcdir/$ac_aux_dir/missing
1291 # fails if $ac_aux_dir is absolute,
1292 # fails when called from a subdirectory in a VPATH build with
1293 # a relative $ac_aux_dir
1294 #
1295 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1296 # are both prefixed by $srcdir. In an in-source build this is usually
1297 # harmless because $srcdir is `.', but things will broke when you
1298 # start a VPATH build or use an absolute $srcdir.
1299 #
1300 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1301 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1302 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1303 # and then we would define $MISSING as
1304 # MISSING="\${SHELL} $am_aux_dir/missing"
1305 # This will work as long as MISSING is not called from configure, because
1306 # unfortunately $(top_srcdir) has no meaning in configure.
1307 # However there are other variables, like CC, which are often used in
1308 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1309 #
1310 # Another solution, used here, is to always expand $ac_aux_dir to an
1311 # absolute PATH. The drawback is that using absolute paths prevent a
1312 # configured tree to be moved without reconfiguration.
1313
1314 AC_DEFUN([AM_AUX_DIR_EXPAND],
1315 [dnl Rely on autoconf to set up CDPATH properly.
1316 AC_PREREQ([2.50])dnl
1317 # expand $ac_aux_dir to an absolute path
1318 am_aux_dir=`cd $ac_aux_dir && pwd`
1319 ])
1320
1321 # AM_CONDITIONAL -*- Autoconf -*-
1322
1323 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
1324 # Free Software Foundation, Inc.
1325 #
1326 # This file is free software; the Free Software Foundation
1327 # gives unlimited permission to copy and/or distribute it,
1328 # with or without modifications, as long as this notice is preserved.
1329
1330 # serial 8
1331
1332 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1333 # -------------------------------------
1334 # Define a conditional.
1335 AC_DEFUN([AM_CONDITIONAL],
1336 [AC_PREREQ(2.52)dnl
1337 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1338 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1339 AC_SUBST([$1_TRUE])dnl
1340 AC_SUBST([$1_FALSE])dnl
1341 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1342 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1343 if $2; then
1344 $1_TRUE=
1345 $1_FALSE='#'
1346 else
1347 $1_TRUE='#'
1348 $1_FALSE=
1349 fi
1350 AC_CONFIG_COMMANDS_PRE(
1351 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1352 AC_MSG_ERROR([[conditional "$1" was never defined.
1353 Usually this means the macro was only invoked conditionally.]])
1354 fi])])
1355
1356 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1357 # Free Software Foundation, Inc.
1358 #
1359 # This file is free software; the Free Software Foundation
1360 # gives unlimited permission to copy and/or distribute it,
1361 # with or without modifications, as long as this notice is preserved.
1362
1363 # serial 9
1364
1365 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1366 # written in clear, in which case automake, when reading aclocal.m4,
1367 # will think it sees a *use*, and therefore will trigger all it's
1368 # C support machinery. Also note that it means that autoscan, seeing
1369 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1370
1371
1372 # _AM_DEPENDENCIES(NAME)
1373 # ----------------------
1374 # See how the compiler implements dependency checking.
1375 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1376 # We try a few techniques and use that to set a single cache variable.
1377 #
1378 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1379 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1380 # dependency, and given that the user is not expected to run this macro,
1381 # just rely on AC_PROG_CC.
1382 AC_DEFUN([_AM_DEPENDENCIES],
1383 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1384 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1385 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1386 AC_REQUIRE([AM_DEP_TRACK])dnl
1387
1388 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1389 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1390 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1391 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1392 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1393 [depcc="$$1" am_compiler_list=])
1394
1395 AC_CACHE_CHECK([dependency style of $depcc],
1396 [am_cv_$1_dependencies_compiler_type],
1397 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1398 # We make a subdir and do the tests there. Otherwise we can end up
1399 # making bogus files that we don't know about and never remove. For
1400 # instance it was reported that on HP-UX the gcc test will end up
1401 # making a dummy file named `D' -- because `-MD' means `put the output
1402 # in D'.
1403 mkdir conftest.dir
1404 # Copy depcomp to subdir because otherwise we won't find it if we're
1405 # using a relative directory.
1406 cp "$am_depcomp" conftest.dir
1407 cd conftest.dir
1408 # We will build objects and dependencies in a subdirectory because
1409 # it helps to detect inapplicable dependency modes. For instance
1410 # both Tru64's cc and ICC support -MD to output dependencies as a
1411 # side effect of compilation, but ICC will put the dependencies in
1412 # the current directory while Tru64 will put them in the object
1413 # directory.
1414 mkdir sub
1415
1416 am_cv_$1_dependencies_compiler_type=none
1417 if test "$am_compiler_list" = ""; then
1418 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1419 fi
1420 for depmode in $am_compiler_list; do
1421 # Setup a source with many dependencies, because some compilers
1422 # like to wrap large dependency lists on column 80 (with \), and
1423 # we should not choose a depcomp mode which is confused by this.
1424 #
1425 # We need to recreate these files for each test, as the compiler may
1426 # overwrite some of them when testing with obscure command lines.
1427 # This happens at least with the AIX C compiler.
1428 : > sub/conftest.c
1429 for i in 1 2 3 4 5 6; do
1430 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1431 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1432 # Solaris 8's {/usr,}/bin/sh.
1433 touch sub/conftst$i.h
1434 done
1435 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1436
1437 case $depmode in
1438 nosideeffect)
1439 # after this tag, mechanisms are not by side-effect, so they'll
1440 # only be used when explicitly requested
1441 if test "x$enable_dependency_tracking" = xyes; then
1442 continue
1443 else
1444 break
1445 fi
1446 ;;
1447 none) break ;;
1448 esac
1449 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1450 # mode. It turns out that the SunPro C++ compiler does not properly
1451 # handle `-M -o', and we need to detect this.
1452 if depmode=$depmode \
1453 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1454 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1455 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1456 >/dev/null 2>conftest.err &&
1457 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1458 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1459 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1460 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1461 # icc doesn't choke on unknown options, it will just issue warnings
1462 # or remarks (even with -Werror). So we grep stderr for any message
1463 # that says an option was ignored or not supported.
1464 # When given -MP, icc 7.0 and 7.1 complain thusly:
1465 # icc: Command line warning: ignoring option '-M'; no argument required
1466 # The diagnosis changed in icc 8.0:
1467 # icc: Command line remark: option '-MP' not supported
1468 if (grep 'ignoring option' conftest.err ||
1469 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1470 am_cv_$1_dependencies_compiler_type=$depmode
1471 break
1472 fi
1473 fi
1474 done
1475
1476 cd ..
1477 rm -rf conftest.dir
1478 else
1479 am_cv_$1_dependencies_compiler_type=none
1480 fi
1481 ])
1482 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1483 AM_CONDITIONAL([am__fastdep$1], [
1484 test "x$enable_dependency_tracking" != xno \
1485 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1486 ])
1487
1488
1489 # AM_SET_DEPDIR
1490 # -------------
1491 # Choose a directory name for dependency files.
1492 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1493 AC_DEFUN([AM_SET_DEPDIR],
1494 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1495 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1496 ])
1497
1498
1499 # AM_DEP_TRACK
1500 # ------------
1501 AC_DEFUN([AM_DEP_TRACK],
1502 [AC_ARG_ENABLE(dependency-tracking,
1503 [ --disable-dependency-tracking speeds up one-time build
1504 --enable-dependency-tracking do not reject slow dependency extractors])
1505 if test "x$enable_dependency_tracking" != xno; then
1506 am_depcomp="$ac_aux_dir/depcomp"
1507 AMDEPBACKSLASH='\'
1508 fi
1509 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1510 AC_SUBST([AMDEPBACKSLASH])dnl
1511 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1512 ])
1513
1514 # Generate code to set up dependency tracking. -*- Autoconf -*-
1515
1516 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1517 # Free Software Foundation, Inc.
1518 #
1519 # This file is free software; the Free Software Foundation
1520 # gives unlimited permission to copy and/or distribute it,
1521 # with or without modifications, as long as this notice is preserved.
1522
1523 #serial 3
1524
1525 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1526 # ------------------------------
1527 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1528 [for mf in $CONFIG_FILES; do
1529 # Strip MF so we end up with the name of the file.
1530 mf=`echo "$mf" | sed -e 's/:.*$//'`
1531 # Check whether this is an Automake generated Makefile or not.
1532 # We used to match only the files named `Makefile.in', but
1533 # some people rename them; so instead we look at the file content.
1534 # Grep'ing the first line is not enough: some people post-process
1535 # each Makefile.in and add a new line on top of each file to say so.
1536 # Grep'ing the whole file is not good either: AIX grep has a line
1537 # limit of 2048, but all sed's we know have understand at least 4000.
1538 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1539 dirpart=`AS_DIRNAME("$mf")`
1540 else
1541 continue
1542 fi
1543 # Extract the definition of DEPDIR, am__include, and am__quote
1544 # from the Makefile without running `make'.
1545 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1546 test -z "$DEPDIR" && continue
1547 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1548 test -z "am__include" && continue
1549 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1550 # When using ansi2knr, U may be empty or an underscore; expand it
1551 U=`sed -n 's/^U = //p' < "$mf"`
1552 # Find all dependency output files, they are included files with
1553 # $(DEPDIR) in their names. We invoke sed twice because it is the
1554 # simplest approach to changing $(DEPDIR) to its actual value in the
1555 # expansion.
1556 for file in `sed -n "
1557 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1558 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1559 # Make sure the directory exists.
1560 test -f "$dirpart/$file" && continue
1561 fdir=`AS_DIRNAME(["$file"])`
1562 AS_MKDIR_P([$dirpart/$fdir])
1563 # echo "creating $dirpart/$file"
1564 echo '# dummy' > "$dirpart/$file"
1565 done
1566 done
1567 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1568
1569
1570 # AM_OUTPUT_DEPENDENCY_COMMANDS
1571 # -----------------------------
1572 # This macro should only be invoked once -- use via AC_REQUIRE.
1573 #
1574 # This code is only required when automatic dependency tracking
1575 # is enabled. FIXME. This creates each `.P' file that we will
1576 # need in order to bootstrap the dependency handling code.
1577 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1578 [AC_CONFIG_COMMANDS([depfiles],
1579 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1580 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1581 ])
1582
1583 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1584 # Free Software Foundation, Inc.
1585 #
1586 # This file is free software; the Free Software Foundation
1587 # gives unlimited permission to copy and/or distribute it,
1588 # with or without modifications, as long as this notice is preserved.
1589
1590 # serial 8
1591
1592 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1593 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1594
1595 # Do all the work for Automake. -*- Autoconf -*-
1596
1597 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1598 # 2005, 2006, 2008 Free Software Foundation, Inc.
1599 #
1600 # This file is free software; the Free Software Foundation
1601 # gives unlimited permission to copy and/or distribute it,
1602 # with or without modifications, as long as this notice is preserved.
1603
1604 # serial 13
1605
1606 # This macro actually does too much. Some checks are only needed if
1607 # your package does certain things. But this isn't really a big deal.
1608
1609 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1610 # AM_INIT_AUTOMAKE([OPTIONS])
1611 # -----------------------------------------------
1612 # The call with PACKAGE and VERSION arguments is the old style
1613 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1614 # and VERSION should now be passed to AC_INIT and removed from
1615 # the call to AM_INIT_AUTOMAKE.
1616 # We support both call styles for the transition. After
1617 # the next Automake release, Autoconf can make the AC_INIT
1618 # arguments mandatory, and then we can depend on a new Autoconf
1619 # release and drop the old call support.
1620 AC_DEFUN([AM_INIT_AUTOMAKE],
1621 [AC_PREREQ([2.60])dnl
1622 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1623 dnl the ones we care about.
1624 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1625 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1626 AC_REQUIRE([AC_PROG_INSTALL])dnl
1627 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1628 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1629 # is not polluted with repeated "-I."
1630 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1631 # test to see if srcdir already configured
1632 if test -f $srcdir/config.status; then
1633 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1634 fi
1635 fi
1636
1637 # test whether we have cygpath
1638 if test -z "$CYGPATH_W"; then
1639 if (cygpath --version) >/dev/null 2>/dev/null; then
1640 CYGPATH_W='cygpath -w'
1641 else
1642 CYGPATH_W=echo
1643 fi
1644 fi
1645 AC_SUBST([CYGPATH_W])
1646
1647 # Define the identity of the package.
1648 dnl Distinguish between old-style and new-style calls.
1649 m4_ifval([$2],
1650 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1651 AC_SUBST([PACKAGE], [$1])dnl
1652 AC_SUBST([VERSION], [$2])],
1653 [_AM_SET_OPTIONS([$1])dnl
1654 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1655 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1656 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1657 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1658 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1659
1660 _AM_IF_OPTION([no-define],,
1661 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1662 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1663
1664 # Some tools Automake needs.
1665 AC_REQUIRE([AM_SANITY_CHECK])dnl
1666 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1667 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1668 AM_MISSING_PROG(AUTOCONF, autoconf)
1669 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1670 AM_MISSING_PROG(AUTOHEADER, autoheader)
1671 AM_MISSING_PROG(MAKEINFO, makeinfo)
1672 AM_PROG_INSTALL_SH
1673 AM_PROG_INSTALL_STRIP
1674 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1675 # We need awk for the "check" target. The system "awk" is bad on
1676 # some platforms.
1677 AC_REQUIRE([AC_PROG_AWK])dnl
1678 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1679 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1680 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1681 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1682 [_AM_PROG_TAR([v7])])])
1683 _AM_IF_OPTION([no-dependencies],,
1684 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1685 [_AM_DEPENDENCIES(CC)],
1686 [define([AC_PROG_CC],
1687 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1688 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1689 [_AM_DEPENDENCIES(CXX)],
1690 [define([AC_PROG_CXX],
1691 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1692 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1693 [_AM_DEPENDENCIES(OBJC)],
1694 [define([AC_PROG_OBJC],
1695 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1696 ])
1697 ])
1698
1699
1700 # When config.status generates a header, we must update the stamp-h file.
1701 # This file resides in the same directory as the config header
1702 # that is generated. The stamp files are numbered to have different names.
1703
1704 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1705 # loop where config.status creates the headers, so we can generate
1706 # our stamp files there.
1707 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1708 [# Compute $1's index in $config_headers.
1709 _am_arg=$1
1710 _am_stamp_count=1
1711 for _am_header in $config_headers :; do
1712 case $_am_header in
1713 $_am_arg | $_am_arg:* )
1714 break ;;
1715 * )
1716 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1717 esac
1718 done
1719 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1720