source: trunk/third/gnome-vfs/aclocal.m4 @ 15858

Revision 15858, 67.2 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15857, which included commits to RCS files with non-trunk default branches.
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13AC_DEFUN(AM_GNOME_CHECK_TYPE,
14  [AC_CACHE_CHECK([$1 in <sys/types.h>], ac_cv_type_$1,
15     [AC_TRY_COMPILE([
16#include <sys/types.h>
17#if STDC_HEADERS
18#include <stdlib.h>
19#include <stddef.h>
20#endif
21],[$1 foo;],
22     ac_cv_type_$1=yes, ac_cv_type_$1=no)])
23   if test $ac_cv_type_$1 = no; then
24      AC_DEFINE($1, $2)
25   fi
26])
27
28AC_DEFUN(AM_GNOME_SIZE_T,
29  [AM_GNOME_CHECK_TYPE(size_t, unsigned)
30   AC_PROVIDE([AC_TYPE_SIZE_T])
31])
32
33AC_DEFUN(AM_GNOME_OFF_T,
34  [AM_GNOME_CHECK_TYPE(off_t, long)
35   AC_PROVIDE([AC_TYPE_OFF_T])
36])
37
38
39# Like AC_CONFIG_HEADER, but automatically create stamp file.
40
41AC_DEFUN(AM_CONFIG_HEADER,
42[AC_PREREQ([2.12])
43AC_CONFIG_HEADER([$1])
44dnl When config.status generates a header, we must update the stamp-h file.
45dnl This file resides in the same directory as the config header
46dnl that is generated.  We must strip everything past the first ":",
47dnl and everything past the last "/".
48AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
49ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
50<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
51<<am_indx=1
52for am_file in <<$1>>; do
53  case " <<$>>CONFIG_HEADERS " in
54  *" <<$>>am_file "*<<)>>
55    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
56    ;;
57  esac
58  am_indx=`expr "<<$>>am_indx" + 1`
59done<<>>dnl>>)
60changequote([,]))])
61
62# Do all the work for Automake.  This macro actually does too much --
63# some checks are only needed if your package does certain things.
64# But this isn't really a big deal.
65
66# serial 1
67
68dnl Usage:
69dnl AM_INIT_AUTOMAKE(package,version, [no-define])
70
71AC_DEFUN(AM_INIT_AUTOMAKE,
72[AC_REQUIRE([AC_PROG_INSTALL])
73PACKAGE=[$1]
74AC_SUBST(PACKAGE)
75VERSION=[$2]
76AC_SUBST(VERSION)
77dnl test to see if srcdir already configured
78if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
79  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
80fi
81ifelse([$3],,
82AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
83AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
84AC_REQUIRE([AM_SANITY_CHECK])
85AC_REQUIRE([AC_ARG_PROGRAM])
86dnl FIXME This is truly gross.
87missing_dir=`cd $ac_aux_dir && pwd`
88AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
89AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
90AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
91AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
92AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
93AC_REQUIRE([AC_PROG_MAKE_SET])])
94
95#
96# Check to make sure that the build environment is sane.
97#
98
99AC_DEFUN(AM_SANITY_CHECK,
100[AC_MSG_CHECKING([whether build environment is sane])
101# Just in case
102sleep 1
103echo timestamp > conftestfile
104# Do `set' in a subshell so we don't clobber the current shell's
105# arguments.  Must try -L first in case configure is actually a
106# symlink; some systems play weird games with the mod time of symlinks
107# (eg FreeBSD returns the mod time of the symlink's containing
108# directory).
109if (
110   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
111   if test "[$]*" = "X"; then
112      # -L didn't work.
113      set X `ls -t $srcdir/configure conftestfile`
114   fi
115   if test "[$]*" != "X $srcdir/configure conftestfile" \
116      && test "[$]*" != "X conftestfile $srcdir/configure"; then
117
118      # If neither matched, then we have a broken ls.  This can happen
119      # if, for instance, CONFIG_SHELL is bash and it inherits a
120      # broken ls alias from the environment.  This has actually
121      # happened.  Such a system could not be considered "sane".
122      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
123alias in your environment])
124   fi
125
126   test "[$]2" = conftestfile
127   )
128then
129   # Ok.
130   :
131else
132   AC_MSG_ERROR([newly created file is older than distributed files!
133Check your system clock])
134fi
135rm -f conftest*
136AC_MSG_RESULT(yes)])
137
138dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
139dnl The program must properly implement --version.
140AC_DEFUN(AM_MISSING_PROG,
141[AC_MSG_CHECKING(for working $2)
142# Run test in a subshell; some versions of sh will print an error if
143# an executable is not found, even if stderr is redirected.
144# Redirect stdin to placate older versions of autoconf.  Sigh.
145if ($2 --version) < /dev/null > /dev/null 2>&1; then
146   $1=$2
147   AC_MSG_RESULT(found)
148else
149   $1="$3/missing $2"
150   AC_MSG_RESULT(missing)
151fi
152AC_SUBST($1)])
153
154# aclocal-include.m4
155#
156# This macro adds the name macrodir to the set of directories
157# that `aclocal' searches for macros. 
158
159# serial 1
160
161dnl AM_ACLOCAL_INCLUDE(macrodir)
162AC_DEFUN([AM_ACLOCAL_INCLUDE],
163[
164        AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
165
166        test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
167
168        for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
169])
170
171# Define a conditional.
172
173AC_DEFUN(AM_CONDITIONAL,
174[AC_SUBST($1_TRUE)
175AC_SUBST($1_FALSE)
176if $2; then
177  $1_TRUE=
178  $1_FALSE='#'
179else
180  $1_TRUE='#'
181  $1_FALSE=
182fi])
183
184# Add --enable-maintainer-mode option to configure.
185# From Jim Meyering
186
187# serial 1
188
189AC_DEFUN(AM_MAINTAINER_MODE,
190[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
191  dnl maintainer-mode is disabled by default
192  AC_ARG_ENABLE(maintainer-mode,
193[  --enable-maintainer-mode enable make rules and dependencies not useful
194                          (and sometimes confusing) to the casual installer],
195      USE_MAINTAINER_MODE=$enableval,
196      USE_MAINTAINER_MODE=no)
197  AC_MSG_RESULT($USE_MAINTAINER_MODE)
198  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
199  MAINT=$MAINTAINER_MODE_TRUE
200  AC_SUBST(MAINT)dnl
201]
202)
203
204
205# serial 1 AC_PROG_XML_I18N_TOOLS
206AC_DEFUN(AC_PROG_XML_I18N_TOOLS,
207[
208
209dnl This is a hack - we use the expansion of AC_SUBST instead of
210dnl AC_SUBST itself to avoid automake putting
211dnl XML_I18N_MERGE_OAF_RULE = @XML_I18N_MERGE_OAF_RULE@
212dnl in all the Makefile.in's
213XML_I18N_MERGE_OAF_RULE='\%.oaf : \%.oaf.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\
214        $(top_builddir)/xml-i18n-merge -o $(top_srcdir)/po $< [$]*.oaf'
215AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
216s%@XML_I18N_MERGE_OAF_RULE@%[$]XML_I18N_MERGE_OAF_RULE%g
217AC_DIVERT_POP()dnl
218
219dnl same deal
220XML_I18N_MERGE_KEYS_RULE='\%.keys : \%.keys.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\
221        $(top_builddir)/xml-i18n-merge -k $(top_srcdir)/po $< [$]*.keys'
222AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
223s%@XML_I18N_MERGE_KEYS_RULE@%[$]XML_I18N_MERGE_KEYS_RULE%g
224AC_DIVERT_POP()dnl
225
226dnl same deal
227XML_I18N_MERGE_DESKTOP_RULE='\%.desktop : \%.desktop.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\
228        $(top_builddir)/xml-i18n-merge -d $(top_srcdir)/po $< [$]*.desktop'
229AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
230s%@XML_I18N_MERGE_DESKTOP_RULE@%[$]XML_I18N_MERGE_DESKTOP_RULE%g
231AC_DIVERT_POP()dnl
232
233# Always use our own xml-i18n-tools.
234XML_I18N_EXTRACT='$(top_builddir)/xml-i18n-extract'
235AC_SUBST(XML_I18N_EXTRACT)dnl
236
237XML_I18N_MERGE='$(top_builddir)/xml-i18n-merge'
238AC_SUBST(XML_I18N_MERGE)dnl
239
240XML_I18N_UPDATE='$(top_builddir)/xml-i18n-update'
241AC_SUBST(XML_I18N_UPDATE)dnl
242
243AC_PATH_PROG(XML_I18N_TOOLS_PERL, perl)
244if test -z "$XML_I18N_TOOLS_PERL"; then
245   AC_MSG_ERROR([perl not found; required for xml-i18n-tools])
246fi
247if test -z "`$XML_I18N_TOOLS_PERL -v | fgrep '5.' 2> /dev/null`"; then
248   AC_MSG_ERROR([perl 5.x required for xml-i18n-tools])
249fi
250
251dnl  manually sed perl in so people don't have to put the xml-i18n-tools scripts in their
252dnl  AC_OUTPUT
253AC_OUTPUT_COMMANDS([
254sed -e "s:@XML_I18N_TOOLS_PERL@:${XML_I18N_TOOLS_PERL}:;" < ${ac_given_srcdir}/xml-i18n-extract.in > xml-i18n-extract;
255chmod ugo+x xml-i18n-extract;
256
257sed -e "s:@XML_I18N_TOOLS_PERL@:${XML_I18N_TOOLS_PERL}:;" < ${ac_given_srcdir}/xml-i18n-merge.in > xml-i18n-merge;
258chmod ugo+x xml-i18n-merge;
259
260sed -e "s:@XML_I18N_TOOLS_PERL@:${XML_I18N_TOOLS_PERL}:;" < ${ac_given_srcdir}/xml-i18n-update.in > xml-i18n-update;
261chmod ugo+x xml-i18n-update;
262], XML_I18N_TOOLS_PERL=${XML_I18N_TOOLS_PERL})
263
264# Redirect the config.log output again, so that the ltconfig log is not
265# clobbered by the next message.
266exec 5>>./config.log
267])
268
269dnl old names
270AC_DEFUN(AM_PROG_XML_I18N_TOOLS, [indir([AC_PROG_XML_I18N_TOOLS])])dnl
271
272
273# serial 40 AC_PROG_LIBTOOL
274AC_DEFUN(AC_PROG_LIBTOOL,
275[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
276
277# Save cache, so that ltconfig can load it
278AC_CACHE_SAVE
279
280# Actually configure libtool.  ac_aux_dir is where install-sh is found.
281CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
282LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
283LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
284DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
285${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
286$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
287|| AC_MSG_ERROR([libtool configure failed])
288
289# Reload cache, that may have been modified by ltconfig
290AC_CACHE_LOAD
291
292# This can be used to rebuild libtool when needed
293LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
294
295# Always use our own libtool.
296LIBTOOL='$(SHELL) $(top_builddir)/libtool'
297AC_SUBST(LIBTOOL)dnl
298
299# Redirect the config.log output again, so that the ltconfig log is not
300# clobbered by the next message.
301exec 5>>./config.log
302])
303
304AC_DEFUN(AC_LIBTOOL_SETUP,
305[AC_PREREQ(2.13)dnl
306AC_REQUIRE([AC_ENABLE_SHARED])dnl
307AC_REQUIRE([AC_ENABLE_STATIC])dnl
308AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
309AC_REQUIRE([AC_CANONICAL_HOST])dnl
310AC_REQUIRE([AC_CANONICAL_BUILD])dnl
311AC_REQUIRE([AC_PROG_RANLIB])dnl
312AC_REQUIRE([AC_PROG_CC])dnl
313AC_REQUIRE([AC_PROG_LD])dnl
314AC_REQUIRE([AC_PROG_NM])dnl
315AC_REQUIRE([AC_PROG_LN_S])dnl
316dnl
317
318case "$target" in
319NONE) lt_target="$host" ;;
320*) lt_target="$target" ;;
321esac
322
323# Check for any special flags to pass to ltconfig.
324#
325# the following will cause an existing older ltconfig to fail, so
326# we ignore this at the expense of the cache file... Checking this
327# will just take longer ... bummer!
328#libtool_flags="--cache-file=$cache_file"
329#
330test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
331test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
332test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
333test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
334test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
335ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
336[libtool_flags="$libtool_flags --enable-dlopen"])
337ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
338[libtool_flags="$libtool_flags --enable-win32-dll"])
339AC_ARG_ENABLE(libtool-lock,
340  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
341test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
342test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
343
344# Some flags need to be propagated to the compiler or linker for good
345# libtool support.
346case "$lt_target" in
347*-*-irix6*)
348  # Find out which ABI we are using.
349  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
350  if AC_TRY_EVAL(ac_compile); then
351    case "`/usr/bin/file conftest.o`" in
352    *32-bit*)
353      LD="${LD-ld} -32"
354      ;;
355    *N32*)
356      LD="${LD-ld} -n32"
357      ;;
358    *64-bit*)
359      LD="${LD-ld} -64"
360      ;;
361    esac
362  fi
363  rm -rf conftest*
364  ;;
365
366*-*-sco3.2v5*)
367  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
368  SAVE_CFLAGS="$CFLAGS"
369  CFLAGS="$CFLAGS -belf"
370  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
371    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
372  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
373    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
374    CFLAGS="$SAVE_CFLAGS"
375  fi
376  ;;
377
378ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
379[*-*-cygwin* | *-*-mingw*)
380  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
381  AC_CHECK_TOOL(AS, as, false)
382  AC_CHECK_TOOL(OBJDUMP, objdump, false)
383  ;;
384])
385esac
386])
387
388# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
389AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
390
391# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
392AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
393
394# AC_ENABLE_SHARED - implement the --enable-shared flag
395# Usage: AC_ENABLE_SHARED[(DEFAULT)]
396#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
397#   `yes'.
398AC_DEFUN(AC_ENABLE_SHARED, [dnl
399define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
400AC_ARG_ENABLE(shared,
401changequote(<<, >>)dnl
402<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
403changequote([, ])dnl
404[p=${PACKAGE-default}
405case "$enableval" in
406yes) enable_shared=yes ;;
407no) enable_shared=no ;;
408*)
409  enable_shared=no
410  # Look at the argument we got.  We use all the common list separators.
411  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
412  for pkg in $enableval; do
413    if test "X$pkg" = "X$p"; then
414      enable_shared=yes
415    fi
416  done
417  IFS="$ac_save_ifs"
418  ;;
419esac],
420enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
421])
422
423# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
424AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
425AC_ENABLE_SHARED(no)])
426
427# AC_ENABLE_STATIC - implement the --enable-static flag
428# Usage: AC_ENABLE_STATIC[(DEFAULT)]
429#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
430#   `yes'.
431AC_DEFUN(AC_ENABLE_STATIC, [dnl
432define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
433AC_ARG_ENABLE(static,
434changequote(<<, >>)dnl
435<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
436changequote([, ])dnl
437[p=${PACKAGE-default}
438case "$enableval" in
439yes) enable_static=yes ;;
440no) enable_static=no ;;
441*)
442  enable_static=no
443  # Look at the argument we got.  We use all the common list separators.
444  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
445  for pkg in $enableval; do
446    if test "X$pkg" = "X$p"; then
447      enable_static=yes
448    fi
449  done
450  IFS="$ac_save_ifs"
451  ;;
452esac],
453enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
454])
455
456# AC_DISABLE_STATIC - set the default static flag to --disable-static
457AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
458AC_ENABLE_STATIC(no)])
459
460
461# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
462# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
463#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
464#   `yes'.
465AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
466define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
467AC_ARG_ENABLE(fast-install,
468changequote(<<, >>)dnl
469<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
470changequote([, ])dnl
471[p=${PACKAGE-default}
472case "$enableval" in
473yes) enable_fast_install=yes ;;
474no) enable_fast_install=no ;;
475*)
476  enable_fast_install=no
477  # Look at the argument we got.  We use all the common list separators.
478  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
479  for pkg in $enableval; do
480    if test "X$pkg" = "X$p"; then
481      enable_fast_install=yes
482    fi
483  done
484  IFS="$ac_save_ifs"
485  ;;
486esac],
487enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
488])
489
490# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
491AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
492AC_ENABLE_FAST_INSTALL(no)])
493
494# AC_PROG_LD - find the path to the GNU or non-GNU linker
495AC_DEFUN(AC_PROG_LD,
496[AC_ARG_WITH(gnu-ld,
497[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
498test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
499AC_REQUIRE([AC_PROG_CC])dnl
500AC_REQUIRE([AC_CANONICAL_HOST])dnl
501AC_REQUIRE([AC_CANONICAL_BUILD])dnl
502ac_prog=ld
503if test "$ac_cv_prog_gcc" = yes; then
504  # Check if gcc -print-prog-name=ld gives a path.
505  AC_MSG_CHECKING([for ld used by GCC])
506  ac_prog=`($CC -print-prog-name=ld) 2>&5`
507  case "$ac_prog" in
508    # Accept absolute paths.
509changequote(,)dnl
510    [\\/]* | [A-Za-z]:[\\/]*)
511      re_direlt='/[^/][^/]*/\.\./'
512changequote([,])dnl
513      # Canonicalize the path of ld
514      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
515      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
516        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
517      done
518      test -z "$LD" && LD="$ac_prog"
519      ;;
520  "")
521    # If it fails, then pretend we aren't using GCC.
522    ac_prog=ld
523    ;;
524  *)
525    # If it is relative, then search for the first ld in PATH.
526    with_gnu_ld=unknown
527    ;;
528  esac
529elif test "$with_gnu_ld" = yes; then
530  AC_MSG_CHECKING([for GNU ld])
531else
532  AC_MSG_CHECKING([for non-GNU ld])
533fi
534AC_CACHE_VAL(ac_cv_path_LD,
535[if test -z "$LD"; then
536  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
537  for ac_dir in $PATH; do
538    test -z "$ac_dir" && ac_dir=.
539    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
540      ac_cv_path_LD="$ac_dir/$ac_prog"
541      # Check to see if the program is GNU ld.  I'd rather use --version,
542      # but apparently some GNU ld's only accept -v.
543      # Break only if it was the GNU/non-GNU ld that we prefer.
544      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
545        test "$with_gnu_ld" != no && break
546      else
547        test "$with_gnu_ld" != yes && break
548      fi
549    fi
550  done
551  IFS="$ac_save_ifs"
552else
553  ac_cv_path_LD="$LD" # Let the user override the test with a path.
554fi])
555LD="$ac_cv_path_LD"
556if test -n "$LD"; then
557  AC_MSG_RESULT($LD)
558else
559  AC_MSG_RESULT(no)
560fi
561test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
562AC_PROG_LD_GNU
563])
564
565AC_DEFUN(AC_PROG_LD_GNU,
566[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
567[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
568if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
569  ac_cv_prog_gnu_ld=yes
570else
571  ac_cv_prog_gnu_ld=no
572fi])
573])
574
575# AC_PROG_NM - find the path to a BSD-compatible name lister
576AC_DEFUN(AC_PROG_NM,
577[AC_MSG_CHECKING([for BSD-compatible nm])
578AC_CACHE_VAL(ac_cv_path_NM,
579[if test -n "$NM"; then
580  # Let the user override the test.
581  ac_cv_path_NM="$NM"
582else
583  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
584  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
585    test -z "$ac_dir" && ac_dir=.
586    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
587      # Check to see if the nm accepts a BSD-compat flag.
588      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
589      #   nm: unknown option "B" ignored
590      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
591        ac_cv_path_NM="$ac_dir/nm -B"
592        break
593      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
594        ac_cv_path_NM="$ac_dir/nm -p"
595        break
596      else
597        ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
598        continue # so that we can try to find one that supports BSD flags
599      fi
600    fi
601  done
602  IFS="$ac_save_ifs"
603  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
604fi])
605NM="$ac_cv_path_NM"
606AC_MSG_RESULT([$NM])
607])
608
609# AC_CHECK_LIBM - check for math library
610AC_DEFUN(AC_CHECK_LIBM,
611[AC_REQUIRE([AC_CANONICAL_HOST])dnl
612LIBM=
613case "$lt_target" in
614*-*-beos* | *-*-cygwin*)
615  # These system don't have libm
616  ;;
617*-ncr-sysv4.3*)
618  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
619  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
620  ;;
621*)
622  AC_CHECK_LIB(m, main, LIBM="-lm")
623  ;;
624esac
625])
626
627# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
628# the libltdl convenience library and INCLTDL to the include flags for
629# the libltdl header and adds --enable-ltdl-convenience to the
630# configure arguments.  Note that LIBLTDL and INCLTDL are not
631# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
632# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
633# with '${top_builddir}/' and INCLTDL will be prefixed with
634# '${top_srcdir}/' (note the single quotes!).  If your package is not
635# flat and you're not using automake, define top_builddir and
636# top_srcdir appropriately in the Makefiles.
637AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
638  case "$enable_ltdl_convenience" in
639  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
640  "") enable_ltdl_convenience=yes
641      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
642  esac
643  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
644  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
645])
646
647# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
648# the libltdl installable library and INCLTDL to the include flags for
649# the libltdl header and adds --enable-ltdl-install to the configure
650# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
651# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
652# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
653# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
654# with '${top_srcdir}/' (note the single quotes!).  If your package is
655# not flat and you're not using automake, define top_builddir and
656# top_srcdir appropriately in the Makefiles.
657# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
658AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
659  AC_CHECK_LIB(ltdl, main,
660  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
661  [if test x"$enable_ltdl_install" = xno; then
662     AC_MSG_WARN([libltdl not installed, but installation disabled])
663   else
664     enable_ltdl_install=yes
665   fi
666  ])
667  if test x"$enable_ltdl_install" = x"yes"; then
668    ac_configure_args="$ac_configure_args --enable-ltdl-install"
669    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
670    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
671  else
672    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
673    LIBLTDL="-lltdl"
674    INCLTDL=
675  fi
676])
677
678dnl old names
679AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
680AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
681AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
682AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
683AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
684AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
685AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
686
687dnl This is just to silence aclocal about the macro not being used
688ifelse([AC_DISABLE_FAST_INSTALL])dnl
689
690dnl
691dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
692dnl
693dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
694dnl is not found.
695dnl
696
697AC_DEFUN([GNOME_INIT_HOOK],[
698        AC_SUBST(GNOME_LIBS)
699        AC_SUBST(GNOMEUI_LIBS)
700        AC_SUBST(GNOMEGNORBA_LIBS)
701        AC_SUBST(GTKXMHTML_LIBS)
702        AC_SUBST(ZVT_LIBS)
703        AC_SUBST(GNOME_LIBDIR)
704        AC_SUBST(GNOME_INCLUDEDIR)
705
706        AC_ARG_WITH(gnome-includes,
707        [  --with-gnome-includes   Specify location of GNOME headers],[
708        CFLAGS="$CFLAGS -I$withval"
709        ])
710       
711        AC_ARG_WITH(gnome-libs,
712        [  --with-gnome-libs       Specify location of GNOME libs],[
713        LDFLAGS="$LDFLAGS -L$withval"
714        gnome_prefix=$withval
715        ])
716
717        AC_ARG_WITH(gnome,
718        [  --with-gnome            Specify prefix for GNOME files],
719                if test x$withval = xyes; then
720                        want_gnome=yes
721                        dnl Note that an empty true branch is not
722                        dnl valid sh syntax.
723                        ifelse([$1], [], :, [$1])
724                else
725                        if test "x$withval" = xno; then
726                                want_gnome=no
727                        else
728                                want_gnome=yes
729                                LDFLAGS="$LDFLAGS -L$withval/lib"
730                                CFLAGS="$CFLAGS -I$withval/include"
731                                gnome_prefix=$withval/lib
732                        fi
733                fi,
734                want_gnome=yes)
735
736        if test "x$want_gnome" = xyes; then
737
738            AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
739            if test "$GNOME_CONFIG" = "no"; then
740              no_gnome_config="yes"
741            else
742              AC_MSG_CHECKING(if $GNOME_CONFIG works)
743              if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
744                AC_MSG_RESULT(yes)
745                GNOME_GNORBA_HOOK([],$2)
746                GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
747                GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
748                GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
749                GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
750                ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
751                GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
752                GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
753                $1
754              else
755                AC_MSG_RESULT(no)
756                no_gnome_config="yes"
757              fi
758            fi
759
760            if test x$exec_prefix = xNONE; then
761                if test x$prefix = xNONE; then
762                    gnome_prefix=$ac_default_prefix/lib
763                else
764                    gnome_prefix=$prefix/lib
765                fi
766            else
767                gnome_prefix=`eval echo \`echo $libdir\``
768            fi
769       
770            if test "$no_gnome_config" = "yes"; then
771              AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
772              if test -f $gnome_prefix/gnomeConf.sh; then
773                AC_MSG_RESULT(found)
774                echo "loading gnome configuration from" \
775                     "$gnome_prefix/gnomeConf.sh"
776                . $gnome_prefix/gnomeConf.sh
777                $1
778              else
779                AC_MSG_RESULT(not found)
780                if test x$2 = xfail; then
781                  AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
782                fi
783              fi
784            fi
785        fi
786
787        if test -n "$3"; then
788          n="$3"
789          for i in $n; do
790            AC_MSG_CHECKING(extra library \"$i\")
791            case $i in
792              applets)
793                AC_SUBST(GNOME_APPLETS_LIBS)
794                GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
795                AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
796              docklets)
797                AC_SUBST(GNOME_DOCKLETS_LIBS)
798                GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
799                AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
800              capplet)
801                AC_SUBST(GNOME_CAPPLET_LIBS)
802                GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
803                AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
804              *)
805                AC_MSG_RESULT(unknown library)
806            esac
807          done
808        fi
809])
810
811dnl
812dnl GNOME_INIT ([additional-inits])
813dnl
814
815AC_DEFUN([GNOME_INIT],[
816        GNOME_INIT_HOOK([],fail,$1)
817])
818
819dnl
820dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
821dnl
822dnl if failflag is "failure" it aborts if gnorba is not found.
823dnl
824
825AC_DEFUN([GNOME_GNORBA_HOOK],[
826        GNOME_ORBIT_HOOK([],$2)
827        AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
828                gnome_cv_gnorba_found=no
829                if test x$gnome_cv_orbit_found = xyes; then
830                        GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
831                        GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
832                        if test -n "$GNORBA_LIBS"; then
833                                gnome_cv_gnorba_found=yes
834                        fi
835                fi
836        ])
837        AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
838        if test x$gnome_cv_orbit_found = xyes; then
839                $1
840                GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
841                GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
842                AC_SUBST(GNORBA_CFLAGS)
843                AC_SUBST(GNORBA_LIBS)
844        else
845                if test x$2 = xfailure; then
846                        AC_MSG_ERROR(gnorba library not installed or installation problem)
847                fi
848        fi
849])
850
851AC_DEFUN([GNOME_GNORBA_CHECK], [
852        GNOME_GNORBA_HOOK([],failure)
853])
854
855dnl
856dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
857dnl
858dnl if failflag is "failure" it aborts if orbit is not found.
859dnl
860
861AC_DEFUN([GNOME_ORBIT_HOOK],[
862        AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
863        AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
864        AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
865                if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
866                        gnome_cv_orbit_found=no
867                else
868                        gnome_cv_orbit_found=yes
869                fi
870        ])
871        AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
872        if test x$gnome_cv_orbit_found = xyes; then
873                $1
874                ORBIT_CFLAGS=`orbit-config --cflags client server`
875                ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
876                AC_SUBST(ORBIT_CFLAGS)
877                AC_SUBST(ORBIT_LIBS)
878        else
879                if test x$2 = xfailure; then
880                        AC_MSG_ERROR(ORBit not installed or installation problem)
881                fi
882        fi
883])
884
885AC_DEFUN([GNOME_ORBIT_CHECK], [
886        GNOME_ORBIT_HOOK([],failure)
887])
888
889# Configure paths for GLIB
890# Owen Taylor     97-11-3
891
892dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
893dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
894dnl gthread is specified in MODULES, pass to glib-config
895dnl
896AC_DEFUN(AM_PATH_GLIB,
897[dnl
898dnl Get the cflags and libraries from the glib-config script
899dnl
900AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
901            glib_config_prefix="$withval", glib_config_prefix="")
902AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
903            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
904AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
905                    , enable_glibtest=yes)
906
907  if test x$glib_config_exec_prefix != x ; then
908     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
909     if test x${GLIB_CONFIG+set} != xset ; then
910        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
911     fi
912  fi
913  if test x$glib_config_prefix != x ; then
914     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
915     if test x${GLIB_CONFIG+set} != xset ; then
916        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
917     fi
918  fi
919
920  for module in . $4
921  do
922      case "$module" in
923         gmodule)
924             glib_config_args="$glib_config_args gmodule"
925         ;;
926         gthread)
927             glib_config_args="$glib_config_args gthread"
928         ;;
929      esac
930  done
931
932  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
933  min_glib_version=ifelse([$1], ,0.99.7,$1)
934  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
935  no_glib=""
936  if test "$GLIB_CONFIG" = "no" ; then
937    no_glib=yes
938  else
939    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
940    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
941    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
942           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
943    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
944           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
945    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
946           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
947    if test "x$enable_glibtest" = "xyes" ; then
948      ac_save_CFLAGS="$CFLAGS"
949      ac_save_LIBS="$LIBS"
950      CFLAGS="$CFLAGS $GLIB_CFLAGS"
951      LIBS="$GLIB_LIBS $LIBS"
952dnl
953dnl Now check if the installed GLIB is sufficiently new. (Also sanity
954dnl checks the results of glib-config to some extent
955dnl
956      rm -f conf.glibtest
957      AC_TRY_RUN([
958#include <glib.h>
959#include <stdio.h>
960#include <stdlib.h>
961
962int
963main ()
964{
965  int major, minor, micro;
966  char *tmp_version;
967
968  system ("touch conf.glibtest");
969
970  /* HP/UX 9 (%@#!) writes to sscanf strings */
971  tmp_version = g_strdup("$min_glib_version");
972  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
973     printf("%s, bad version string\n", "$min_glib_version");
974     exit(1);
975   }
976
977  if ((glib_major_version != $glib_config_major_version) ||
978      (glib_minor_version != $glib_config_minor_version) ||
979      (glib_micro_version != $glib_config_micro_version))
980    {
981      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
982             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
983             glib_major_version, glib_minor_version, glib_micro_version);
984      printf ("*** was found! If glib-config was correct, then it is best\n");
985      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
986      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
987      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
988      printf("*** required on your system.\n");
989      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
990      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
991      printf("*** before re-running configure\n");
992    }
993  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
994           (glib_minor_version != GLIB_MINOR_VERSION) ||
995           (glib_micro_version != GLIB_MICRO_VERSION))
996    {
997      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
998             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
999      printf("*** library (version %d.%d.%d)\n",
1000             glib_major_version, glib_minor_version, glib_micro_version);
1001    }
1002  else
1003    {
1004      if ((glib_major_version > major) ||
1005        ((glib_major_version == major) && (glib_minor_version > minor)) ||
1006        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
1007      {
1008        return 0;
1009       }
1010     else
1011      {
1012        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
1013               glib_major_version, glib_minor_version, glib_micro_version);
1014        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
1015               major, minor, micro);
1016        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
1017        printf("***\n");
1018        printf("*** If you have already installed a sufficiently new version, this error\n");
1019        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
1020        printf("*** being found. The easiest way to fix this is to remove the old version\n");
1021        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
1022        printf("*** correct copy of glib-config. (In this case, you will have to\n");
1023        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1024        printf("*** so that the correct libraries are found at run-time))\n");
1025      }
1026    }
1027  return 1;
1028}
1029],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1030       CFLAGS="$ac_save_CFLAGS"
1031       LIBS="$ac_save_LIBS"
1032     fi
1033  fi
1034  if test "x$no_glib" = x ; then
1035     AC_MSG_RESULT(yes)
1036     ifelse([$2], , :, [$2])     
1037  else
1038     AC_MSG_RESULT(no)
1039     if test "$GLIB_CONFIG" = "no" ; then
1040       echo "*** The glib-config script installed by GLIB could not be found"
1041       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
1042       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
1043       echo "*** full path to glib-config."
1044     else
1045       if test -f conf.glibtest ; then
1046        :
1047       else
1048          echo "*** Could not run GLIB test program, checking why..."
1049          CFLAGS="$CFLAGS $GLIB_CFLAGS"
1050          LIBS="$LIBS $GLIB_LIBS"
1051          AC_TRY_LINK([
1052#include <glib.h>
1053#include <stdio.h>
1054],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
1055        [ echo "*** The test program compiled, but did not run. This usually means"
1056          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
1057          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
1058          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1059          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1060          echo "*** is required on your system"
1061          echo "***"
1062          echo "*** If you have an old version installed, it is best to remove it, although"
1063          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1064          echo "***"
1065          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1066          echo "*** came with the system with the command"
1067          echo "***"
1068          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
1069        [ echo "*** The test program failed to compile or link. See the file config.log for the"
1070          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
1071          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
1072          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
1073          CFLAGS="$ac_save_CFLAGS"
1074          LIBS="$ac_save_LIBS"
1075       fi
1076     fi
1077     GLIB_CFLAGS=""
1078     GLIB_LIBS=""
1079     ifelse([$3], , :, [$3])
1080  fi
1081  AC_SUBST(GLIB_CFLAGS)
1082  AC_SUBST(GLIB_LIBS)
1083  rm -f conf.glibtest
1084])
1085
1086# Configure paths for GTK+
1087# Owen Taylor     97-11-3
1088
1089dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1090dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
1091dnl
1092AC_DEFUN(AM_PATH_GTK,
1093[dnl
1094dnl Get the cflags and libraries from the gtk-config script
1095dnl
1096AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
1097            gtk_config_prefix="$withval", gtk_config_prefix="")
1098AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
1099            gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
1100AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
1101                    , enable_gtktest=yes)
1102
1103  for module in . $4
1104  do
1105      case "$module" in
1106         gthread)
1107             gtk_config_args="$gtk_config_args gthread"
1108         ;;
1109      esac
1110  done
1111
1112  if test x$gtk_config_exec_prefix != x ; then
1113     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
1114     if test x${GTK_CONFIG+set} != xset ; then
1115        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
1116     fi
1117  fi
1118  if test x$gtk_config_prefix != x ; then
1119     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
1120     if test x${GTK_CONFIG+set} != xset ; then
1121        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
1122     fi
1123  fi
1124
1125  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
1126  min_gtk_version=ifelse([$1], ,0.99.7,$1)
1127  AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
1128  no_gtk=""
1129  if test "$GTK_CONFIG" = "no" ; then
1130    no_gtk=yes
1131  else
1132    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
1133    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
1134    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
1135           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1136    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
1137           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1138    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
1139           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1140    if test "x$enable_gtktest" = "xyes" ; then
1141      ac_save_CFLAGS="$CFLAGS"
1142      ac_save_LIBS="$LIBS"
1143      CFLAGS="$CFLAGS $GTK_CFLAGS"
1144      LIBS="$GTK_LIBS $LIBS"
1145dnl
1146dnl Now check if the installed GTK is sufficiently new. (Also sanity
1147dnl checks the results of gtk-config to some extent
1148dnl
1149      rm -f conf.gtktest
1150      AC_TRY_RUN([
1151#include <gtk/gtk.h>
1152#include <stdio.h>
1153#include <stdlib.h>
1154
1155int
1156main ()
1157{
1158  int major, minor, micro;
1159  char *tmp_version;
1160
1161  system ("touch conf.gtktest");
1162
1163  /* HP/UX 9 (%@#!) writes to sscanf strings */
1164  tmp_version = g_strdup("$min_gtk_version");
1165  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
1166     printf("%s, bad version string\n", "$min_gtk_version");
1167     exit(1);
1168   }
1169
1170  if ((gtk_major_version != $gtk_config_major_version) ||
1171      (gtk_minor_version != $gtk_config_minor_version) ||
1172      (gtk_micro_version != $gtk_config_micro_version))
1173    {
1174      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
1175             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1176             gtk_major_version, gtk_minor_version, gtk_micro_version);
1177      printf ("*** was found! If gtk-config was correct, then it is best\n");
1178      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1179      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1180      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1181      printf("*** required on your system.\n");
1182      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
1183      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
1184      printf("*** before re-running configure\n");
1185    }
1186#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
1187  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1188           (gtk_minor_version != GTK_MINOR_VERSION) ||
1189           (gtk_micro_version != GTK_MICRO_VERSION))
1190    {
1191      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1192             GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1193      printf("*** library (version %d.%d.%d)\n",
1194             gtk_major_version, gtk_minor_version, gtk_micro_version);
1195    }
1196#endif /* defined (GTK_MAJOR_VERSION) ... */
1197  else
1198    {
1199      if ((gtk_major_version > major) ||
1200        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1201        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1202      {
1203        return 0;
1204       }
1205     else
1206      {
1207        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1208               gtk_major_version, gtk_minor_version, gtk_micro_version);
1209        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1210               major, minor, micro);
1211        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1212        printf("***\n");
1213        printf("*** If you have already installed a sufficiently new version, this error\n");
1214        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
1215        printf("*** being found. The easiest way to fix this is to remove the old version\n");
1216        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
1217        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
1218        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1219        printf("*** so that the correct libraries are found at run-time))\n");
1220      }
1221    }
1222  return 1;
1223}
1224],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1225       CFLAGS="$ac_save_CFLAGS"
1226       LIBS="$ac_save_LIBS"
1227     fi
1228  fi
1229  if test "x$no_gtk" = x ; then
1230     AC_MSG_RESULT(yes)
1231     ifelse([$2], , :, [$2])     
1232  else
1233     AC_MSG_RESULT(no)
1234     if test "$GTK_CONFIG" = "no" ; then
1235       echo "*** The gtk-config script installed by GTK could not be found"
1236       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1237       echo "*** your path, or set the GTK_CONFIG environment variable to the"
1238       echo "*** full path to gtk-config."
1239     else
1240       if test -f conf.gtktest ; then
1241        :
1242       else
1243          echo "*** Could not run GTK test program, checking why..."
1244          CFLAGS="$CFLAGS $GTK_CFLAGS"
1245          LIBS="$LIBS $GTK_LIBS"
1246          AC_TRY_LINK([
1247#include <gtk/gtk.h>
1248#include <stdio.h>
1249],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1250        [ echo "*** The test program compiled, but did not run. This usually means"
1251          echo "*** that the run-time linker is not finding GTK or finding the wrong"
1252          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1253          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1254          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1255          echo "*** is required on your system"
1256          echo "***"
1257          echo "*** If you have an old version installed, it is best to remove it, although"
1258          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1259          echo "***"
1260          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1261          echo "*** came with the system with the command"
1262          echo "***"
1263          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
1264        [ echo "*** The test program failed to compile or link. See the file config.log for the"
1265          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1266          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1267          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
1268          CFLAGS="$ac_save_CFLAGS"
1269          LIBS="$ac_save_LIBS"
1270       fi
1271     fi
1272     GTK_CFLAGS=""
1273     GTK_LIBS=""
1274     ifelse([$3], , :, [$3])
1275  fi
1276  AC_SUBST(GTK_CFLAGS)
1277  AC_SUBST(GTK_LIBS)
1278  rm -f conf.gtktest
1279])
1280
1281dnl GNOME_COMPILE_WARNINGS
1282dnl Turn on many useful compiler warnings
1283dnl For now, only works on GCC
1284AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1285  AC_ARG_ENABLE(compile-warnings,
1286    [  --enable-compile-warnings=[no/minimum/yes]       Turn on compiler warnings.],,enable_compile_warnings=minimum)
1287
1288  AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1289  warnCFLAGS=
1290  if test "x$GCC" != xyes; then
1291    enable_compile_warnings=no
1292  fi
1293
1294  if test "x$enable_compile_warnings" != "xno"; then
1295    if test "x$GCC" = "xyes"; then
1296      case " $CFLAGS " in
1297      *[\ \     ]-Wall[\ \      ]*) ;;
1298      *) warnCFLAGS="-Wall -Wunused" ;;
1299      esac
1300
1301      ## -W is not all that useful.  And it cannot be controlled
1302      ## with individual -Wno-xxx flags, unlike -Wall
1303      if test "x$enable_compile_warnings" = "xyes"; then
1304        warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations"
1305      fi
1306    fi
1307  fi
1308  AC_MSG_RESULT($warnCFLAGS)
1309
1310  AC_ARG_ENABLE(iso-c,
1311    [  --enable-iso-c          Try to warn if code is not ISO C ],,
1312    enable_iso_c=no)
1313
1314  AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1315  complCFLAGS=
1316  if test "x$enable_iso_c" != "xno"; then
1317    if test "x$GCC" = "xyes"; then
1318      case " $CFLAGS " in
1319      *[\ \     ]-ansi[\ \      ]*) ;;
1320      *) complCFLAGS="$complCFLAGS -ansi" ;;
1321      esac
1322
1323      case " $CFLAGS " in
1324      *[\ \     ]-pedantic[\ \  ]*) ;;
1325      *) complCFLAGS="$complCFLAGS -pedantic" ;;
1326      esac
1327    fi
1328  fi
1329  AC_MSG_RESULT($complCFLAGS)
1330  if test "x$cflags_set" != "xyes"; then
1331    CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
1332    cflags_set=yes
1333    AC_SUBST(cflags_set)
1334  fi
1335])
1336
1337dnl For C++, do basically the same thing.
1338
1339AC_DEFUN([GNOME_CXX_WARNINGS],[
1340  AC_ARG_ENABLE(cxx-warnings,
1341    [  --enable-cxx-warnings=[no/minimum/yes]   Turn on compiler warnings.],,enable_cxx_warnings=minimum)
1342
1343  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1344  warnCXXFLAGS=
1345  if test "x$GCC" != xyes; then
1346    enable_compile_warnings=no
1347  fi
1348  if test "x$enable_cxx_warnings" != "xno"; then
1349    if test "x$GCC" = "xyes"; then
1350      case " $CXXFLAGS " in
1351      *[\ \     ]-Wall[\ \      ]*) ;;
1352      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1353      esac
1354
1355      ## -W is not all that useful.  And it cannot be controlled
1356      ## with individual -Wno-xxx flags, unlike -Wall
1357      if test "x$enable_cxx_warnings" = "xyes"; then
1358        warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual"
1359      fi
1360    fi
1361  fi
1362  AC_MSG_RESULT($warnCXXFLAGS)
1363
1364   AC_ARG_ENABLE(iso-cxx,
1365     [  --enable-iso-cxx          Try to warn if code is not ISO C++ ],,
1366     enable_iso_cxx=no)
1367
1368   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1369   complCXXFLAGS=
1370   if test "x$enable_iso_cxx" != "xno"; then
1371     if test "x$GCC" = "xyes"; then
1372      case " $CXXFLAGS " in
1373      *[\ \     ]-ansi[\ \      ]*) ;;
1374      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1375      esac
1376
1377      case " $CXXFLAGS " in
1378      *[\ \     ]-pedantic[\ \  ]*) ;;
1379      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1380      esac
1381     fi
1382   fi
1383  AC_MSG_RESULT($complCXXFLAGS)
1384  if test "x$cxxflags_set" != "xyes"; then
1385    CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1386    cxxflags_set=yes
1387    AC_SUBST(cxxflags_set)
1388  fi
1389])
1390
1391dnl GNOME_SUPPORT_CHECKS
1392dnl    Check for various support functions needed by the standard
1393dnl    Gnome libraries.  Sets LIBOBJS, might define some macros.
1394dnl    This should only be used when building the Gnome libs;
1395dnl    Gnome clients should not need this macro.
1396AC_DEFUN([GNOME_SUPPORT_CHECKS],[
1397  # we need an `awk' to build `gnomesupport.h'
1398  AC_REQUIRE([AC_PROG_AWK])
1399
1400  # this should go away soon
1401  need_gnome_support=yes
1402
1403  save_LIBOBJS="$LIBOBJS"
1404  LIBOBJS=
1405
1406  AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
1407
1408  # for `scandir'
1409  AC_HEADER_DIRENT
1410
1411  # copied from `configure.in' of `libiberty'
1412  vars="program_invocation_short_name program_invocation_name sys_errlist"
1413  for v in $vars; do
1414    AC_MSG_CHECKING([for $v])
1415    AC_CACHE_VAL(gnome_cv_var_$v,
1416      [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
1417                   [eval "gnome_cv_var_$v=yes"],
1418                   [eval "gnome_cv_var_$v=no"])])
1419    if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then
1420      AC_MSG_RESULT(yes)
1421      n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1422      AC_DEFINE_UNQUOTED($n)
1423    else
1424      AC_MSG_RESULT(no)
1425    fi
1426  done
1427
1428  AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen)
1429  AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf)
1430
1431  AC_CHECK_FUNCS(realpath,,LIBOBJS="$LIBOBJS canonicalize.o")
1432
1433  # to include `error.c' error.c has some HAVE_* checks
1434  AC_CHECK_FUNCS(vprintf doprnt strerror_r)
1435  AM_FUNC_ERROR_AT_LINE
1436
1437  # This is required if we declare setreuid () and setregid ().
1438  AC_TYPE_UID_T
1439
1440  # see if we need to declare some functions.  Solaris is notorious for
1441  # putting functions into the `libc' but not listing them in the headers
1442  AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h)
1443  GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize)
1444  GCC_NEED_DECLARATION(scandir,[
1445#ifdef HAVE_DIRENT_H
1446#include <dirent.h>
1447#endif
1448])
1449
1450  # Turn our LIBOBJS into libtool objects.  This is gross, but it
1451  # requires changes to autoconf before it goes away.
1452  LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
1453  AC_SUBST(need_gnome_support)
1454  AC_SUBST(LTLIBOBJS)
1455
1456  LIBOBJS="$save_LIBOBJS"
1457  AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes)
1458])
1459
1460dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
1461dnl FIXME: Migrate into libit
1462
1463AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
1464[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
1465 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
1466              am_cv_lib_error_at_line=yes,
1467              am_cv_lib_error_at_line=no)])
1468 if test $am_cv_lib_error_at_line = no; then
1469   LIBOBJS="$LIBOBJS error.o"
1470 fi
1471 AC_SUBST(LIBOBJS)dnl
1472])
1473
1474dnl See whether we need a declaration for a function.
1475dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
1476AC_DEFUN([GCC_NEED_DECLARATION],
1477[AC_MSG_CHECKING([whether $1 must be declared])
1478AC_CACHE_VAL(gcc_cv_decl_needed_$1,
1479[AC_TRY_COMPILE([
1480#include <stdio.h>
1481#ifdef HAVE_STRING_H
1482#include <string.h>
1483#else
1484#ifdef HAVE_STRINGS_H
1485#include <strings.h>
1486#endif
1487#endif
1488#ifdef HAVE_STDLIB_H
1489#include <stdlib.h>
1490#endif
1491#ifdef HAVE_UNISTD_H
1492#include <unistd.h>
1493#endif
1494$2],
1495[char *(*pfn) = (char *(*)) $1],
1496eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
1497if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
1498  AC_MSG_RESULT(yes)
1499  gcc_need_declarations="$gcc_need_declarations $1"
1500  gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1501  AC_DEFINE_UNQUOTED($gcc_tr_decl)
1502else
1503  AC_MSG_RESULT(no)
1504fi
1505])dnl
1506
1507dnl Check multiple functions to see whether each needs a declaration.
1508dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
1509AC_DEFUN([GCC_NEED_DECLARATIONS],
1510[for ac_func in $1
1511do
1512GCC_NEED_DECLARATION($ac_func, $2)
1513done
1514]
1515)
1516
1517dnl
1518dnl And better, use gthreads instead...
1519dnl
1520
1521AC_DEFUN([GNOME_PTHREAD_CHECK],[
1522        PTHREAD_LIB=""
1523        AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1524                [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1525                    [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1526                        [AC_CHECK_FUNC(pthread_create)]
1527                    )]
1528                )]
1529        )
1530        AC_SUBST(PTHREAD_LIB)
1531        AC_PROVIDE([GNOME_PTHREAD_CHECK])
1532])
1533
1534# Macro to add for using GNU gettext.
1535# Ulrich Drepper <drepper@cygnus.com>, 1995.
1536#
1537# Modified to never use included libintl.
1538# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1539#
1540#
1541# This file can be copied and used freely without restrictions.  It can
1542# be used in projects which are not available under the GNU Public License
1543# but which still want to provide support for the GNU gettext functionality.
1544# Please note that the actual code is *not* freely available.
1545
1546# serial 5
1547
1548AC_DEFUN([AM_GNOME_WITH_NLS],
1549  [AC_MSG_CHECKING([whether NLS is requested])
1550    dnl Default is enabled NLS
1551    AC_ARG_ENABLE(nls,
1552      [  --disable-nls           do not use Native Language Support],
1553      USE_NLS=$enableval, USE_NLS=yes)
1554    AC_MSG_RESULT($USE_NLS)
1555    AC_SUBST(USE_NLS)
1556
1557    USE_INCLUDED_LIBINTL=no
1558
1559    dnl If we use NLS figure out what method
1560    if test "$USE_NLS" = "yes"; then
1561#      AC_DEFINE(ENABLE_NLS)
1562#      AC_MSG_CHECKING([whether included gettext is requested])
1563#      AC_ARG_WITH(included-gettext,
1564#        [  --with-included-gettext use the GNU gettext library included here],
1565#        nls_cv_force_use_gnu_gettext=$withval,
1566#        nls_cv_force_use_gnu_gettext=no)
1567#      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1568      nls_cv_force_use_gnu_gettext="no"
1569
1570      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1571      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1572        dnl User does not insist on using GNU NLS library.  Figure out what
1573        dnl to use.  If gettext or catgets are available (in this order) we
1574        dnl use this.  Else we have to fall back to GNU NLS library.
1575        dnl catgets is only used if permitted by option --with-catgets.
1576        nls_cv_header_intl=
1577        nls_cv_header_libgt=
1578        CATOBJEXT=NONE
1579
1580        AC_CHECK_HEADER(libintl.h,
1581          [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
1582            [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
1583               gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
1584
1585           if test "$gt_cv_func_gettext_libc" != "yes"; then
1586             AC_CHECK_LIB(intl, bindtextdomain,
1587               [AC_CACHE_CHECK([for gettext in libintl],
1588                 gt_cv_func_gettext_libintl,
1589                 [AC_CHECK_LIB(intl, gettext,
1590                  gt_cv_func_gettext_libintl=yes,
1591                  gt_cv_func_gettext_libintl=no)],
1592                 gt_cv_func_gettext_libintl=no)])
1593           fi
1594
1595           if test "$gt_cv_func_gettext_libc" = "yes" \
1596              || test "$gt_cv_func_gettext_libintl" = "yes"; then
1597              AC_DEFINE(HAVE_GETTEXT)
1598              AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1599                [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1600              if test "$MSGFMT" != "no"; then
1601                AC_CHECK_FUNCS(dcgettext)
1602                AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1603                AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1604                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1605                AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1606                               return _nl_msg_cat_cntr],
1607                  [CATOBJEXT=.gmo
1608                   DATADIRNAME=share],
1609                  [CATOBJEXT=.mo
1610                   DATADIRNAME=lib])
1611                INSTOBJEXT=.mo
1612              fi
1613            fi
1614
1615            # Added by Martin Baulig 12/15/98 for libc5 systems
1616            if test "$gt_cv_func_gettext_libc" != "yes" \
1617               && test "$gt_cv_func_gettext_libintl" = "yes"; then
1618               INTLLIBS=-lintl
1619               LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1620            fi
1621        ])
1622
1623        if test "$CATOBJEXT" = "NONE"; then
1624          AC_MSG_CHECKING([whether catgets can be used])
1625          AC_ARG_WITH(catgets,
1626            [  --with-catgets          use catgets functions if available],
1627            nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
1628          AC_MSG_RESULT($nls_cv_use_catgets)
1629
1630          if test "$nls_cv_use_catgets" = "yes"; then
1631            dnl No gettext in C library.  Try catgets next.
1632            AC_CHECK_LIB(i, main)
1633            AC_CHECK_FUNC(catgets,
1634              [AC_DEFINE(HAVE_CATGETS)
1635               INTLOBJS="\$(CATOBJS)"
1636               AC_PATH_PROG(GENCAT, gencat, no)dnl
1637#              if test "$GENCAT" != "no"; then
1638#                AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
1639#                if test "$GMSGFMT" = "no"; then
1640#                  AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
1641#                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
1642#                fi
1643#                AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1644#                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1645#                USE_INCLUDED_LIBINTL=yes
1646#                CATOBJEXT=.cat
1647#                INSTOBJEXT=.cat
1648#                DATADIRNAME=lib
1649#                INTLDEPS='$(top_builddir)/intl/libintl.a'
1650#                INTLLIBS=$INTLDEPS
1651#                LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1652#                nls_cv_header_intl=intl/libintl.h
1653#                nls_cv_header_libgt=intl/libgettext.h
1654#              fi
1655            ])
1656          fi
1657        fi
1658
1659        if test "$CATOBJEXT" = "NONE"; then
1660          dnl Neither gettext nor catgets in included in the C library.
1661          dnl Fall back on GNU gettext library.
1662          nls_cv_use_gnu_gettext=yes
1663        fi
1664      fi
1665
1666      if test "$nls_cv_use_gnu_gettext" != "yes"; then
1667        AC_DEFINE(ENABLE_NLS)
1668      else
1669         # Unset this variable since we use the non-zero value as a flag.
1670         CATOBJEXT=
1671#        dnl Mark actions used to generate GNU NLS library.
1672#        INTLOBJS="\$(GETTOBJS)"
1673#        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1674#         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
1675#        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1676#        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1677#         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1678#        AC_SUBST(MSGFMT)
1679#       USE_INCLUDED_LIBINTL=yes
1680#        CATOBJEXT=.gmo
1681#        INSTOBJEXT=.mo
1682#        DATADIRNAME=share
1683#       INTLDEPS='$(top_builddir)/intl/libintl.a'
1684#       INTLLIBS=$INTLDEPS
1685#       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1686#        nls_cv_header_intl=intl/libintl.h
1687#        nls_cv_header_libgt=intl/libgettext.h
1688      fi
1689
1690      dnl Test whether we really found GNU xgettext.
1691      if test "$XGETTEXT" != ":"; then
1692        dnl If it is no GNU xgettext we define it as : so that the
1693        dnl Makefiles still can work.
1694        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1695          : ;
1696        else
1697          AC_MSG_RESULT(
1698            [found xgettext program is not GNU xgettext; ignore it])
1699          XGETTEXT=":"
1700        fi
1701      fi
1702
1703      # We need to process the po/ directory.
1704      POSUB=po
1705    else
1706      DATADIRNAME=share
1707      nls_cv_header_intl=intl/libintl.h
1708      nls_cv_header_libgt=intl/libgettext.h
1709    fi
1710    AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
1711    AC_OUTPUT_COMMANDS(
1712     [case "$CONFIG_FILES" in *po/Makefile.in*)
1713        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1714      esac])
1715
1716
1717#    # If this is used in GNU gettext we have to set USE_NLS to `yes'
1718#    # because some of the sources are only built for this goal.
1719#    if test "$PACKAGE" = gettext; then
1720#      USE_NLS=yes
1721#      USE_INCLUDED_LIBINTL=yes
1722#    fi
1723
1724    dnl These rules are solely for the distribution goal.  While doing this
1725    dnl we only have to keep exactly one list of the available catalogs
1726    dnl in configure.in.
1727    for lang in $ALL_LINGUAS; do
1728      GMOFILES="$GMOFILES $lang.gmo"
1729      POFILES="$POFILES $lang.po"
1730    done
1731
1732    dnl Make all variables we use known to autoconf.
1733    AC_SUBST(USE_INCLUDED_LIBINTL)
1734    AC_SUBST(CATALOGS)
1735    AC_SUBST(CATOBJEXT)
1736    AC_SUBST(DATADIRNAME)
1737    AC_SUBST(GMOFILES)
1738    AC_SUBST(INSTOBJEXT)
1739    AC_SUBST(INTLDEPS)
1740    AC_SUBST(INTLLIBS)
1741    AC_SUBST(INTLOBJS)
1742    AC_SUBST(POFILES)
1743    AC_SUBST(POSUB)
1744  ])
1745
1746AC_DEFUN([AM_GNOME_GETTEXT],
1747  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1748   AC_REQUIRE([AC_PROG_CC])dnl
1749   AC_REQUIRE([AC_PROG_RANLIB])dnl
1750   AC_REQUIRE([AC_ISC_POSIX])dnl
1751   AC_REQUIRE([AC_HEADER_STDC])dnl
1752   AC_REQUIRE([AC_C_CONST])dnl
1753   AC_REQUIRE([AC_C_INLINE])dnl
1754   AC_REQUIRE([AC_TYPE_OFF_T])dnl
1755   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1756   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1757   AC_REQUIRE([AC_FUNC_MMAP])dnl
1758
1759   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
1760unistd.h sys/param.h])
1761   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
1762strdup __argz_count __argz_stringify __argz_next])
1763
1764   if test "${ac_cv_func_stpcpy+set}" != "set"; then
1765     AC_CHECK_FUNCS(stpcpy)
1766   fi
1767   if test "${ac_cv_func_stpcpy}" = "yes"; then
1768     AC_DEFINE(HAVE_STPCPY)
1769   fi
1770
1771   AM_LC_MESSAGES
1772   AM_GNOME_WITH_NLS
1773
1774   if test "x$CATOBJEXT" != "x"; then
1775     if test "x$ALL_LINGUAS" = "x"; then
1776       LINGUAS=
1777     else
1778       AC_MSG_CHECKING(for catalogs to be installed)
1779       NEW_LINGUAS=
1780       if test "x$LINGUAS" = "x"; then
1781           LINGUAS=$ALL_LINGUAS
1782       fi
1783       for lang in $LINGUAS; do
1784         case "$ALL_LINGUAS" in
1785          *\ $lang\ *|$lang\ *|*\ $lang) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
1786         esac
1787       done
1788       LINGUAS=$NEW_LINGUAS
1789       AC_MSG_RESULT($LINGUAS)
1790     fi
1791
1792     dnl Construct list of names of catalog files to be constructed.
1793     if test -n "$LINGUAS"; then
1794       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1795     fi
1796   fi
1797
1798   dnl The reference to <locale.h> in the installed <libintl.h> file
1799   dnl must be resolved because we cannot expect the users of this
1800   dnl to define HAVE_LOCALE_H.
1801   if test $ac_cv_header_locale_h = yes; then
1802     INCLUDE_LOCALE_H="#include <locale.h>"
1803   else
1804     INCLUDE_LOCALE_H="\
1805/* The system does not provide the header <locale.h>.  Take care yourself.  */"
1806   fi
1807   AC_SUBST(INCLUDE_LOCALE_H)
1808
1809   dnl Determine which catalog format we have (if any is needed)
1810   dnl For now we know about two different formats:
1811   dnl   Linux libc-5 and the normal X/Open format
1812   test -d intl || mkdir intl
1813   if test "$CATOBJEXT" = ".cat"; then
1814     AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
1815
1816     dnl Transform the SED scripts while copying because some dumb SEDs
1817     dnl cannot handle comments.
1818     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
1819   fi
1820   dnl po2tbl.sed is always needed.
1821   sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
1822     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
1823
1824   dnl In the intl/Makefile.in we have a special dependency which makes
1825   dnl only sense for gettext.  We comment this out for non-gettext
1826   dnl packages.
1827   if test "$PACKAGE" = "gettext"; then
1828     GT_NO="#NO#"
1829     GT_YES=
1830   else
1831     GT_NO=
1832     GT_YES="#YES#"
1833   fi
1834   AC_SUBST(GT_NO)
1835   AC_SUBST(GT_YES)
1836
1837   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1838   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1839   dnl Try to locate is.
1840   MKINSTALLDIRS=
1841   if test -n "$ac_aux_dir"; then
1842     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1843   fi
1844   if test -z "$MKINSTALLDIRS"; then
1845     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1846   fi
1847   AC_SUBST(MKINSTALLDIRS)
1848
1849   dnl *** For now the libtool support in intl/Makefile is not for real.
1850   l=
1851   AC_SUBST(l)
1852
1853   dnl Generate list of files to be processed by xgettext which will
1854   dnl be included in po/Makefile.
1855   test -d po || mkdir po
1856   if test "x$srcdir" != "x."; then
1857     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1858       posrcprefix="$srcdir/"
1859     else
1860       posrcprefix="../$srcdir/"
1861     fi
1862   else
1863     posrcprefix="../"
1864   fi
1865   rm -f po/POTFILES
1866   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1867        < $srcdir/po/POTFILES.in > po/POTFILES
1868  ])
1869
1870
1871# Search path for a program which passes the given test.
1872# Ulrich Drepper <drepper@cygnus.com>, 1996.
1873#
1874# This file can be copied and used freely without restrictions.  It can
1875# be used in projects which are not available under the GNU Public License
1876# but which still want to provide support for the GNU gettext functionality.
1877# Please note that the actual code is *not* freely available.
1878
1879# serial 1
1880
1881dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1882dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1883AC_DEFUN(AM_PATH_PROG_WITH_TEST,
1884[# Extract the first word of "$2", so it can be a program name with args.
1885set dummy $2; ac_word=[$]2
1886AC_MSG_CHECKING([for $ac_word])
1887AC_CACHE_VAL(ac_cv_path_$1,
1888[case "[$]$1" in
1889  /*)
1890  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1891  ;;
1892  *)
1893  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1894  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1895    test -z "$ac_dir" && ac_dir=.
1896    if test -f $ac_dir/$ac_word; then
1897      if [$3]; then
1898        ac_cv_path_$1="$ac_dir/$ac_word"
1899        break
1900      fi
1901    fi
1902  done
1903  IFS="$ac_save_ifs"
1904dnl If no 4th arg is given, leave the cache variable unset,
1905dnl so AC_PATH_PROGS will keep looking.
1906ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1907])dnl
1908  ;;
1909esac])dnl
1910$1="$ac_cv_path_$1"
1911if test -n "[$]$1"; then
1912  AC_MSG_RESULT([$]$1)
1913else
1914  AC_MSG_RESULT(no)
1915fi
1916AC_SUBST($1)dnl
1917])
1918
1919# Check whether LC_MESSAGES is available in <locale.h>.
1920# Ulrich Drepper <drepper@cygnus.com>, 1995.
1921#
1922# This file can be copied and used freely without restrictions.  It can
1923# be used in projects which are not available under the GNU Public License
1924# but which still want to provide support for the GNU gettext functionality.
1925# Please note that the actual code is *not* freely available.
1926
1927# serial 1
1928
1929AC_DEFUN(AM_LC_MESSAGES,
1930  [if test $ac_cv_header_locale_h = yes; then
1931    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1932      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1933       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1934    if test $am_cv_val_LC_MESSAGES = yes; then
1935      AC_DEFINE(HAVE_LC_MESSAGES)
1936    fi
1937  fi])
1938
1939dnl AM_PATH_GCONF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1940dnl Test for GCONF, and define GCONF_CFLAGS and GCONF_LIBS
1941dnl
1942AC_DEFUN(AM_PATH_GCONF,
1943[dnl
1944dnl Get the cflags and libraries from the gconf-config script
1945dnl
1946AC_ARG_WITH(gconf-prefix,[  --with-gconf-prefix=PFX   Prefix where GCONF is installed (optional)],
1947            gconf_config_prefix="$withval", gconf_config_prefix="")
1948AC_ARG_WITH(gconf-exec-prefix,[  --with-gconf-exec-prefix=PFX Exec prefix where GCONF is installed (optional)],
1949            gconf_config_exec_prefix="$withval", gconf_config_exec_prefix="")
1950AC_ARG_ENABLE(gconftest, [  --disable-gconftest       Do not try to compile and run a test GCONF program],
1951                    , enable_gconftest=yes)
1952
1953  gconf_config_args="$gconf_config_args"
1954
1955  if test x$gconf_config_exec_prefix != x ; then
1956     gconf_config_args="$gconf_config_args --exec-prefix=$gconf_config_exec_prefix"
1957     if test x${GCONF_CONFIG+set} != xset ; then
1958        GCONF_CONFIG=$gconf_config_exec_prefix/bin/gconf-config
1959     fi
1960  fi
1961  if test x$gconf_config_prefix != x ; then
1962     gconf_config_args="$gconf_config_args --prefix=$gconf_config_prefix"
1963     if test x${GCONF_CONFIG+set} != xset ; then
1964        GCONF_CONFIG=$gconf_config_prefix/bin/gconf-config
1965     fi
1966  fi
1967
1968  AC_PATH_PROG(GCONF_CONFIG, gconf-config, no)
1969  min_gconf_version=ifelse([$1], , 0.5, $1)
1970  AC_MSG_CHECKING(for GCONF - version >= $min_gconf_version)
1971  no_gconf=""
1972  if test "$GCONF_CONFIG" = "no" ; then
1973    no_gconf=yes
1974  else
1975    GCONF_CFLAGS="`$GCONF_CONFIG  $gconf_config_args --cflags $4`"
1976    GCONF_LIBS="`$GCONF_CONFIG  $gconf_config_args --libs $4`"
1977    gconf_config_major_version=`$GCONF_CONFIG $gconf_config_args --version | \
1978           sed -e 's,^[[^0-9.]]*,,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1979    gconf_config_minor_version=`$GCONF_CONFIG $gconf_config_args --version | \
1980           sed -e 's,^[[^0-9.]]*,,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1981    gconf_config_micro_version=`$GCONF_CONFIG $gconf_config_args --version | \
1982           sed -e 's,^[[^0-9\.]]*,,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1983  fi
1984  if test "x$no_gconf" = x ; then
1985     AC_MSG_RESULT(yes)
1986     ifelse([$2], , :, [$2])     
1987  else
1988     AC_MSG_RESULT(no)
1989     if test "$GCONF_CONFIG" = "no" ; then
1990       echo "*** The gconf-config script installed by GCONF could not be found"
1991       echo "*** If GCONF was installed in PREFIX, make sure PREFIX/bin is in"
1992       echo "*** your path, or set the GCONF_CONFIG environment variable to the"
1993       echo "*** full path to gconf-config."
1994     else
1995        :
1996     fi
1997     GCONF_CFLAGS=""
1998     GCONF_LIBS=""
1999     ifelse([$3], , :, [$3])
2000  fi
2001  AC_SUBST(GCONF_CFLAGS)
2002  AC_SUBST(GCONF_LIBS)
2003  rm -f conf.gconftest
2004])
2005
2006dnl
2007dnl Check for struct linger
2008dnl
2009AC_DEFUN([AC_STRUCT_LINGER], [
2010av_struct_linger=no
2011AC_MSG_CHECKING(struct linger is available)
2012AC_TRY_RUN([
2013#include <sys/types.h>
2014#include <sys/socket.h>
2015
2016struct linger li;
2017
2018main ()
2019{
2020    li.l_onoff = 1;
2021    li.l_linger = 120;
2022    exit (0);
2023}
2024],[
2025AC_DEFINE(HAVE_STRUCT_LINGER)
2026av_struct_linger=yes
2027],[
2028av_struct_linger=no
2029],[
2030av_struct_linger=no
2031])
2032AC_MSG_RESULT($av_struct_linger)
2033])
2034
Note: See TracBrowser for help on using the repository browser.