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`
128 # Add --enable-maintainer-mode option to configure.
133 AC_DEFUN([AM_MAINTAINER_MODE],
134 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
135 dnl maintainer-mode is disabled by default
136 AC_ARG_ENABLE(maintainer-mode,
137 [ --enable-maintainer-mode enable make rules and dependencies not useful
138 (and sometimes confusing) to the casual installer],
139 USE_MAINTAINER_MODE=$enableval,
140 USE_MAINTAINER_MODE=no)
141 AC_MSG_RESULT($USE_MAINTAINER_MODE)
142 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
143 MAINT=$MAINTAINER_MODE_TRUE
148 # Define a conditional.
150 AC_DEFUN([AM_CONDITIONAL],
163 # This macro adds the name macrodir to the set of directories
164 # that `aclocal' searches for macros.
168 dnl AM_ACLOCAL_INCLUDE(macrodir)
169 AC_DEFUN([AM_ACLOCAL_INCLUDE],
171 AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
173 test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
175 for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
179 dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
181 dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
185 AC_DEFUN([GNOME_INIT_HOOK],[
187 AC_SUBST(GNOMEUI_LIBS)
188 AC_SUBST(GNOMEGNORBA_LIBS)
189 AC_SUBST(GTKXMHTML_LIBS)
191 AC_SUBST(GNOME_LIBDIR)
192 AC_SUBST(GNOME_INCLUDEDIR)
194 AC_ARG_WITH(gnome-includes,
195 [ --with-gnome-includes Specify location of GNOME headers],[
196 CFLAGS="$CFLAGS -I$withval"
199 AC_ARG_WITH(gnome-libs,
200 [ --with-gnome-libs Specify location of GNOME libs],[
201 LDFLAGS="$LDFLAGS -L$withval"
202 gnome_prefix=$withval
206 [ --with-gnome Specify prefix for GNOME files],
207 if test x$withval = xyes; then
209 dnl Note that an empty true branch is not
211 ifelse([$1], [], :, [$1])
213 if test "x$withval" = xno; then
217 LDFLAGS="$LDFLAGS -L$withval/lib"
218 CFLAGS="$CFLAGS -I$withval/include"
219 gnome_prefix=$withval/lib
224 if test "x$want_gnome" = xyes; then
226 AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
227 if test "$GNOME_CONFIG" = "no"; then
228 no_gnome_config="yes"
230 AC_MSG_CHECKING(if $GNOME_CONFIG works)
231 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
233 GNOME_GNORBA_HOOK([],$2)
234 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
235 GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
236 GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
237 GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
238 ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
239 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
240 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
244 no_gnome_config="yes"
248 if test x$exec_prefix = xNONE; then
249 if test x$prefix = xNONE; then
250 gnome_prefix=$ac_default_prefix/lib
252 gnome_prefix=$prefix/lib
255 gnome_prefix=`eval echo \`echo $libdir\``
258 if test "$no_gnome_config" = "yes"; then
259 AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
260 if test -f $gnome_prefix/gnomeConf.sh; then
262 echo "loading gnome configuration from" \
263 "$gnome_prefix/gnomeConf.sh"
264 . $gnome_prefix/gnomeConf.sh
267 AC_MSG_RESULT(not found)
268 if test x$2 = xfail; then
269 AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
275 if test -n "$3"; then
278 AC_MSG_CHECKING(extra library \"$i\")
281 AC_SUBST(GNOME_APPLETS_LIBS)
282 GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
283 AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
285 AC_SUBST(GNOME_CAPPLET_LIBS)
286 GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
287 AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
289 AC_MSG_RESULT(unknown library)
296 dnl GNOME_INIT ([additional-inits])
299 AC_DEFUN([GNOME_INIT],[
300 GNOME_INIT_HOOK([],fail,$1)
304 dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
306 dnl if failflag is "failure" it aborts if gnorba is not found.
309 AC_DEFUN([GNOME_GNORBA_HOOK],[
310 GNOME_ORBIT_HOOK([],$2)
311 AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
312 gnome_cv_gnorba_found=no
313 if test x$gnome_cv_orbit_found = xyes; then
314 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
315 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
316 if test -n "$GNORBA_LIBS"; then
317 gnome_cv_gnorba_found=yes
321 AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
322 if test x$gnome_cv_orbit_found = xyes; then
324 GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
325 GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
326 AC_SUBST(GNORBA_CFLAGS)
327 AC_SUBST(GNORBA_LIBS)
329 if test x$2 = xfailure; then
330 AC_MSG_ERROR(gnorba library not installed or installation problem)
335 AC_DEFUN([GNOME_GNORBA_CHECK], [
336 GNOME_GNORBA_HOOK([],failure)
340 dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
342 dnl if failflag is "failure" it aborts if orbit is not found.
345 AC_DEFUN([GNOME_ORBIT_HOOK],[
346 AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
347 AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
348 AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
349 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
350 gnome_cv_orbit_found=no
352 gnome_cv_orbit_found=yes
355 AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
356 if test x$gnome_cv_orbit_found = xyes; then
358 ORBIT_CFLAGS=`orbit-config --cflags client server`
359 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
360 AC_SUBST(ORBIT_CFLAGS)
363 if test x$2 = xfailure; then
364 AC_MSG_ERROR(ORBit not installed or installation problem)
369 AC_DEFUN([GNOME_ORBIT_CHECK], [
370 GNOME_ORBIT_HOOK([],failure)
373 # isc-posix.m4 serial 1 (gettext-0.10.40)
374 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
375 dnl This file is free software, distributed under the terms of the GNU
376 dnl General Public License. As a special exception to the GNU General
377 dnl Public License, this file may be distributed as part of a program
378 dnl that contains a configuration script generated by Autoconf, under
379 dnl the same distribution terms as the rest of that program.
381 # This test replaces the one in autoconf.
382 # Currently this macro should have the same name as the autoconf macro
383 # because gettext's gettext.m4 (distributed in the automake package)
384 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
385 # give these diagnostics:
386 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
387 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
389 undefine([AC_ISC_POSIX])
391 AC_DEFUN([AC_ISC_POSIX],
393 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
394 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
401 # @defmac AC_PROG_CC_STDC
402 # @maindex PROG_CC_STDC
404 # If the C compiler in not in ANSI C mode by default, try to add an option
405 # to output variable @code{CC} to make it so. This macro tries various
406 # options that select ANSI C on some system or another. It considers the
407 # compiler to be in ANSI C mode if it handles function prototypes correctly.
409 # If you use this macro, you should check after calling it whether the C
410 # compiler has been set to accept ANSI C; if not, the shell variable
411 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
412 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
413 # program @code{ansi2knr}, which comes with Ghostscript.
416 AC_DEFUN([AM_PROG_CC_STDC],
417 [AC_REQUIRE([AC_PROG_CC])
418 AC_BEFORE([$0], [AC_C_INLINE])
419 AC_BEFORE([$0], [AC_C_CONST])
420 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
421 dnl a magic option to avoid problems with ANSI preprocessor commands
423 dnl FIXME: can't do this because then AC_AIX won't work due to a
424 dnl circular dependency.
425 dnl AC_BEFORE([$0], [AC_PROG_CPP])
426 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
427 AC_CACHE_VAL(am_cv_prog_cc_stdc,
428 [am_cv_prog_cc_stdc=no
430 # Don't try gcc -ansi; that turns off useful extensions and
431 # breaks some systems' header files.
433 # Ultrix and OSF/1 -std1
434 # HP-UX -Aa -D_HPUX_SOURCE
435 # SVR4 -Xc -D__EXTENSIONS__
436 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
438 CC="$ac_save_CC $ac_arg"
442 #include <sys/types.h>
443 #include <sys/stat.h>
444 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
445 struct buf { int x; };
446 FILE * (*rcsopen) (struct buf *, struct stat *, int);
447 static char *e (p, i)
453 static char *f (char * (*g) (char **, int), char **p, ...)
458 s = g (p, va_arg (v,int));
462 int test (int i, double x);
463 struct s1 {int (*f) (int a);};
464 struct s2 {int (*f) (double a);};
465 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
469 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
471 [am_cv_prog_cc_stdc="$ac_arg"; break])
475 if test -z "$am_cv_prog_cc_stdc"; then
476 AC_MSG_RESULT([none needed])
478 AC_MSG_RESULT($am_cv_prog_cc_stdc)
480 case "x$am_cv_prog_cc_stdc" in
482 *) CC="$CC $am_cv_prog_cc_stdc" ;;
486 dnl GNOME_COMPILE_WARNINGS
487 dnl Turn on many useful compiler warnings
488 dnl For now, only works on GCC
489 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
490 AC_ARG_ENABLE(compile-warnings,
491 [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum)
493 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
495 if test "x$GCC" != xyes; then
496 enable_compile_warnings=no
499 if test "x$enable_compile_warnings" != "xno"; then
500 if test "x$GCC" = "xyes"; then
502 *[\ \ ]-Wall[\ \ ]*) ;;
503 *) warnCFLAGS="-Wall -Wunused" ;;
506 ## -W is not all that useful. And it cannot be controlled
507 ## with individual -Wno-xxx flags, unlike -Wall
508 if test "x$enable_compile_warnings" = "xyes"; then
509 warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith"
513 AC_MSG_RESULT($warnCFLAGS)
516 [ --enable-iso-c Try to warn if code is not ISO C ],,
519 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
521 if test "x$enable_iso_c" != "xno"; then
522 if test "x$GCC" = "xyes"; then
524 *[\ \ ]-ansi[\ \ ]*) ;;
525 *) complCFLAGS="$complCFLAGS -ansi" ;;
529 *[\ \ ]-pedantic[\ \ ]*) ;;
530 *) complCFLAGS="$complCFLAGS -pedantic" ;;
534 AC_MSG_RESULT($complCFLAGS)
535 if test "x$cflags_set" != "xyes"; then
536 CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
542 dnl For C++, do basically the same thing.
544 AC_DEFUN([GNOME_CXX_WARNINGS],[
545 AC_ARG_ENABLE(cxx-warnings,
546 [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
548 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
550 if test "x$GCC" != xyes; then
551 enable_compile_warnings=no
553 if test "x$enable_cxx_warnings" != "xno"; then
554 if test "x$GCC" = "xyes"; then
555 case " $CXXFLAGS " in
556 *[\ \ ]-Wall[\ \ ]*) ;;
557 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
560 ## -W is not all that useful. And it cannot be controlled
561 ## with individual -Wno-xxx flags, unlike -Wall
562 if test "x$enable_cxx_warnings" = "xyes"; then
563 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wshadow -Woverloaded-virtual"
567 AC_MSG_RESULT($warnCXXFLAGS)
569 AC_ARG_ENABLE(iso-cxx,
570 [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
573 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
575 if test "x$enable_iso_cxx" != "xno"; then
576 if test "x$GCC" = "xyes"; then
577 case " $CXXFLAGS " in
578 *[\ \ ]-ansi[\ \ ]*) ;;
579 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
582 case " $CXXFLAGS " in
583 *[\ \ ]-pedantic[\ \ ]*) ;;
584 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
588 AC_MSG_RESULT($complCXXFLAGS)
589 if test "x$cxxflags_set" != "xyes"; then
590 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
592 AC_SUBST(cxxflags_set)
598 dnl Basic X11 related checks for X11. At the end, the following will be
600 dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK
601 dnl CPPFLAGS Will include $X_CFLAGS
602 dnl GNOME_HAVE_SM `true' or `false' depending on whether session
603 dnl management is available. It is available if
604 dnl both -lSM and X11/SM/SMlib.h exist. (Some
605 dnl Solaris boxes have the library but not the header)
606 dnl XPM_LIBS -lXpm if Xpm library is present, otherwise ""
608 dnl The following configure cache variables are defined (but not used):
609 dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
611 AC_DEFUN([GNOME_X_CHECKS],
613 AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
614 dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could
615 dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
617 dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
618 dnl CPPFLAGS, not CFLAGS
619 CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
621 saved_ldflags="$LDFLAGS"
622 LDFLAGS="$LDFLAGS $GTK_LIBS"
624 gnome_cv_passdown_x_libs="$GTK_LIBS"
625 gnome_cv_passdown_X_LIBS="$GTK_LIBS"
626 gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
627 gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
629 LDFLAGS="$saved_ldflags $GTK_LIBS"
631 dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
634 dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
635 dnl AC_EGREP_CPP(answer_affirmatively,
636 dnl [#include <gtk/gtkfeatures.h>
637 dnl #ifdef GTK_HAVE_FEATURES_1_1_0
638 dnl answer_affirmatively
640 dnl ], dev_gtk=yes, dev_gtk=no)
641 dnl if test "$dev_gtk" = "yes"; then
644 dnl AC_MSG_RESULT("$dev_gtk")
649 dnl Already found it.
652 dnl Assume that if we have -lSM then we also have -lICE.
653 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
654 [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
659 if test "$GNOME_HAVE_SM" = true; then
660 AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
663 if test "$GNOME_HAVE_SM" = true; then
664 AC_DEFINE(HAVE_LIBSM)
668 AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
671 AC_REQUIRE([GNOME_PTHREAD_CHECK])
672 LDFLAGS="$saved_ldflags"
674 AC_PROVIDE([GNOME_X_CHECKS])
677 # Configure paths for GTK+
678 # Owen Taylor 97-11-3
680 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
681 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
683 AC_DEFUN(AM_PATH_GTK,
685 dnl Get the cflags and libraries from the gtk-config script
687 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
688 gtk_config_prefix="$withval", gtk_config_prefix="")
689 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
690 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
691 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
692 , enable_gtktest=yes)
698 gtk_config_args="$gtk_config_args gthread"
703 if test x$gtk_config_exec_prefix != x ; then
704 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
705 if test x${GTK_CONFIG+set} != xset ; then
706 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
709 if test x$gtk_config_prefix != x ; then
710 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
711 if test x${GTK_CONFIG+set} != xset ; then
712 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
716 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
717 min_gtk_version=ifelse([$1], ,0.99.7,$1)
718 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
720 if test "$GTK_CONFIG" = "no" ; then
723 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
724 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
725 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
726 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
727 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
728 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
729 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
730 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
731 if test "x$enable_gtktest" = "xyes" ; then
732 ac_save_CFLAGS="$CFLAGS"
734 CFLAGS="$CFLAGS $GTK_CFLAGS"
735 LIBS="$GTK_LIBS $LIBS"
737 dnl Now check if the installed GTK is sufficiently new. (Also sanity
738 dnl checks the results of gtk-config to some extent
749 int major, minor, micro;
752 system ("touch conf.gtktest");
754 /* HP/UX 9 (%@#!) writes to sscanf strings */
755 tmp_version = g_strdup("$min_gtk_version");
756 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
757 printf("%s, bad version string\n", "$min_gtk_version");
761 if ((gtk_major_version != $gtk_config_major_version) ||
762 (gtk_minor_version != $gtk_config_minor_version) ||
763 (gtk_micro_version != $gtk_config_micro_version))
765 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
766 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
767 gtk_major_version, gtk_minor_version, gtk_micro_version);
768 printf ("*** was found! If gtk-config was correct, then it is best\n");
769 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
770 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
771 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
772 printf("*** required on your system.\n");
773 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
774 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
775 printf("*** before re-running configure\n");
777 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
778 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
779 (gtk_minor_version != GTK_MINOR_VERSION) ||
780 (gtk_micro_version != GTK_MICRO_VERSION))
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);
787 #endif /* defined (GTK_MAJOR_VERSION) ... */
790 if ((gtk_major_version > major) ||
791 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
792 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
798 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
799 gtk_major_version, gtk_minor_version, gtk_micro_version);
800 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
801 major, minor, micro);
802 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
804 printf("*** If you have already installed a sufficiently new version, this error\n");
805 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
806 printf("*** being found. The easiest way to fix this is to remove the old version\n");
807 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
808 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
809 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
810 printf("*** so that the correct libraries are found at run-time))\n");
815 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
816 CFLAGS="$ac_save_CFLAGS"
820 if test "x$no_gtk" = x ; then
822 ifelse([$2], , :, [$2])
825 if test "$GTK_CONFIG" = "no" ; then
826 echo "*** The gtk-config script installed by GTK could not be found"
827 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
828 echo "*** your path, or set the GTK_CONFIG environment variable to the"
829 echo "*** full path to gtk-config."
831 if test -f conf.gtktest ; then
834 echo "*** Could not run GTK test program, checking why..."
835 CFLAGS="$CFLAGS $GTK_CFLAGS"
836 LIBS="$LIBS $GTK_LIBS"
840 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
841 [ echo "*** The test program compiled, but did not run. This usually means"
842 echo "*** that the run-time linker is not finding GTK or finding the wrong"
843 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
844 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
845 echo "*** to the installed location Also, make sure you have run ldconfig if that"
846 echo "*** is required on your system"
848 echo "*** If you have an old version installed, it is best to remove it, although"
849 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
851 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
852 echo "*** came with the system with the command"
854 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
855 [ echo "*** The test program failed to compile or link. See the file config.log for the"
856 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
857 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
858 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
859 CFLAGS="$ac_save_CFLAGS"
865 ifelse([$3], , :, [$3])
873 dnl And better, use gthreads instead...
876 AC_DEFUN([GNOME_PTHREAD_CHECK],[
878 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
879 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
880 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
881 [AC_CHECK_FUNC(pthread_create)]
885 AC_SUBST(PTHREAD_LIB)
886 AC_PROVIDE([GNOME_PTHREAD_CHECK])
889 # Macro to add for using GNU gettext.
890 # Ulrich Drepper <drepper@cygnus.com>, 1995.
892 # Modified to never use included libintl.
893 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
896 # This file can be copied and used freely without restrictions. It can
897 # be used in projects which are not available under the GNU Public License
898 # but which still want to provide support for the GNU gettext functionality.
899 # Please note that the actual code is *not* freely available.
903 AC_DEFUN(AM_GNOME_WITH_NLS,
904 [AC_MSG_CHECKING([whether NLS is requested])
905 dnl Default is enabled NLS
907 [ --disable-nls do not use Native Language Support],
908 USE_NLS=$enableval, USE_NLS=yes)
909 AC_MSG_RESULT($USE_NLS)
912 USE_INCLUDED_LIBINTL=no
914 dnl If we use NLS figure out what method
915 if test "$USE_NLS" = "yes"; then
916 AC_DEFINE(ENABLE_NLS)
917 # AC_MSG_CHECKING([whether included gettext is requested])
918 # AC_ARG_WITH(included-gettext,
919 # [ --with-included-gettext use the GNU gettext library included here],
920 # nls_cv_force_use_gnu_gettext=$withval,
921 # nls_cv_force_use_gnu_gettext=no)
922 # AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
923 nls_cv_force_use_gnu_gettext="no"
925 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
926 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
927 dnl User does not insist on using GNU NLS library. Figure out what
928 dnl to use. If gettext or catgets are available (in this order) we
929 dnl use this. Else we have to fall back to GNU NLS library.
930 dnl catgets is only used if permitted by option --with-catgets.
935 AC_CHECK_HEADER(libintl.h,
936 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
937 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
938 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
940 if test "$gt_cv_func_gettext_libc" != "yes"; then
941 AC_CHECK_LIB(intl, bindtextdomain,
942 [AC_CACHE_CHECK([for gettext in libintl],
943 gt_cv_func_gettext_libintl,
944 [AC_CHECK_LIB(intl, gettext,
945 gt_cv_func_gettext_libintl=yes,
946 gt_cv_func_gettext_libintl=no)],
947 gt_cv_func_gettext_libintl=no)])
950 if test "$gt_cv_func_gettext_libc" = "yes" \
951 || test "$gt_cv_func_gettext_libintl" = "yes"; then
952 AC_DEFINE(HAVE_GETTEXT)
953 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
954 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
955 if test "$MSGFMT" != "no"; then
956 AC_CHECK_FUNCS(dcgettext)
957 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
958 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
959 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
960 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
961 return _nl_msg_cat_cntr],
970 # Added by Martin Baulig 12/15/98 for libc5 systems
971 if test "$gt_cv_func_gettext_libc" != "yes" \
972 && test "$gt_cv_func_gettext_libintl" = "yes"; then
974 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
978 if test "$CATOBJEXT" = "NONE"; then
979 AC_MSG_CHECKING([whether catgets can be used])
981 [ --with-catgets use catgets functions if available],
982 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
983 AC_MSG_RESULT($nls_cv_use_catgets)
985 if test "$nls_cv_use_catgets" = "yes"; then
986 dnl No gettext in C library. Try catgets next.
987 AC_CHECK_LIB(i, main)
988 AC_CHECK_FUNC(catgets,
989 [AC_DEFINE(HAVE_CATGETS)
990 INTLOBJS="\$(CATOBJS)"
991 AC_PATH_PROG(GENCAT, gencat, no)dnl
992 # if test "$GENCAT" != "no"; then
993 # AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
994 # if test "$GMSGFMT" = "no"; then
995 # AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
996 # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
998 # AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
999 # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1000 # USE_INCLUDED_LIBINTL=yes
1004 # INTLDEPS='$(top_builddir)/intl/libintl.a'
1005 # INTLLIBS=$INTLDEPS
1006 # LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1007 # nls_cv_header_intl=intl/libintl.h
1008 # nls_cv_header_libgt=intl/libgettext.h
1014 if test "$CATOBJEXT" = "NONE"; then
1015 dnl Neither gettext nor catgets in included in the C library.
1016 dnl Fall back on GNU gettext library.
1017 nls_cv_use_gnu_gettext=yes
1021 if test "$nls_cv_use_gnu_gettext" != "yes"; then
1022 AC_DEFINE(ENABLE_NLS)
1024 # Unset this variable since we use the non-zero value as a flag.
1026 # dnl Mark actions used to generate GNU NLS library.
1027 # INTLOBJS="\$(GETTOBJS)"
1028 # AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1029 # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
1030 # AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1031 # AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1032 # [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1034 # USE_INCLUDED_LIBINTL=yes
1038 # INTLDEPS='$(top_builddir)/intl/libintl.a'
1039 # INTLLIBS=$INTLDEPS
1040 # LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1041 # nls_cv_header_intl=intl/libintl.h
1042 # nls_cv_header_libgt=intl/libgettext.h
1045 dnl Test whether we really found GNU xgettext.
1046 if test "$XGETTEXT" != ":"; then
1047 dnl If it is no GNU xgettext we define it as : so that the
1048 dnl Makefiles still can work.
1049 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1053 [found xgettext program is not GNU xgettext; ignore it])
1058 # We need to process the po/ directory.
1062 nls_cv_header_intl=intl/libintl.h
1063 nls_cv_header_libgt=intl/libgettext.h
1065 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
1067 [case "$CONFIG_FILES" in *po/Makefile.in*)
1068 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1072 # # If this is used in GNU gettext we have to set USE_NLS to `yes'
1073 # # because some of the sources are only built for this goal.
1074 # if test "$PACKAGE" = gettext; then
1076 # USE_INCLUDED_LIBINTL=yes
1079 dnl These rules are solely for the distribution goal. While doing this
1080 dnl we only have to keep exactly one list of the available catalogs
1081 dnl in configure.in.
1082 for lang in $ALL_LINGUAS; do
1083 GMOFILES="$GMOFILES $lang.gmo"
1084 POFILES="$POFILES $lang.po"
1087 dnl Make all variables we use known to autoconf.
1088 AC_SUBST(USE_INCLUDED_LIBINTL)
1091 AC_SUBST(DATADIRNAME)
1093 AC_SUBST(INSTOBJEXT)
1101 AC_DEFUN(AM_GNOME_GETTEXT,
1102 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1103 AC_REQUIRE([AC_PROG_CC])dnl
1104 AC_REQUIRE([AC_PROG_RANLIB])dnl
1105 AC_REQUIRE([AC_ISC_POSIX])dnl
1106 AC_REQUIRE([AC_HEADER_STDC])dnl
1107 AC_REQUIRE([AC_C_CONST])dnl
1108 AC_REQUIRE([AC_C_INLINE])dnl
1109 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1110 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1111 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1112 AC_REQUIRE([AC_FUNC_MMAP])dnl
1114 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
1115 unistd.h sys/param.h])
1116 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
1117 strdup __argz_count __argz_stringify __argz_next])
1119 if test "${ac_cv_func_stpcpy+set}" != "set"; then
1120 AC_CHECK_FUNCS(stpcpy)
1122 if test "${ac_cv_func_stpcpy}" = "yes"; then
1123 AC_DEFINE(HAVE_STPCPY)
1129 if test "x$CATOBJEXT" != "x"; then
1130 if test "x$ALL_LINGUAS" = "x"; then
1133 AC_MSG_CHECKING(for catalogs to be installed)
1135 if test "x$LINGUAS" = "x"; then
1136 LINGUAS=$ALL_LINGUAS
1138 for lang in $LINGUAS; do
1139 case "$ALL_LINGUAS" in
1140 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
1143 LINGUAS=$NEW_LINGUAS
1144 AC_MSG_RESULT($LINGUAS)
1147 dnl Construct list of names of catalog files to be constructed.
1148 if test -n "$LINGUAS"; then
1149 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1153 dnl The reference to <locale.h> in the installed <libintl.h> file
1154 dnl must be resolved because we cannot expect the users of this
1155 dnl to define HAVE_LOCALE_H.
1156 if test $ac_cv_header_locale_h = yes; then
1157 INCLUDE_LOCALE_H="#include <locale.h>"
1160 /* The system does not provide the header <locale.h>. Take care yourself. */"
1162 AC_SUBST(INCLUDE_LOCALE_H)
1164 dnl Determine which catalog format we have (if any is needed)
1165 dnl For now we know about two different formats:
1166 dnl Linux libc-5 and the normal X/Open format
1167 test -d intl || mkdir intl
1168 if test "$CATOBJEXT" = ".cat"; then
1169 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
1171 dnl Transform the SED scripts while copying because some dumb SEDs
1172 dnl cannot handle comments.
1173 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
1175 dnl po2tbl.sed is always needed.
1176 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
1177 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
1179 dnl In the intl/Makefile.in we have a special dependency which makes
1180 dnl only sense for gettext. We comment this out for non-gettext
1182 if test "$PACKAGE" = "gettext"; then
1192 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1193 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1194 dnl Try to locate is.
1196 if test -n "$ac_aux_dir"; then
1197 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1199 if test -z "$MKINSTALLDIRS"; then
1200 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1202 AC_SUBST(MKINSTALLDIRS)
1204 dnl *** For now the libtool support in intl/Makefile is not for real.
1208 dnl Generate list of files to be processed by xgettext which will
1209 dnl be included in po/Makefile.
1210 test -d po || mkdir po
1211 if test "x$srcdir" != "x."; then
1212 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1213 posrcprefix="$srcdir/"
1215 posrcprefix="../$srcdir/"
1221 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1222 < $srcdir/po/POTFILES.in > po/POTFILES
1226 # progtest.m4 serial 2 (gettext-0.10.40)
1227 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
1228 dnl This file is free software, distributed under the terms of the GNU
1229 dnl General Public License. As a special exception to the GNU General
1230 dnl Public License, this file may be distributed as part of a program
1231 dnl that contains a configuration script generated by Autoconf, under
1232 dnl the same distribution terms as the rest of that program.
1234 dnl This file can can be used in projects which are not available under
1235 dnl the GNU General Public License or the GNU Library General Public
1236 dnl License but which still want to provide support for the GNU gettext
1238 dnl Please note that the actual code of the GNU gettext library is covered
1239 dnl by the GNU Library General Public License, and the rest of the GNU
1240 dnl gettext package package is covered by the GNU General Public License.
1241 dnl They are *not* in the public domain.
1244 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
1246 # Search path for a program which passes the given test.
1248 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1249 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1250 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1251 [# Extract the first word of "$2", so it can be a program name with args.
1252 set dummy $2; ac_word=[$]2
1253 AC_MSG_CHECKING([for $ac_word])
1254 AC_CACHE_VAL(ac_cv_path_$1,
1257 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1260 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1261 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1262 test -z "$ac_dir" && ac_dir=.
1263 if test -f $ac_dir/$ac_word; then
1265 ac_cv_path_$1="$ac_dir/$ac_word"
1271 dnl If no 4th arg is given, leave the cache variable unset,
1272 dnl so AC_PATH_PROGS will keep looking.
1273 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1278 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1279 AC_MSG_RESULT([$]$1)
1286 # lcmessage.m4 serial 2 (gettext-0.10.40)
1287 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1288 dnl This file is free software, distributed under the terms of the GNU
1289 dnl General Public License. As a special exception to the GNU General
1290 dnl Public License, this file may be distributed as part of a program
1291 dnl that contains a configuration script generated by Autoconf, under
1292 dnl the same distribution terms as the rest of that program.
1294 dnl This file can can be used in projects which are not available under
1295 dnl the GNU General Public License or the GNU Library General Public
1296 dnl License but which still want to provide support for the GNU gettext
1298 dnl Please note that the actual code of the GNU gettext library is covered
1299 dnl by the GNU Library General Public License, and the rest of the GNU
1300 dnl gettext package package is covered by the GNU General Public License.
1301 dnl They are *not* in the public domain.
1304 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
1306 # Check whether LC_MESSAGES is available in <locale.h>.
1308 AC_DEFUN([AM_LC_MESSAGES],
1309 [if test $ac_cv_header_locale_h = yes; then
1310 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1311 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1312 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1313 if test $am_cv_val_LC_MESSAGES = yes; then
1314 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1315 [Define if your <locale.h> file defines LC_MESSAGES.])