1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # Do all the work for Automake. This macro actually does too much --
14 # some checks are only needed if your package does certain things.
15 # But this isn't really a big deal.
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22 AC_DEFUN([AM_INIT_AUTOMAKE],
23 [AC_REQUIRE([AC_PROG_INSTALL])
28 dnl test to see if srcdir already configured
29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
35 AC_REQUIRE([AM_SANITY_CHECK])
36 AC_REQUIRE([AC_ARG_PROGRAM])
37 dnl FIXME This is truly gross.
38 missing_dir=`cd $ac_aux_dir && pwd`
39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44 AC_REQUIRE([AC_PROG_MAKE_SET])])
47 # Check to make sure that the build environment is sane.
50 AC_DEFUN([AM_SANITY_CHECK],
51 [AC_MSG_CHECKING([whether build environment is sane])
54 echo timestamp > conftestfile
55 # Do `set' in a subshell so we don't clobber the current shell's
56 # arguments. Must try -L first in case configure is actually a
57 # symlink; some systems play weird games with the mod time of symlinks
58 # (eg FreeBSD returns the mod time of the symlink's containing
61 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62 if test "[$]*" = "X"; then
64 set X `ls -t $srcdir/configure conftestfile`
66 if test "[$]*" != "X $srcdir/configure conftestfile" \
67 && test "[$]*" != "X conftestfile $srcdir/configure"; then
69 # If neither matched, then we have a broken ls. This can happen
70 # if, for instance, CONFIG_SHELL is bash and it inherits a
71 # broken ls alias from the environment. This has actually
72 # happened. Such a system could not be considered "sane".
73 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
74 alias in your environment])
77 test "[$]2" = conftestfile
83 AC_MSG_ERROR([newly created file is older than distributed files!
84 Check your system clock])
89 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90 dnl The program must properly implement --version.
91 AC_DEFUN([AM_MISSING_PROG],
92 [AC_MSG_CHECKING(for working $2)
93 # Run test in a subshell; some versions of sh will print an error if
94 # an executable is not found, even if stderr is redirected.
95 # Redirect stdin to placate older versions of autoconf. Sigh.
96 if ($2 --version) < /dev/null > /dev/null 2>&1; then
101 AC_MSG_RESULT(missing)
105 # Like AC_CONFIG_HEADER, but automatically create stamp file.
107 AC_DEFUN([AM_CONFIG_HEADER],
109 AC_CONFIG_HEADER([$1])
110 dnl When config.status generates a header, we must update the stamp-h file.
111 dnl This file resides in the same directory as the config header
112 dnl that is generated. We must strip everything past the first ":",
113 dnl and everything past the last "/".
114 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
118 for am_file in <<$1>>; do
119 case " <<$>>CONFIG_HEADERS " in
120 *" <<$>>am_file "*<<)>>
121 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124 am_indx=`expr "<<$>>am_indx" + 1`
130 # This macro adds the name macrodir to the set of directories
131 # that `aclocal' searches for macros.
135 dnl AM_ACLOCAL_INCLUDE(macrodir)
136 AC_DEFUN([AM_ACLOCAL_INCLUDE],
138 AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
140 test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
142 for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
145 # Define a conditional.
147 AC_DEFUN([AM_CONDITIONAL],
159 dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
161 dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
165 AC_DEFUN([GNOME_INIT_HOOK],[
167 AC_SUBST(GNOMEUI_LIBS)
168 AC_SUBST(GNOMEGNORBA_LIBS)
169 AC_SUBST(GTKXMHTML_LIBS)
171 AC_SUBST(GNOME_LIBDIR)
172 AC_SUBST(GNOME_INCLUDEDIR)
174 AC_ARG_WITH(gnome-includes,
175 [ --with-gnome-includes Specify location of GNOME headers],[
176 CFLAGS="$CFLAGS -I$withval"
179 AC_ARG_WITH(gnome-libs,
180 [ --with-gnome-libs Specify location of GNOME libs],[
181 LDFLAGS="$LDFLAGS -L$withval"
182 gnome_prefix=$withval
186 [ --with-gnome Specify prefix for GNOME files],
187 if test x$withval = xyes; then
189 dnl Note that an empty true branch is not
191 ifelse([$1], [], :, [$1])
193 if test "x$withval" = xno; then
197 LDFLAGS="$LDFLAGS -L$withval/lib"
198 CFLAGS="$CFLAGS -I$withval/include"
199 gnome_prefix=$withval/lib
204 if test "x$want_gnome" = xyes; then
206 AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
207 if test "$GNOME_CONFIG" = "no"; then
208 no_gnome_config="yes"
210 AC_MSG_CHECKING(if $GNOME_CONFIG works)
211 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
213 GNOME_GNORBA_HOOK([],$2)
214 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
215 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
216 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
217 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
218 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
219 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
220 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
224 no_gnome_config="yes"
228 if test x$exec_prefix = xNONE; then
229 if test x$prefix = xNONE; then
230 gnome_prefix=$ac_default_prefix/lib
232 gnome_prefix=$prefix/lib
235 gnome_prefix=`eval echo \`echo $libdir\``
238 if test "$no_gnome_config" = "yes"; then
239 AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
240 if test -f $gnome_prefix/gnomeConf.sh; then
242 echo "loading gnome configuration from" \
243 "$gnome_prefix/gnomeConf.sh"
244 . $gnome_prefix/gnomeConf.sh
247 AC_MSG_RESULT(not found)
248 if test x$2 = xfail; then
249 AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
255 if test -n "$3"; then
258 AC_MSG_CHECKING(extra library \"$i\")
261 AC_SUBST(GNOME_APPLETS_LIBS)
262 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
263 AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
265 AC_SUBST(GNOME_CAPPLET_LIBS)
266 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
267 AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
269 AC_MSG_RESULT(unknown library)
276 dnl GNOME_INIT ([additional-inits])
279 AC_DEFUN([GNOME_INIT],[
280 GNOME_INIT_HOOK([],fail,$1)
284 dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
286 dnl if failflag is "failure" it aborts if gnorba is not found.
289 AC_DEFUN([GNOME_GNORBA_HOOK],[
290 GNOME_ORBIT_HOOK([],$2)
291 AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
292 gnome_cv_gnorba_found=no
293 if test x$gnome_cv_orbit_found = xyes; then
294 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
295 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
296 if test -n "$GNORBA_LIBS"; then
297 gnome_cv_gnorba_found=yes
301 AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
302 if test x$gnome_cv_orbit_found = xyes; then
304 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
305 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
306 AC_SUBST(GNORBA_CFLAGS)
307 AC_SUBST(GNORBA_LIBS)
309 if test x$2 = xfailure; then
310 AC_MSG_ERROR(gnorba library not installed or installation problem)
315 AC_DEFUN([GNOME_GNORBA_CHECK], [
316 GNOME_GNORBA_HOOK([],failure)
320 dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
322 dnl if failflag is "failure" it aborts if orbit is not found.
325 AC_DEFUN([GNOME_ORBIT_HOOK],[
326 AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
327 AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
328 AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
329 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
330 gnome_cv_orbit_found=no
332 gnome_cv_orbit_found=yes
335 AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
336 if test x$gnome_cv_orbit_found = xyes; then
338 ORBIT_CFLAGS=`orbit-config --cflags client server`
339 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
340 AC_SUBST(ORBIT_CFLAGS)
343 if test x$2 = xfailure; then
344 AC_MSG_ERROR(ORBit not installed or installation problem)
349 AC_DEFUN([GNOME_ORBIT_CHECK], [
350 GNOME_ORBIT_HOOK([],failure)
353 # isc-posix.m4 serial 1 (gettext-0.10.40)
354 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
355 dnl This file is free software, distributed under the terms of the GNU
356 dnl General Public License. As a special exception to the GNU General
357 dnl Public License, this file may be distributed as part of a program
358 dnl that contains a configuration script generated by Autoconf, under
359 dnl the same distribution terms as the rest of that program.
361 # This test replaces the one in autoconf.
362 # Currently this macro should have the same name as the autoconf macro
363 # because gettext's gettext.m4 (distributed in the automake package)
364 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
365 # give these diagnostics:
366 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
367 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
369 undefine([AC_ISC_POSIX])
371 AC_DEFUN([AC_ISC_POSIX],
373 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
374 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
381 # @defmac AC_PROG_CC_STDC
382 # @maindex PROG_CC_STDC
384 # If the C compiler in not in ANSI C mode by default, try to add an option
385 # to output variable @code{CC} to make it so. This macro tries various
386 # options that select ANSI C on some system or another. It considers the
387 # compiler to be in ANSI C mode if it handles function prototypes correctly.
389 # If you use this macro, you should check after calling it whether the C
390 # compiler has been set to accept ANSI C; if not, the shell variable
391 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
392 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
393 # program @code{ansi2knr}, which comes with Ghostscript.
396 AC_DEFUN([AM_PROG_CC_STDC],
397 [AC_REQUIRE([AC_PROG_CC])
398 AC_BEFORE([$0], [AC_C_INLINE])
399 AC_BEFORE([$0], [AC_C_CONST])
400 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
401 dnl a magic option to avoid problems with ANSI preprocessor commands
403 dnl FIXME: can't do this because then AC_AIX won't work due to a
404 dnl circular dependency.
405 dnl AC_BEFORE([$0], [AC_PROG_CPP])
406 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
407 AC_CACHE_VAL(am_cv_prog_cc_stdc,
408 [am_cv_prog_cc_stdc=no
410 # Don't try gcc -ansi; that turns off useful extensions and
411 # breaks some systems' header files.
413 # Ultrix and OSF/1 -std1
414 # HP-UX -Aa -D_HPUX_SOURCE
415 # SVR4 -Xc -D__EXTENSIONS__
416 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
418 CC="$ac_save_CC $ac_arg"
422 #include <sys/types.h>
423 #include <sys/stat.h>
424 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
425 struct buf { int x; };
426 FILE * (*rcsopen) (struct buf *, struct stat *, int);
427 static char *e (p, i)
433 static char *f (char * (*g) (char **, int), char **p, ...)
438 s = g (p, va_arg (v,int));
442 int test (int i, double x);
443 struct s1 {int (*f) (int a);};
444 struct s2 {int (*f) (double a);};
445 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
449 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
451 [am_cv_prog_cc_stdc="$ac_arg"; break])
455 if test -z "$am_cv_prog_cc_stdc"; then
456 AC_MSG_RESULT([none needed])
458 AC_MSG_RESULT($am_cv_prog_cc_stdc)
460 case "x$am_cv_prog_cc_stdc" in
462 *) CC="$CC $am_cv_prog_cc_stdc" ;;
466 dnl GNOME_COMPILE_WARNINGS
467 dnl Turn on many useful compiler warnings
468 dnl For now, only works on GCC
469 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
470 AC_ARG_ENABLE(compile-warnings,
471 [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum)
473 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
475 if test "x$GCC" != xyes; then
476 enable_compile_warnings=no
479 if test "x$enable_compile_warnings" != "xno"; then
480 if test "x$GCC" = "xyes"; then
482 *[\ \ ]-Wall[\ \ ]*) ;;
483 *) warnCFLAGS="-Wall -Wunused" ;;
486 ## -W is not all that useful. And it cannot be controlled
487 ## with individual -Wno-xxx flags, unlike -Wall
488 if test "x$enable_compile_warnings" = "xyes"; then
489 warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith"
493 AC_MSG_RESULT($warnCFLAGS)
496 [ --enable-iso-c Try to warn if code is not ISO C ],,
499 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
501 if test "x$enable_iso_c" != "xno"; then
502 if test "x$GCC" = "xyes"; then
504 *[\ \ ]-ansi[\ \ ]*) ;;
505 *) complCFLAGS="$complCFLAGS -ansi" ;;
509 *[\ \ ]-pedantic[\ \ ]*) ;;
510 *) complCFLAGS="$complCFLAGS -pedantic" ;;
514 AC_MSG_RESULT($complCFLAGS)
515 if test "x$cflags_set" != "xyes"; then
516 CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
522 dnl For C++, do basically the same thing.
524 AC_DEFUN([GNOME_CXX_WARNINGS],[
525 AC_ARG_ENABLE(cxx-warnings,
526 [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
528 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
530 if test "x$GCC" != xyes; then
531 enable_compile_warnings=no
533 if test "x$enable_cxx_warnings" != "xno"; then
534 if test "x$GCC" = "xyes"; then
535 case " $CXXFLAGS " in
536 *[\ \ ]-Wall[\ \ ]*) ;;
537 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
540 ## -W is not all that useful. And it cannot be controlled
541 ## with individual -Wno-xxx flags, unlike -Wall
542 if test "x$enable_cxx_warnings" = "xyes"; then
543 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wshadow -Woverloaded-virtual"
547 AC_MSG_RESULT($warnCXXFLAGS)
549 AC_ARG_ENABLE(iso-cxx,
550 [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
553 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
555 if test "x$enable_iso_cxx" != "xno"; then
556 if test "x$GCC" = "xyes"; then
557 case " $CXXFLAGS " in
558 *[\ \ ]-ansi[\ \ ]*) ;;
559 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
562 case " $CXXFLAGS " in
563 *[\ \ ]-pedantic[\ \ ]*) ;;
564 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
568 AC_MSG_RESULT($complCXXFLAGS)
569 if test "x$cxxflags_set" != "xyes"; then
570 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
572 AC_SUBST(cxxflags_set)
578 dnl Basic X11 related checks for X11. At the end, the following will be
580 dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK
581 dnl CPPFLAGS Will include $X_CFLAGS
582 dnl GNOME_HAVE_SM `true' or `false' depending on whether session
583 dnl management is available. It is available if
584 dnl both -lSM and X11/SM/SMlib.h exist. (Some
585 dnl Solaris boxes have the library but not the header)
586 dnl XPM_LIBS -lXpm if Xpm library is present, otherwise ""
588 dnl The following configure cache variables are defined (but not used):
589 dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
591 AC_DEFUN([GNOME_X_CHECKS],
593 AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
594 dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could
595 dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
597 dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
598 dnl CPPFLAGS, not CFLAGS
599 CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
601 saved_ldflags="$LDFLAGS"
602 LDFLAGS="$LDFLAGS $GTK_LIBS"
604 gnome_cv_passdown_x_libs="$GTK_LIBS"
605 gnome_cv_passdown_X_LIBS="$GTK_LIBS"
606 gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
607 gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
609 LDFLAGS="$saved_ldflags $GTK_LIBS"
611 dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
614 dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
615 dnl AC_EGREP_CPP(answer_affirmatively,
616 dnl [#include <gtk/gtkfeatures.h>
617 dnl #ifdef GTK_HAVE_FEATURES_1_1_0
618 dnl answer_affirmatively
620 dnl ], dev_gtk=yes, dev_gtk=no)
621 dnl if test "$dev_gtk" = "yes"; then
624 dnl AC_MSG_RESULT("$dev_gtk")
629 dnl Already found it.
632 dnl Assume that if we have -lSM then we also have -lICE.
633 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
634 [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
639 if test "$GNOME_HAVE_SM" = true; then
640 AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
643 if test "$GNOME_HAVE_SM" = true; then
644 AC_DEFINE(HAVE_LIBSM)
648 AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
651 AC_REQUIRE([GNOME_PTHREAD_CHECK])
652 LDFLAGS="$saved_ldflags"
654 AC_PROVIDE([GNOME_X_CHECKS])
657 # Configure paths for GTK+
658 # Owen Taylor 97-11-3
660 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
661 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
663 AC_DEFUN(AM_PATH_GTK,
665 dnl Get the cflags and libraries from the gtk-config script
667 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
668 gtk_config_prefix="$withval", gtk_config_prefix="")
669 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
670 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
671 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
672 , enable_gtktest=yes)
678 gtk_config_args="$gtk_config_args gthread"
683 if test x$gtk_config_exec_prefix != x ; then
684 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
685 if test x${GTK_CONFIG+set} != xset ; then
686 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
689 if test x$gtk_config_prefix != x ; then
690 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
691 if test x${GTK_CONFIG+set} != xset ; then
692 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
696 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
697 min_gtk_version=ifelse([$1], ,0.99.7,$1)
698 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
700 if test "$GTK_CONFIG" = "no" ; then
703 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
704 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
705 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
706 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
707 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
708 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
709 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
710 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
711 if test "x$enable_gtktest" = "xyes" ; then
712 ac_save_CFLAGS="$CFLAGS"
714 CFLAGS="$CFLAGS $GTK_CFLAGS"
715 LIBS="$GTK_LIBS $LIBS"
717 dnl Now check if the installed GTK is sufficiently new. (Also sanity
718 dnl checks the results of gtk-config to some extent
729 int major, minor, micro;
732 system ("touch conf.gtktest");
734 /* HP/UX 9 (%@#!) writes to sscanf strings */
735 tmp_version = g_strdup("$min_gtk_version");
736 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
737 printf("%s, bad version string\n", "$min_gtk_version");
741 if ((gtk_major_version != $gtk_config_major_version) ||
742 (gtk_minor_version != $gtk_config_minor_version) ||
743 (gtk_micro_version != $gtk_config_micro_version))
745 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
746 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
747 gtk_major_version, gtk_minor_version, gtk_micro_version);
748 printf ("*** was found! If gtk-config was correct, then it is best\n");
749 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
750 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
751 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
752 printf("*** required on your system.\n");
753 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
754 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
755 printf("*** before re-running configure\n");
757 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
758 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
759 (gtk_minor_version != GTK_MINOR_VERSION) ||
760 (gtk_micro_version != GTK_MICRO_VERSION))
762 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
763 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
764 printf("*** library (version %d.%d.%d)\n",
765 gtk_major_version, gtk_minor_version, gtk_micro_version);
767 #endif /* defined (GTK_MAJOR_VERSION) ... */
770 if ((gtk_major_version > major) ||
771 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
772 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
778 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
779 gtk_major_version, gtk_minor_version, gtk_micro_version);
780 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
781 major, minor, micro);
782 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
784 printf("*** If you have already installed a sufficiently new version, this error\n");
785 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
786 printf("*** being found. The easiest way to fix this is to remove the old version\n");
787 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
788 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
789 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
790 printf("*** so that the correct libraries are found at run-time))\n");
795 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
796 CFLAGS="$ac_save_CFLAGS"
800 if test "x$no_gtk" = x ; then
802 ifelse([$2], , :, [$2])
805 if test "$GTK_CONFIG" = "no" ; then
806 echo "*** The gtk-config script installed by GTK could not be found"
807 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
808 echo "*** your path, or set the GTK_CONFIG environment variable to the"
809 echo "*** full path to gtk-config."
811 if test -f conf.gtktest ; then
814 echo "*** Could not run GTK test program, checking why..."
815 CFLAGS="$CFLAGS $GTK_CFLAGS"
816 LIBS="$LIBS $GTK_LIBS"
820 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
821 [ echo "*** The test program compiled, but did not run. This usually means"
822 echo "*** that the run-time linker is not finding GTK or finding the wrong"
823 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
824 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
825 echo "*** to the installed location Also, make sure you have run ldconfig if that"
826 echo "*** is required on your system"
828 echo "*** If you have an old version installed, it is best to remove it, although"
829 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
831 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
832 echo "*** came with the system with the command"
834 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
835 [ echo "*** The test program failed to compile or link. See the file config.log for the"
836 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
837 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
838 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
839 CFLAGS="$ac_save_CFLAGS"
845 ifelse([$3], , :, [$3])
853 dnl And better, use gthreads instead...
856 AC_DEFUN([GNOME_PTHREAD_CHECK],[
858 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
859 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
860 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
861 [AC_CHECK_FUNC(pthread_create)]
865 AC_SUBST(PTHREAD_LIB)
866 AC_PROVIDE([GNOME_PTHREAD_CHECK])
869 # gettext.m4 serial 13 (gettext-0.11.1)
870 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
871 dnl This file is free software, distributed under the terms of the GNU
872 dnl General Public License. As a special exception to the GNU General
873 dnl Public License, this file may be distributed as part of a program
874 dnl that contains a configuration script generated by Autoconf, under
875 dnl the same distribution terms as the rest of that program.
877 dnl This file can can be used in projects which are not available under
878 dnl the GNU General Public License or the GNU Library General Public
879 dnl License but which still want to provide support for the GNU gettext
881 dnl Please note that the actual code of the GNU gettext library is covered
882 dnl by the GNU Library General Public License, and the rest of the GNU
883 dnl gettext package package is covered by the GNU General Public License.
884 dnl They are *not* in the public domain.
887 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
888 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
890 dnl Macro to add for using GNU gettext.
892 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
893 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
894 dnl default (if it is not specified or empty) is 'no-libtool'.
895 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
896 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
897 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
898 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
899 dnl depending on --{enable,disable}-{shared,static} and on the presence of
900 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
901 dnl $(top_builddir)/intl/libintl.a will be created.
902 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
903 dnl implementations (in libc or libintl) without the ngettext() function
905 dnl INTLDIR is used to find the intl libraries. If empty,
906 dnl the value `$(top_builddir)/intl/' is used.
908 dnl The result of the configuration is one of three cases:
909 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
911 dnl Catalog format: GNU --> install in $(datadir)
912 dnl Catalog extension: .mo after installation, .gmo in source tree
913 dnl 2) GNU gettext has been found in the system's C library.
914 dnl Catalog format: GNU --> install in $(datadir)
915 dnl Catalog extension: .mo after installation, .gmo in source tree
916 dnl 3) No internationalization, always use English msgid.
917 dnl Catalog format: none
918 dnl Catalog extension: none
919 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
920 dnl The use of .gmo is historical (it was needed to avoid overwriting the
921 dnl GNU format catalogs when building on a platform with an X/Open gettext),
922 dnl but we keep it in order not to force irrelevant filename changes on the
925 AC_DEFUN([AM_GNU_GETTEXT],
927 dnl Argument checking.
928 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
929 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
931 ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
932 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
934 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
935 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
937 AC_REQUIRE([AM_PO_SUBDIRS])dnl
938 ifelse(gt_included_intl, yes, [
939 AC_REQUIRE([AM_INTL_SUBDIR])dnl
942 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
943 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
944 AC_REQUIRE([AC_LIB_RPATH])
946 AC_MSG_CHECKING([whether NLS is requested])
947 dnl Default is enabled NLS
949 [ --disable-nls do not use Native Language Support],
950 USE_NLS=$enableval, USE_NLS=yes)
951 AC_MSG_RESULT($USE_NLS)
954 ifelse(gt_included_intl, yes, [
955 BUILD_INCLUDED_LIBINTL=no
956 USE_INCLUDED_LIBINTL=no
962 dnl If we use NLS figure out what method
963 if test "$USE_NLS" = "yes"; then
964 gt_use_preinstalled_gnugettext=no
965 ifelse(gt_included_intl, yes, [
966 AC_MSG_CHECKING([whether included gettext is requested])
967 AC_ARG_WITH(included-gettext,
968 [ --with-included-gettext use the GNU gettext library included here],
969 nls_cv_force_use_gnu_gettext=$withval,
970 nls_cv_force_use_gnu_gettext=no)
971 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
973 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
974 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
976 dnl User does not insist on using GNU NLS library. Figure out what
977 dnl to use. If GNU gettext is available we use this. Else we have
978 dnl to fall back to GNU NLS library.
980 dnl Add a version number to the cache macros.
981 define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
982 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
983 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
985 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
986 [AC_TRY_LINK([#include <libintl.h>
987 extern int _nl_msg_cat_cntr;
988 extern int *_nl_domain_bindings;],
989 [bindtextdomain ("", "");
990 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
991 gt_cv_func_gnugettext_libc=yes,
992 gt_cv_func_gnugettext_libc=no)])
994 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
995 dnl Sometimes libintl requires libiconv, so first search for libiconv.
996 ifelse(gt_included_intl, yes, , [
999 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1000 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1001 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1002 dnl even if libiconv doesn't exist.
1003 AC_LIB_LINKFLAGS_BODY([intl])
1004 AC_CACHE_CHECK([for GNU gettext in libintl],
1005 gt_cv_func_gnugettext_libintl,
1006 [gt_save_CPPFLAGS="$CPPFLAGS"
1007 CPPFLAGS="$CPPFLAGS $INCINTL"
1008 gt_save_LIBS="$LIBS"
1009 LIBS="$LIBS $LIBINTL"
1010 dnl Now see whether libintl exists and does not depend on libiconv.
1011 AC_TRY_LINK([#include <libintl.h>
1012 extern int _nl_msg_cat_cntr;
1013 extern int *_nl_domain_bindings;
1018 const char *_nl_expand_alias ();],
1019 [bindtextdomain ("", "");
1020 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
1021 gt_cv_func_gnugettext_libintl=yes,
1022 gt_cv_func_gnugettext_libintl=no)
1023 dnl Now see whether libintl exists and depends on libiconv.
1024 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1025 LIBS="$LIBS $LIBICONV"
1026 AC_TRY_LINK([#include <libintl.h>
1027 extern int _nl_msg_cat_cntr;
1028 extern int *_nl_domain_bindings;
1033 const char *_nl_expand_alias ();],
1034 [bindtextdomain ("", "");
1035 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
1036 [LIBINTL="$LIBINTL $LIBICONV"
1037 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1038 gt_cv_func_gnugettext_libintl=yes
1041 CPPFLAGS="$gt_save_CPPFLAGS"
1042 LIBS="$gt_save_LIBS"])
1045 dnl If an already present or preinstalled GNU gettext() is found,
1046 dnl use it. But if this macro is used in GNU gettext, and GNU
1047 dnl gettext is already preinstalled in libintl, we update this
1048 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1049 if test "$gt_cv_func_gnugettext_libc" = "yes" \
1050 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1051 && test "$PACKAGE" != gettext; }; then
1052 gt_use_preinstalled_gnugettext=yes
1054 dnl Reset the values set by searching for libintl.
1060 ifelse(gt_included_intl, yes, [
1061 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1062 dnl GNU gettext is not found in the C library.
1063 dnl Fall back on included GNU gettext library.
1064 nls_cv_use_gnu_gettext=yes
1068 if test "$nls_cv_use_gnu_gettext" = "yes"; then
1069 dnl Mark actions used to generate GNU NLS library.
1070 INTLOBJS="\$(GETTOBJS)"
1071 BUILD_INCLUDED_LIBINTL=yes
1072 USE_INCLUDED_LIBINTL=yes
1073 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1074 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1075 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1078 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1079 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1080 dnl Mark actions to use GNU gettext tools.
1085 if test "$gt_use_preinstalled_gnugettext" = "yes" \
1086 || test "$nls_cv_use_gnu_gettext" = "yes"; then
1087 AC_DEFINE(ENABLE_NLS, 1,
1088 [Define to 1 if translation of program messages to the user's native language
1095 if test "$USE_NLS" = "yes"; then
1097 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1098 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1099 AC_MSG_CHECKING([how to link with libintl])
1100 AC_MSG_RESULT([$LIBINTL])
1101 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1104 dnl For backward compatibility. Some packages may be using this.
1105 AC_DEFINE(HAVE_GETTEXT, 1,
1106 [Define if the GNU gettext() function is already present or preinstalled.])
1107 AC_DEFINE(HAVE_DCGETTEXT, 1,
1108 [Define if the GNU dcgettext() function is already present or preinstalled.])
1111 dnl We need to process the po/ directory.
1115 ifelse(gt_included_intl, yes, [
1116 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1117 dnl to 'yes' because some of the testsuite requires it.
1118 if test "$PACKAGE" = gettext; then
1119 BUILD_INCLUDED_LIBINTL=yes
1122 dnl Make all variables we use known to autoconf.
1123 AC_SUBST(BUILD_INCLUDED_LIBINTL)
1124 AC_SUBST(USE_INCLUDED_LIBINTL)
1128 dnl For backward compatibility. Some configure.ins may be using this.
1130 nls_cv_header_libgt=
1132 dnl For backward compatibility. Some Makefiles may be using this.
1134 AC_SUBST(DATADIRNAME)
1136 dnl For backward compatibility. Some Makefiles may be using this.
1138 AC_SUBST(INSTOBJEXT)
1140 dnl For backward compatibility. Some Makefiles may be using this.
1144 dnl Enable libtool support if the surrounding package wishes it.
1145 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1146 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1149 dnl For backward compatibility. Some Makefiles may be using this.
1153 dnl Make all documented variables known to autoconf.
1160 dnl Checks for all prerequisites of the po subdirectory,
1161 dnl except for USE_NLS.
1162 AC_DEFUN([AM_PO_SUBDIRS],
1164 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1165 AC_REQUIRE([AC_PROG_INSTALL])dnl
1166 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1168 dnl Perform the following tests also if --disable-nls has been given,
1169 dnl because they are needed for "make dist" to work.
1171 dnl Search for GNU msgfmt in the PATH.
1172 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1173 dnl The second test excludes FreeBSD msgfmt.
1174 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1175 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1176 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1178 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1180 dnl Search for GNU xgettext 0.11 or newer in the PATH.
1181 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1182 dnl The second test excludes FreeBSD xgettext.
1183 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1184 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1185 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1187 dnl Remove leftover from FreeBSD xgettext call.
1190 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1191 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1192 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1194 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1195 dnl Test whether we really found GNU msgfmt.
1196 if test "$GMSGFMT" != ":"; then
1197 dnl If it is no GNU msgfmt we define it as : so that the
1198 dnl Makefiles still can work.
1199 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1200 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1203 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1205 [found $GMSGFMT program is not GNU msgfmt; ignore it])
1210 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1211 dnl Test whether we really found GNU xgettext.
1212 if test "$XGETTEXT" != ":"; then
1213 dnl If it is no GNU xgettext we define it as : so that the
1214 dnl Makefiles still can work.
1215 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1216 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1220 [found xgettext program is not GNU xgettext; ignore it])
1223 dnl Remove leftover from FreeBSD xgettext call.
1227 AC_OUTPUT_COMMANDS([
1228 for ac_file in $CONFIG_FILES; do
1229 # Support "outfile[:infile[:infile...]]"
1231 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1233 # PO directories have a Makefile.in generated from Makefile.in.in.
1234 case "$ac_file" in */Makefile.in)
1235 # Adjust a relative srcdir.
1236 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1237 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1238 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1239 # In autoconf-2.13 it is called $ac_given_srcdir.
1240 # In autoconf-2.50 it is called $srcdir.
1241 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1242 case "$ac_given_srcdir" in
1243 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1244 /*) top_srcdir="$ac_given_srcdir" ;;
1245 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1247 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1248 rm -f "$ac_dir/POTFILES"
1249 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1250 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1251 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1252 # on $ac_dir but don't depend on user-specified configuration
1254 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1255 # The LINGUAS file contains the set of available languages.
1256 if test -n "$ALL_LINGUAS"; then
1257 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1259 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1260 # Hide the ALL_LINGUAS assigment from automake.
1261 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1263 case "$ac_given_srcdir" in
1265 *) srcdirpre='$(srcdir)/' ;;
1271 for lang in $ALL_LINGUAS; do
1272 POFILES="$POFILES $srcdirpre$lang.po"
1273 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1274 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1275 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1277 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1278 # environment variable.
1280 if test -n "$ALL_LINGUAS"; then
1281 for presentlang in $ALL_LINGUAS; do
1283 if test "%UNSET%" != "$LINGUAS"; then
1284 desiredlanguages="$LINGUAS"
1286 desiredlanguages="$ALL_LINGUAS"
1288 for desiredlang in $desiredlanguages; do
1289 # Use the presentlang catalog if desiredlang is
1290 # a. equal to presentlang, or
1291 # b. a variant of presentlang (because in this case,
1292 # presentlang can be used as a fallback for messages
1293 # which are not translated in the desiredlang catalog).
1294 case "$desiredlang" in
1295 "$presentlang"*) useit=yes;;
1298 if test $useit = yes; then
1299 INST_LINGUAS="$INST_LINGUAS $presentlang"
1304 if test -n "$INST_LINGUAS"; then
1305 for lang in $INST_LINGUAS; do
1306 CATALOGS="$CATALOGS $lang.gmo"
1309 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1310 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1311 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1312 if test -f "$f"; then
1314 *.orig | *.bak | *~) ;;
1315 *) cat "$f" >> "$ac_dir/Makefile" ;;
1323 [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
1324 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1326 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1327 # Capture the value of LINGUAS because we need it to compute CATALOGS.
1328 LINGUAS="${LINGUAS-%UNSET%}"
1333 dnl Checks for all prerequisites of the intl subdirectory,
1334 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1335 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1336 AC_DEFUN([AM_INTL_SUBDIR],
1338 AC_REQUIRE([AC_PROG_INSTALL])dnl
1339 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1340 AC_REQUIRE([AC_PROG_CC])dnl
1341 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1342 AC_REQUIRE([AC_PROG_RANLIB])dnl
1343 AC_REQUIRE([AC_ISC_POSIX])dnl
1344 AC_REQUIRE([AC_HEADER_STDC])dnl
1345 AC_REQUIRE([AC_C_CONST])dnl
1346 AC_REQUIRE([AC_C_INLINE])dnl
1347 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1348 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1349 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1350 AC_REQUIRE([AC_FUNC_MMAP])dnl
1351 AC_REQUIRE([jm_GLIBC21])dnl
1353 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1354 stdlib.h string.h unistd.h sys/param.h])
1355 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1356 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1357 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1363 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1364 dnl because plural.y uses bison specific features. It requires at least
1365 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1367 dnl bison is only needed for the maintainer (who touches plural.y). But in
1368 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1369 dnl the rule in general Makefile. Now, some people carelessly touch the
1370 dnl files or have a broken "make" program, hence the plural.c rule will
1371 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1372 dnl present or too old.
1373 AC_CHECK_PROGS([INTLBISON], [bison])
1374 if test -z "$INTLBISON"; then
1377 dnl Found it, now check the version.
1378 AC_MSG_CHECKING([version of bison])
1379 changequote(<<,>>)dnl
1380 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1381 case $ac_prog_version in
1382 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1383 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1385 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1386 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1388 AC_MSG_RESULT([$ac_prog_version])
1390 if test $ac_verc_fail = yes; then
1396 AC_DEFUN([AM_MKINSTALLDIRS],
1398 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1399 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1400 dnl Try to locate is.
1402 if test -n "$ac_aux_dir"; then
1403 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1405 if test -z "$MKINSTALLDIRS"; then
1406 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1408 AC_SUBST(MKINSTALLDIRS)
1411 # lib-link.m4 serial 1 (gettext-0.11)
1412 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1413 dnl This file is free software, distributed under the terms of the GNU
1414 dnl General Public License. As a special exception to the GNU General
1415 dnl Public License, this file may be distributed as part of a program
1416 dnl that contains a configuration script generated by Autoconf, under
1417 dnl the same distribution terms as the rest of that program.
1419 dnl From Bruno Haible.
1421 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1422 dnl the libraries corresponding to explicit and implicit dependencies.
1423 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1424 dnl augments the CPPFLAGS variable.
1425 AC_DEFUN([AC_LIB_LINKFLAGS],
1427 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1428 AC_REQUIRE([AC_LIB_RPATH])
1429 define([Name],[translit([$1],[./-], [___])])
1430 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1431 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1432 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1433 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1434 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1435 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1436 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1438 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1439 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1440 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1441 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1443 AC_SUBST([LTLIB]NAME)
1444 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1445 dnl results of this search when this library appears as a dependency.
1451 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1452 dnl searches for libname and the libraries corresponding to explicit and
1453 dnl implicit dependencies, together with the specified include files and
1454 dnl the ability to compile and link the specified testcode. If found, it
1455 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1456 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1457 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1458 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1459 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1461 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1462 AC_REQUIRE([AC_LIB_RPATH])
1463 define([Name],[translit([$1],[./-], [___])])
1464 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1465 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1467 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1469 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1471 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1472 dnl because if the user has installed lib[]Name and not disabled its use
1473 dnl via --without-lib[]Name-prefix, he wants to use it.
1474 ac_save_CPPFLAGS="$CPPFLAGS"
1475 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1477 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1478 ac_save_LIBS="$LIBS"
1479 LIBS="$LIBS $LIB[]NAME"
1480 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1481 LIBS="$ac_save_LIBS"
1483 if test "$ac_cv_lib[]Name" = yes; then
1485 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1486 AC_MSG_CHECKING([how to link with lib[]$1])
1487 AC_MSG_RESULT([$LIB[]NAME])
1490 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1491 dnl $INC[]NAME either.
1492 CPPFLAGS="$ac_save_CPPFLAGS"
1496 AC_SUBST([HAVE_LIB]NAME)
1498 AC_SUBST([LTLIB]NAME)
1503 dnl Determine the platform dependent parameters needed to use rpath:
1504 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1505 dnl hardcode_direct, hardcode_minus_L,
1506 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1507 AC_DEFUN([AC_LIB_RPATH],
1509 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1510 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1511 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1512 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1513 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1514 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1515 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1521 libext="$acl_cv_libext"
1522 shlibext="$acl_cv_shlibext"
1523 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1524 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1525 hardcode_direct="$acl_cv_hardcode_direct"
1526 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1527 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1528 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1531 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1532 dnl the libraries corresponding to explicit and implicit dependencies.
1533 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1534 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1536 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1537 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1538 dnl By default, look in $includedir and $libdir.
1540 AC_LIB_WITH_FINAL_PREFIX([
1541 eval additional_includedir=\"$includedir\"
1542 eval additional_libdir=\"$libdir\"
1544 AC_ARG_WITH([lib$1-prefix],
1545 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1546 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1548 if test "X$withval" = "Xno"; then
1551 if test "X$withval" = "X"; then
1552 AC_LIB_WITH_FINAL_PREFIX([
1553 eval additional_includedir=\"$includedir\"
1554 eval additional_libdir=\"$libdir\"
1557 additional_includedir="$withval/include"
1558 additional_libdir="$withval/lib"
1562 dnl Search the library and its dependencies in $additional_libdir and
1563 dnl $LDFLAGS. Using breadth-first-seach.
1569 names_already_handled=
1570 names_next_round='$1 $2'
1571 while test -n "$names_next_round"; do
1572 names_this_round="$names_next_round"
1574 for name in $names_this_round; do
1576 for n in $names_already_handled; do
1577 if test "$n" = "$name"; then
1582 if test -z "$already_handled"; then
1583 names_already_handled="$names_already_handled $name"
1584 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1585 dnl or AC_LIB_HAVE_LINKFLAGS call.
1586 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1587 eval value=\"\$HAVE_LIB$uppername\"
1588 if test -n "$value"; then
1589 if test "$value" = yes; then
1590 eval value=\"\$LIB$uppername\"
1591 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1592 eval value=\"\$LTLIB$uppername\"
1593 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1595 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1596 dnl that this library doesn't exist. So just drop it.
1600 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1601 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1606 if test $use_additional = yes; then
1607 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1608 found_dir="$additional_libdir"
1609 found_so="$additional_libdir/lib$name.$shlibext"
1610 if test -f "$additional_libdir/lib$name.la"; then
1611 found_la="$additional_libdir/lib$name.la"
1614 if test -f "$additional_libdir/lib$name.$libext"; then
1615 found_dir="$additional_libdir"
1616 found_a="$additional_libdir/lib$name.$libext"
1617 if test -f "$additional_libdir/lib$name.la"; then
1618 found_la="$additional_libdir/lib$name.la"
1623 if test "X$found_dir" = "X"; then
1624 for x in $LDFLAGS $LTLIB[]NAME; do
1625 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1628 dir=`echo "X$x" | sed -e 's/^X-L//'`
1629 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1631 found_so="$dir/lib$name.$shlibext"
1632 if test -f "$dir/lib$name.la"; then
1633 found_la="$dir/lib$name.la"
1636 if test -f "$dir/lib$name.$libext"; then
1638 found_a="$dir/lib$name.$libext"
1639 if test -f "$dir/lib$name.la"; then
1640 found_la="$dir/lib$name.la"
1646 if test "X$found_dir" != "X"; then
1651 if test "X$found_dir" != "X"; then
1652 dnl Found the library.
1653 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1654 if test "X$found_so" != "X"; then
1655 dnl Linking with a shared library. We attempt to hardcode its
1656 dnl directory into the executable's runpath, unless it's the
1657 dnl standard /usr/lib.
1658 if test "X$found_dir" = "X/usr/lib"; then
1659 dnl No hardcoding is needed.
1660 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1662 dnl Use an explicit option to hardcode DIR into the resulting
1664 dnl Potentially add DIR to ltrpathdirs.
1665 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1667 for x in $ltrpathdirs; do
1668 if test "X$x" = "X$found_dir"; then
1673 if test -z "$haveit"; then
1674 ltrpathdirs="$ltrpathdirs $found_dir"
1676 dnl The hardcoding into $LIBNAME is system dependent.
1677 if test "$hardcode_direct" = yes; then
1678 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1679 dnl resulting binary.
1680 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1682 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1683 dnl Use an explicit option to hardcode DIR into the resulting
1685 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1686 dnl Potentially add DIR to rpathdirs.
1687 dnl The rpathdirs will be appended to $LIBNAME at the end.
1689 for x in $rpathdirs; do
1690 if test "X$x" = "X$found_dir"; then
1695 if test -z "$haveit"; then
1696 rpathdirs="$rpathdirs $found_dir"
1699 dnl Rely on "-L$found_dir".
1700 dnl But don't add it if it's already contained in the LDFLAGS
1701 dnl or the already constructed $LIBNAME
1703 for x in $LDFLAGS $LIB[]NAME; do
1704 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1705 if test "X$x" = "X-L$found_dir"; then
1710 if test -z "$haveit"; then
1711 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1713 if test "$hardcode_minus_L" != no; then
1714 dnl FIXME: Not sure whether we should use
1715 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1717 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1719 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1720 dnl here, because this doesn't fit in flags passed to the
1721 dnl compiler. So give up. No hardcoding. This affects only
1722 dnl very old systems.
1723 dnl FIXME: Not sure whether we should use
1724 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1726 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1732 if test "X$found_a" != "X"; then
1733 dnl Linking with a static library.
1734 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1736 dnl We shouldn't come here, but anyway it's good to have a
1738 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1741 dnl Assume the include files are nearby.
1742 additional_includedir=
1743 case "$found_dir" in
1745 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1746 additional_includedir="$basedir/include"
1749 if test "X$additional_includedir" != "X"; then
1750 dnl Potentially add $additional_includedir to $INCNAME.
1751 dnl But don't add it
1752 dnl 1. if it's the standard /usr/include,
1753 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1754 dnl 3. if it's already present in $CPPFLAGS or the already
1755 dnl constructed $INCNAME,
1756 dnl 4. if it doesn't exist as a directory.
1757 if test "X$additional_includedir" != "X/usr/include"; then
1759 if test "X$additional_includedir" = "X/usr/local/include"; then
1760 if test -n "$GCC"; then
1762 linux*) haveit=yes;;
1766 if test -z "$haveit"; then
1767 for x in $CPPFLAGS $INC[]NAME; do
1768 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1769 if test "X$x" = "X-I$additional_includedir"; then
1774 if test -z "$haveit"; then
1775 if test -d "$additional_includedir"; then
1776 dnl Really add $additional_includedir to $INCNAME.
1777 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1783 dnl Look for dependencies.
1784 if test -n "$found_la"; then
1785 dnl Read the .la file. It defines the variables
1786 dnl dlname, library_names, old_library, dependency_libs, current,
1787 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1788 save_libdir="$libdir"
1790 */* | *\\*) . "$found_la" ;;
1791 *) . "./$found_la" ;;
1793 libdir="$save_libdir"
1794 dnl We use only dependency_libs.
1795 for dep in $dependency_libs; do
1798 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1799 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1800 dnl But don't add it
1801 dnl 1. if it's the standard /usr/lib,
1802 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1803 dnl 3. if it's already present in $LDFLAGS or the already
1804 dnl constructed $LIBNAME,
1805 dnl 4. if it doesn't exist as a directory.
1806 if test "X$additional_libdir" != "X/usr/lib"; then
1808 if test "X$additional_libdir" = "X/usr/local/lib"; then
1809 if test -n "$GCC"; then
1811 linux*) haveit=yes;;
1815 if test -z "$haveit"; then
1817 for x in $LDFLAGS $LIB[]NAME; do
1818 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1819 if test "X$x" = "X-L$additional_libdir"; then
1824 if test -z "$haveit"; then
1825 if test -d "$additional_libdir"; then
1826 dnl Really add $additional_libdir to $LIBNAME.
1827 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1831 for x in $LDFLAGS $LTLIB[]NAME; do
1832 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1833 if test "X$x" = "X-L$additional_libdir"; then
1838 if test -z "$haveit"; then
1839 if test -d "$additional_libdir"; then
1840 dnl Really add $additional_libdir to $LTLIBNAME.
1841 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1848 dnl Handle this in the next round.
1849 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1852 dnl Handle this in the next round. Throw away the .la's
1853 dnl directory; it is already contained in a preceding -L
1855 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1858 dnl Most likely an immediate library name.
1859 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1860 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1866 dnl Didn't find the library; assume it is in the system directories
1867 dnl known to the linker and runtime loader. (All the system
1868 dnl directories known to the linker should also be known to the
1869 dnl runtime loader, otherwise the system is severely misconfigured.)
1870 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1871 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1877 if test "X$rpathdirs" != "X"; then
1878 if test -n "$hardcode_libdir_separator"; then
1879 dnl Weird platform: only the last -rpath option counts, the user must
1880 dnl pass all path elements in one option. We can arrange that for a
1881 dnl single library, but not when more than one $LIBNAMEs are used.
1883 for found_dir in $rpathdirs; do
1884 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1886 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1887 acl_save_libdir="$libdir"
1889 eval flag=\"$hardcode_libdir_flag_spec\"
1890 libdir="$acl_save_libdir"
1891 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1893 dnl The -rpath options are cumulative.
1894 for found_dir in $rpathdirs; do
1895 acl_save_libdir="$libdir"
1897 eval flag=\"$hardcode_libdir_flag_spec\"
1898 libdir="$acl_save_libdir"
1899 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1903 if test "X$ltrpathdirs" != "X"; then
1904 dnl When using libtool, the option that works for both libraries and
1905 dnl executables is -R. The -R options are cumulative.
1906 for found_dir in $ltrpathdirs; do
1907 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1912 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1913 dnl unless already present in VAR.
1914 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1915 dnl contains two or three consecutive elements that belong together.
1916 AC_DEFUN([AC_LIB_APPENDTOVAR],
1918 for element in [$2]; do
1921 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1922 if test "X$x" = "X$element"; then
1927 if test -z "$haveit"; then
1928 [$1]="${[$1]}${[$1]:+ }$element"
1933 # lib-prefix.m4 serial 1 (gettext-0.11)
1934 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1935 dnl This file is free software, distributed under the terms of the GNU
1936 dnl General Public License. As a special exception to the GNU General
1937 dnl Public License, this file may be distributed as part of a program
1938 dnl that contains a configuration script generated by Autoconf, under
1939 dnl the same distribution terms as the rest of that program.
1941 dnl From Bruno Haible.
1943 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1944 dnl to access previously installed libraries. The basic assumption is that
1945 dnl a user will want packages to use other packages he previously installed
1946 dnl with the same --prefix option.
1947 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1948 dnl libraries, but is otherwise very convenient.
1949 AC_DEFUN([AC_LIB_PREFIX],
1951 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1952 AC_REQUIRE([AC_PROG_CC])
1953 AC_REQUIRE([AC_CANONICAL_HOST])
1954 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1955 dnl By default, look in $includedir and $libdir.
1957 AC_LIB_WITH_FINAL_PREFIX([
1958 eval additional_includedir=\"$includedir\"
1959 eval additional_libdir=\"$libdir\"
1961 AC_ARG_WITH([lib-prefix],
1962 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1963 --without-lib-prefix don't search for libraries in includedir and libdir],
1965 if test "X$withval" = "Xno"; then
1968 if test "X$withval" = "X"; then
1969 AC_LIB_WITH_FINAL_PREFIX([
1970 eval additional_includedir=\"$includedir\"
1971 eval additional_libdir=\"$libdir\"
1974 additional_includedir="$withval/include"
1975 additional_libdir="$withval/lib"
1979 if test $use_additional = yes; then
1980 dnl Potentially add $additional_includedir to $CPPFLAGS.
1981 dnl But don't add it
1982 dnl 1. if it's the standard /usr/include,
1983 dnl 2. if it's already present in $CPPFLAGS,
1984 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1985 dnl 4. if it doesn't exist as a directory.
1986 if test "X$additional_includedir" != "X/usr/include"; then
1988 for x in $CPPFLAGS; do
1989 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1990 if test "X$x" = "X-I$additional_includedir"; then
1995 if test -z "$haveit"; then
1996 if test "X$additional_includedir" = "X/usr/local/include"; then
1997 if test -n "$GCC"; then
1999 linux*) haveit=yes;;
2003 if test -z "$haveit"; then
2004 if test -d "$additional_includedir"; then
2005 dnl Really add $additional_includedir to $CPPFLAGS.
2006 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
2011 dnl Potentially add $additional_libdir to $LDFLAGS.
2012 dnl But don't add it
2013 dnl 1. if it's the standard /usr/lib,
2014 dnl 2. if it's already present in $LDFLAGS,
2015 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
2016 dnl 4. if it doesn't exist as a directory.
2017 if test "X$additional_libdir" != "X/usr/lib"; then
2019 for x in $LDFLAGS; do
2020 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2021 if test "X$x" = "X-L$additional_libdir"; then
2026 if test -z "$haveit"; then
2027 if test "X$additional_libdir" = "X/usr/local/lib"; then
2028 if test -n "$GCC"; then
2030 linux*) haveit=yes;;
2034 if test -z "$haveit"; then
2035 if test -d "$additional_libdir"; then
2036 dnl Really add $additional_libdir to $LDFLAGS.
2037 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
2045 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
2046 dnl acl_final_exec_prefix, containing the values to which $prefix and
2047 dnl $exec_prefix will expand at the end of the configure script.
2048 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
2050 dnl Unfortunately, prefix and exec_prefix get only finally determined
2051 dnl at the end of configure.
2052 if test "X$prefix" = "XNONE"; then
2053 acl_final_prefix="$ac_default_prefix"
2055 acl_final_prefix="$prefix"
2057 if test "X$exec_prefix" = "XNONE"; then
2058 acl_final_exec_prefix='${prefix}'
2060 acl_final_exec_prefix="$exec_prefix"
2062 acl_save_prefix="$prefix"
2063 prefix="$acl_final_prefix"
2064 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
2065 prefix="$acl_save_prefix"
2068 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
2069 dnl variables prefix and exec_prefix bound to the values they will have
2070 dnl at the end of the configure script.
2071 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
2073 acl_save_prefix="$prefix"
2074 prefix="$acl_final_prefix"
2075 acl_save_exec_prefix="$exec_prefix"
2076 exec_prefix="$acl_final_exec_prefix"
2078 exec_prefix="$acl_save_exec_prefix"
2079 prefix="$acl_save_prefix"
2082 # lib-ld.m4 serial 1 (gettext-0.11)
2083 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2084 dnl This file is free software, distributed under the terms of the GNU
2085 dnl General Public License. As a special exception to the GNU General
2086 dnl Public License, this file may be distributed as part of a program
2087 dnl that contains a configuration script generated by Autoconf, under
2088 dnl the same distribution terms as the rest of that program.
2090 dnl Subroutines of libtool.m4,
2091 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2092 dnl with libtool.m4.
2094 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2095 AC_DEFUN([AC_LIB_PROG_LD_GNU],
2096 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2097 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2098 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2099 acl_cv_prog_gnu_ld=yes
2101 acl_cv_prog_gnu_ld=no
2103 with_gnu_ld=$acl_cv_prog_gnu_ld
2106 dnl From libtool-1.4. Sets the variable LD.
2107 AC_DEFUN([AC_LIB_PROG_LD],
2108 [AC_ARG_WITH(gnu-ld,
2109 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2110 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2111 AC_REQUIRE([AC_PROG_CC])dnl
2112 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2114 if test "$GCC" = yes; then
2115 # Check if gcc -print-prog-name=ld gives a path.
2116 AC_MSG_CHECKING([for ld used by GCC])
2119 # gcc leaves a trailing carriage return which upsets mingw
2120 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2122 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2125 # Accept absolute paths.
2126 [[\\/]* | [A-Za-z]:[\\/]*)]
2127 [re_direlt='/[^/][^/]*/\.\./']
2128 # Canonicalize the path of ld
2129 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2130 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2131 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2133 test -z "$LD" && LD="$ac_prog"
2136 # If it fails, then pretend we aren't using GCC.
2140 # If it is relative, then search for the first ld in PATH.
2144 elif test "$with_gnu_ld" = yes; then
2145 AC_MSG_CHECKING([for GNU ld])
2147 AC_MSG_CHECKING([for non-GNU ld])
2149 AC_CACHE_VAL(acl_cv_path_LD,
2150 [if test -z "$LD"; then
2151 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2152 for ac_dir in $PATH; do
2153 test -z "$ac_dir" && ac_dir=.
2154 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2155 acl_cv_path_LD="$ac_dir/$ac_prog"
2156 # Check to see if the program is GNU ld. I'd rather use --version,
2157 # but apparently some GNU ld's only accept -v.
2158 # Break only if it was the GNU/non-GNU ld that we prefer.
2159 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2160 test "$with_gnu_ld" != no && break
2162 test "$with_gnu_ld" != yes && break
2168 acl_cv_path_LD="$LD" # Let the user override the test with a path.
2170 LD="$acl_cv_path_LD"
2171 if test -n "$LD"; then
2176 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2180 # iconv.m4 serial AM3 (gettext-0.11)
2181 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2182 dnl This file is free software, distributed under the terms of the GNU
2183 dnl General Public License. As a special exception to the GNU General
2184 dnl Public License, this file may be distributed as part of a program
2185 dnl that contains a configuration script generated by Autoconf, under
2186 dnl the same distribution terms as the rest of that program.
2188 dnl From Bruno Haible.
2190 AC_DEFUN([AM_ICONV_LINK],
2192 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2193 dnl those with the standalone portable GNU libiconv installed).
2195 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2196 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2197 AC_REQUIRE([AC_LIB_RPATH])
2199 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2201 AC_LIB_LINKFLAGS_BODY([iconv])
2203 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2204 dnl because if the user has installed libiconv and not disabled its use
2205 dnl via --without-libiconv-prefix, he wants to use it. The first
2206 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2207 am_save_CPPFLAGS="$CPPFLAGS"
2208 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2210 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2211 am_cv_func_iconv="no, consider installing GNU libiconv"
2213 AC_TRY_LINK([#include <stdlib.h>
2214 #include <iconv.h>],
2215 [iconv_t cd = iconv_open("","");
2216 iconv(cd,NULL,NULL,NULL,NULL);
2218 am_cv_func_iconv=yes)
2219 if test "$am_cv_func_iconv" != yes; then
2220 am_save_LIBS="$LIBS"
2221 LIBS="$LIBS $LIBICONV"
2222 AC_TRY_LINK([#include <stdlib.h>
2223 #include <iconv.h>],
2224 [iconv_t cd = iconv_open("","");
2225 iconv(cd,NULL,NULL,NULL,NULL);
2228 am_cv_func_iconv=yes)
2229 LIBS="$am_save_LIBS"
2232 if test "$am_cv_func_iconv" = yes; then
2233 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2235 if test "$am_cv_lib_iconv" = yes; then
2236 AC_MSG_CHECKING([how to link with libiconv])
2237 AC_MSG_RESULT([$LIBICONV])
2239 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2241 CPPFLAGS="$am_save_CPPFLAGS"
2246 AC_SUBST(LTLIBICONV)
2249 AC_DEFUN([AM_ICONV],
2251 AC_REQUIRE([AM_ICONV_LINK])
2252 if test "$am_cv_func_iconv" = yes; then
2253 AC_MSG_CHECKING([for iconv declaration])
2254 AC_CACHE_VAL(am_cv_proto_iconv, [
2262 #if defined(__STDC__) || defined(__cplusplus)
2263 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2267 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2268 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
2269 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2270 AC_MSG_RESULT([$]{ac_t:-
2271 }[$]am_cv_proto_iconv)
2272 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2273 [Define as const if the declaration of iconv() needs const.])
2277 # progtest.m4 serial 2 (gettext-0.10.40)
2278 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2279 dnl This file is free software, distributed under the terms of the GNU
2280 dnl General Public License. As a special exception to the GNU General
2281 dnl Public License, this file may be distributed as part of a program
2282 dnl that contains a configuration script generated by Autoconf, under
2283 dnl the same distribution terms as the rest of that program.
2285 dnl This file can can be used in projects which are not available under
2286 dnl the GNU General Public License or the GNU Library General Public
2287 dnl License but which still want to provide support for the GNU gettext
2289 dnl Please note that the actual code of the GNU gettext library is covered
2290 dnl by the GNU Library General Public License, and the rest of the GNU
2291 dnl gettext package package is covered by the GNU General Public License.
2292 dnl They are *not* in the public domain.
2295 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2297 # Search path for a program which passes the given test.
2299 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2300 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2301 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2302 [# Extract the first word of "$2", so it can be a program name with args.
2303 set dummy $2; ac_word=[$]2
2304 AC_MSG_CHECKING([for $ac_word])
2305 AC_CACHE_VAL(ac_cv_path_$1,
2308 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2311 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2312 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2313 test -z "$ac_dir" && ac_dir=.
2314 if test -f $ac_dir/$ac_word; then
2316 ac_cv_path_$1="$ac_dir/$ac_word"
2322 dnl If no 4th arg is given, leave the cache variable unset,
2323 dnl so AC_PATH_PROGS will keep looking.
2324 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2329 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2330 AC_MSG_RESULT([$]$1)
2337 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2338 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2339 dnl This file is free software, distributed under the terms of the GNU
2340 dnl General Public License. As a special exception to the GNU General
2341 dnl Public License, this file may be distributed as part of a program
2342 dnl that contains a configuration script generated by Autoconf, under
2343 dnl the same distribution terms as the rest of that program.
2345 # Test for the GNU C Library, version 2.1 or newer.
2346 # From Bruno Haible.
2348 AC_DEFUN([jm_GLIBC21],
2350 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2351 ac_cv_gnu_library_2_1,
2352 [AC_EGREP_CPP([Lucky GNU user],
2354 #include <features.h>
2355 #ifdef __GNU_LIBRARY__
2356 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2361 ac_cv_gnu_library_2_1=yes,
2362 ac_cv_gnu_library_2_1=no)
2366 GLIBC21="$ac_cv_gnu_library_2_1"
2370 # codeset.m4 serial AM1 (gettext-0.10.40)
2371 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2372 dnl This file is free software, distributed under the terms of the GNU
2373 dnl General Public License. As a special exception to the GNU General
2374 dnl Public License, this file may be distributed as part of a program
2375 dnl that contains a configuration script generated by Autoconf, under
2376 dnl the same distribution terms as the rest of that program.
2378 dnl From Bruno Haible.
2380 AC_DEFUN([AM_LANGINFO_CODESET],
2382 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2383 [AC_TRY_LINK([#include <langinfo.h>],
2384 [char* cs = nl_langinfo(CODESET);],
2385 am_cv_langinfo_codeset=yes,
2386 am_cv_langinfo_codeset=no)
2388 if test $am_cv_langinfo_codeset = yes; then
2389 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2390 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2394 # lcmessage.m4 serial 2 (gettext-0.10.40)
2395 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2396 dnl This file is free software, distributed under the terms of the GNU
2397 dnl General Public License. As a special exception to the GNU General
2398 dnl Public License, this file may be distributed as part of a program
2399 dnl that contains a configuration script generated by Autoconf, under
2400 dnl the same distribution terms as the rest of that program.
2402 dnl This file can can be used in projects which are not available under
2403 dnl the GNU General Public License or the GNU Library General Public
2404 dnl License but which still want to provide support for the GNU gettext
2406 dnl Please note that the actual code of the GNU gettext library is covered
2407 dnl by the GNU Library General Public License, and the rest of the GNU
2408 dnl gettext package package is covered by the GNU General Public License.
2409 dnl They are *not* in the public domain.
2412 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2414 # Check whether LC_MESSAGES is available in <locale.h>.
2416 AC_DEFUN([AM_LC_MESSAGES],
2417 [if test $ac_cv_header_locale_h = yes; then
2418 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2419 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2420 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2421 if test $am_cv_val_LC_MESSAGES = yes; then
2422 AC_DEFINE(HAVE_LC_MESSAGES, 1,
2423 [Define if your <locale.h> file defines LC_MESSAGES.])