Deleted Added
full compact
aclocal.m4 (127808) aclocal.m4 (142403)
1# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
1# generated automatically by aclocal 1.8.3 -*- Autoconf -*-
2
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
15
16# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
17
18# This program is free software; you can redistribute it and/or modify
19# it under the terms of the GNU General Public License as published by
20# the Free Software Foundation; either version 2, or (at your option)
21# any later version.
22
23# This program is distributed in the hope that it will be useful,
24# but WITHOUT ANY WARRANTY; without even the implied warranty of
25# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26# GNU General Public License for more details.
27
28# You should have received a copy of the GNU General Public License
29# along with this program; if not, write to the Free Software
30# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31# 02111-1307, USA.
32
33AC_PREREQ([2.52])
34
35# serial 6
36
37# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
38AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
39
40# Do all the work for Automake. -*- Autoconf -*-
41
42# This macro actually does too much some checks are only needed if
43# your package does certain things. But this isn't really a big deal.
44
45# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46# Free Software Foundation, Inc.
47
48# This program is free software; you can redistribute it and/or modify
49# it under the terms of the GNU General Public License as published by
50# the Free Software Foundation; either version 2, or (at your option)
51# any later version.
52
53# This program is distributed in the hope that it will be useful,
54# but WITHOUT ANY WARRANTY; without even the implied warranty of
55# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56# GNU General Public License for more details.
57
58# You should have received a copy of the GNU General Public License
59# along with this program; if not, write to the Free Software
60# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
61# 02111-1307, USA.
62
63# serial 10
64
65AC_PREREQ([2.54])
66
67# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
68# the ones we care about.
69m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
70
71# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
72# AM_INIT_AUTOMAKE([OPTIONS])
73# -----------------------------------------------
74# The call with PACKAGE and VERSION arguments is the old style
75# call (pre autoconf-2.50), which is being phased out. PACKAGE
76# and VERSION should now be passed to AC_INIT and removed from
77# the call to AM_INIT_AUTOMAKE.
78# We support both call styles for the transition. After
79# the next Automake release, Autoconf can make the AC_INIT
80# arguments mandatory, and then we can depend on a new Autoconf
81# release and drop the old call support.
82AC_DEFUN([AM_INIT_AUTOMAKE],
83[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
84 AC_REQUIRE([AC_PROG_INSTALL])dnl
85# test to see if srcdir already configured
86if test "`cd $srcdir && pwd`" != "`pwd`" &&
87 test -f $srcdir/config.status; then
88 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
89fi
90
91# test whether we have cygpath
92if test -z "$CYGPATH_W"; then
93 if (cygpath --version) >/dev/null 2>/dev/null; then
94 CYGPATH_W='cygpath -w'
95 else
96 CYGPATH_W=echo
97 fi
98fi
99AC_SUBST([CYGPATH_W])
100
101# Define the identity of the package.
102dnl Distinguish between old-style and new-style calls.
103m4_ifval([$2],
104[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
105 AC_SUBST([PACKAGE], [$1])dnl
106 AC_SUBST([VERSION], [$2])],
107[_AM_SET_OPTIONS([$1])dnl
108 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
109 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
110
111_AM_IF_OPTION([no-define],,
112[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
113 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
114
115# Some tools Automake needs.
116AC_REQUIRE([AM_SANITY_CHECK])dnl
117AC_REQUIRE([AC_ARG_PROGRAM])dnl
118AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
119AM_MISSING_PROG(AUTOCONF, autoconf)
120AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
121AM_MISSING_PROG(AUTOHEADER, autoheader)
122AM_MISSING_PROG(MAKEINFO, makeinfo)
123AM_MISSING_PROG(AMTAR, tar)
124AM_PROG_INSTALL_SH
125AM_PROG_INSTALL_STRIP
126# We need awk for the "check" target. The system "awk" is bad on
127# some platforms.
128AC_REQUIRE([AC_PROG_AWK])dnl
129AC_REQUIRE([AC_PROG_MAKE_SET])dnl
130AC_REQUIRE([AM_SET_LEADING_DOT])dnl
131
132_AM_IF_OPTION([no-dependencies],,
133[AC_PROVIDE_IFELSE([AC_PROG_CC],
134 [_AM_DEPENDENCIES(CC)],
135 [define([AC_PROG_CC],
136 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
137AC_PROVIDE_IFELSE([AC_PROG_CXX],
138 [_AM_DEPENDENCIES(CXX)],
139 [define([AC_PROG_CXX],
140 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
141])
142])
143
144
145# When config.status generates a header, we must update the stamp-h file.
146# This file resides in the same directory as the config header
147# that is generated. The stamp files are numbered to have different names.
148
149# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
150# loop where config.status creates the headers, so we can generate
151# our stamp files there.
152AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
153[# Compute $1's index in $config_headers.
154_am_stamp_count=1
155for _am_header in $config_headers :; do
156 case $_am_header in
157 $1 | $1:* )
158 break ;;
159 * )
160 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
161 esac
162done
163echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
164
165# Copyright 2002 Free Software Foundation, Inc.
166
167# This program is free software; you can redistribute it and/or modify
168# it under the terms of the GNU General Public License as published by
169# the Free Software Foundation; either version 2, or (at your option)
170# any later version.
171
172# This program is distributed in the hope that it will be useful,
173# but WITHOUT ANY WARRANTY; without even the implied warranty of
174# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
175# GNU General Public License for more details.
176
177# You should have received a copy of the GNU General Public License
178# along with this program; if not, write to the Free Software
179# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
180
181# AM_AUTOMAKE_VERSION(VERSION)
182# ----------------------------
183# Automake X.Y traces this macro to ensure aclocal.m4 has been
184# generated from the m4 files accompanying Automake X.Y.
185AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
186
187# AM_SET_CURRENT_AUTOMAKE_VERSION
188# -------------------------------
189# Call AM_AUTOMAKE_VERSION so it can be traced.
190# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
191AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
192 [AM_AUTOMAKE_VERSION([1.7.9])])
193
194# Helper functions for option handling. -*- Autoconf -*-
195
196# Copyright 2001, 2002 Free Software Foundation, Inc.
197
198# This program is free software; you can redistribute it and/or modify
199# it under the terms of the GNU General Public License as published by
200# the Free Software Foundation; either version 2, or (at your option)
201# any later version.
202
203# This program is distributed in the hope that it will be useful,
204# but WITHOUT ANY WARRANTY; without even the implied warranty of
205# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
206# GNU General Public License for more details.
207
208# You should have received a copy of the GNU General Public License
209# along with this program; if not, write to the Free Software
210# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
211# 02111-1307, USA.
212
213# serial 2
214
215# _AM_MANGLE_OPTION(NAME)
216# -----------------------
217AC_DEFUN([_AM_MANGLE_OPTION],
218[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
219
220# _AM_SET_OPTION(NAME)
221# ------------------------------
222# Set option NAME. Presently that only means defining a flag for this option.
223AC_DEFUN([_AM_SET_OPTION],
224[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
225
226# _AM_SET_OPTIONS(OPTIONS)
227# ----------------------------------
228# OPTIONS is a space-separated list of Automake options.
229AC_DEFUN([_AM_SET_OPTIONS],
230[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
231
232# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
233# -------------------------------------------
234# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
235AC_DEFUN([_AM_IF_OPTION],
236[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
237
238#
239# Check to make sure that the build environment is sane.
240#
241
242# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
243
244# This program is free software; you can redistribute it and/or modify
245# it under the terms of the GNU General Public License as published by
246# the Free Software Foundation; either version 2, or (at your option)
247# any later version.
248
249# This program is distributed in the hope that it will be useful,
250# but WITHOUT ANY WARRANTY; without even the implied warranty of
251# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
252# GNU General Public License for more details.
253
254# You should have received a copy of the GNU General Public License
255# along with this program; if not, write to the Free Software
256# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
257# 02111-1307, USA.
258
259# serial 3
260
261# AM_SANITY_CHECK
262# ---------------
263AC_DEFUN([AM_SANITY_CHECK],
264[AC_MSG_CHECKING([whether build environment is sane])
265# Just in case
266sleep 1
267echo timestamp > conftest.file
268# Do `set' in a subshell so we don't clobber the current shell's
269# arguments. Must try -L first in case configure is actually a
270# symlink; some systems play weird games with the mod time of symlinks
271# (eg FreeBSD returns the mod time of the symlink's containing
272# directory).
273if (
274 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
275 if test "$[*]" = "X"; then
276 # -L didn't work.
277 set X `ls -t $srcdir/configure conftest.file`
278 fi
279 rm -f conftest.file
280 if test "$[*]" != "X $srcdir/configure conftest.file" \
281 && test "$[*]" != "X conftest.file $srcdir/configure"; then
282
283 # If neither matched, then we have a broken ls. This can happen
284 # if, for instance, CONFIG_SHELL is bash and it inherits a
285 # broken ls alias from the environment. This has actually
286 # happened. Such a system could not be considered "sane".
287 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
288alias in your environment])
289 fi
290
291 test "$[2]" = conftest.file
292 )
293then
294 # Ok.
295 :
296else
297 AC_MSG_ERROR([newly created file is older than distributed files!
298Check your system clock])
299fi
300AC_MSG_RESULT(yes)])
301
302# -*- Autoconf -*-
303
304
305# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
306
307# This program is free software; you can redistribute it and/or modify
308# it under the terms of the GNU General Public License as published by
309# the Free Software Foundation; either version 2, or (at your option)
310# any later version.
311
312# This program is distributed in the hope that it will be useful,
313# but WITHOUT ANY WARRANTY; without even the implied warranty of
314# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
315# GNU General Public License for more details.
316
317# You should have received a copy of the GNU General Public License
318# along with this program; if not, write to the Free Software
319# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
320# 02111-1307, USA.
321
322# serial 3
323
324# AM_MISSING_PROG(NAME, PROGRAM)
325# ------------------------------
326AC_DEFUN([AM_MISSING_PROG],
327[AC_REQUIRE([AM_MISSING_HAS_RUN])
328$1=${$1-"${am_missing_run}$2"}
329AC_SUBST($1)])
330
331
332# AM_MISSING_HAS_RUN
333# ------------------
334# Define MISSING if not defined so far and test if it supports --run.
335# If it does, set am_missing_run to use it, otherwise, to nothing.
336AC_DEFUN([AM_MISSING_HAS_RUN],
337[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
338test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
339# Use eval to expand $SHELL
340if eval "$MISSING --run true"; then
341 am_missing_run="$MISSING --run "
342else
343 am_missing_run=
344 AC_MSG_WARN([`missing' script is too old or missing])
345fi
346])
347
348# AM_AUX_DIR_EXPAND
349
350# Copyright 2001 Free Software Foundation, Inc.
351
352# This program is free software; you can redistribute it and/or modify
353# it under the terms of the GNU General Public License as published by
354# the Free Software Foundation; either version 2, or (at your option)
355# any later version.
356
357# This program is distributed in the hope that it will be useful,
358# but WITHOUT ANY WARRANTY; without even the implied warranty of
359# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
360# GNU General Public License for more details.
361
362# You should have received a copy of the GNU General Public License
363# along with this program; if not, write to the Free Software
364# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
365# 02111-1307, USA.
366
367# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
368# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
369# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
370#
371# Of course, Automake must honor this variable whenever it calls a
372# tool from the auxiliary directory. The problem is that $srcdir (and
373# therefore $ac_aux_dir as well) can be either absolute or relative,
374# depending on how configure is run. This is pretty annoying, since
375# it makes $ac_aux_dir quite unusable in subdirectories: in the top
376# source directory, any form will work fine, but in subdirectories a
377# relative path needs to be adjusted first.
378#
379# $ac_aux_dir/missing
380# fails when called from a subdirectory if $ac_aux_dir is relative
381# $top_srcdir/$ac_aux_dir/missing
382# fails if $ac_aux_dir is absolute,
383# fails when called from a subdirectory in a VPATH build with
384# a relative $ac_aux_dir
385#
386# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
387# are both prefixed by $srcdir. In an in-source build this is usually
388# harmless because $srcdir is `.', but things will broke when you
389# start a VPATH build or use an absolute $srcdir.
390#
391# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
392# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
393# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
394# and then we would define $MISSING as
395# MISSING="\${SHELL} $am_aux_dir/missing"
396# This will work as long as MISSING is not called from configure, because
397# unfortunately $(top_srcdir) has no meaning in configure.
398# However there are other variables, like CC, which are often used in
399# configure, and could therefore not use this "fixed" $ac_aux_dir.
400#
401# Another solution, used here, is to always expand $ac_aux_dir to an
402# absolute PATH. The drawback is that using absolute paths prevent a
403# configured tree to be moved without reconfiguration.
404
405# Rely on autoconf to set up CDPATH properly.
406AC_PREREQ([2.50])
407
408AC_DEFUN([AM_AUX_DIR_EXPAND], [
409# expand $ac_aux_dir to an absolute path
410am_aux_dir=`cd $ac_aux_dir && pwd`
411])
412
413# AM_PROG_INSTALL_SH
414# ------------------
415# Define $install_sh.
416
417# Copyright 2001 Free Software Foundation, Inc.
418
419# This program is free software; you can redistribute it and/or modify
420# it under the terms of the GNU General Public License as published by
421# the Free Software Foundation; either version 2, or (at your option)
422# any later version.
423
424# This program is distributed in the hope that it will be useful,
425# but WITHOUT ANY WARRANTY; without even the implied warranty of
426# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427# GNU General Public License for more details.
428
429# You should have received a copy of the GNU General Public License
430# along with this program; if not, write to the Free Software
431# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432# 02111-1307, USA.
433
434AC_DEFUN([AM_PROG_INSTALL_SH],
435[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
436install_sh=${install_sh-"$am_aux_dir/install-sh"}
437AC_SUBST(install_sh)])
438
439# AM_PROG_INSTALL_STRIP
440
441# Copyright 2001 Free Software Foundation, Inc.
442
443# This program is free software; you can redistribute it and/or modify
444# it under the terms of the GNU General Public License as published by
445# the Free Software Foundation; either version 2, or (at your option)
446# any later version.
447
448# This program is distributed in the hope that it will be useful,
449# but WITHOUT ANY WARRANTY; without even the implied warranty of
450# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
451# GNU General Public License for more details.
452
453# You should have received a copy of the GNU General Public License
454# along with this program; if not, write to the Free Software
455# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
456# 02111-1307, USA.
457
458# One issue with vendor `install' (even GNU) is that you can't
459# specify the program used to strip binaries. This is especially
460# annoying in cross-compiling environments, where the build's strip
461# is unlikely to handle the host's binaries.
462# Fortunately install-sh will honor a STRIPPROG variable, so we
463# always use install-sh in `make install-strip', and initialize
464# STRIPPROG with the value of the STRIP variable (set by the user).
465AC_DEFUN([AM_PROG_INSTALL_STRIP],
466[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
467# Installed binaries are usually stripped using `strip' when the user
468# run `make install-strip'. However `strip' might not be the right
469# tool to use in cross-compilation environments, therefore Automake
470# will honor the `STRIP' environment variable to overrule this program.
471dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
472if test "$cross_compiling" != no; then
473 AC_CHECK_TOOL([STRIP], [strip], :)
474fi
475INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
476AC_SUBST([INSTALL_STRIP_PROGRAM])])
477
478# -*- Autoconf -*-
479# Copyright (C) 2003 Free Software Foundation, Inc.
480
481# This program is free software; you can redistribute it and/or modify
482# it under the terms of the GNU General Public License as published by
483# the Free Software Foundation; either version 2, or (at your option)
484# any later version.
485
486# This program is distributed in the hope that it will be useful,
487# but WITHOUT ANY WARRANTY; without even the implied warranty of
488# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
489# GNU General Public License for more details.
490
491# You should have received a copy of the GNU General Public License
492# along with this program; if not, write to the Free Software
493# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
494# 02111-1307, USA.
495
496# serial 1
497
498# Check whether the underlying file-system supports filenames
499# with a leading dot. For instance MS-DOS doesn't.
500AC_DEFUN([AM_SET_LEADING_DOT],
501[rm -rf .tst 2>/dev/null
502mkdir .tst 2>/dev/null
503if test -d .tst; then
504 am__leading_dot=.
505else
506 am__leading_dot=_
507fi
508rmdir .tst 2>/dev/null
509AC_SUBST([am__leading_dot])])
510
511# serial 5 -*- Autoconf -*-
512
513# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
514
515# This program is free software; you can redistribute it and/or modify
516# it under the terms of the GNU General Public License as published by
517# the Free Software Foundation; either version 2, or (at your option)
518# any later version.
519
520# This program is distributed in the hope that it will be useful,
521# but WITHOUT ANY WARRANTY; without even the implied warranty of
522# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
523# GNU General Public License for more details.
524
525# You should have received a copy of the GNU General Public License
526# along with this program; if not, write to the Free Software
527# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
528# 02111-1307, USA.
529
530
531# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
532# written in clear, in which case automake, when reading aclocal.m4,
533# will think it sees a *use*, and therefore will trigger all it's
534# C support machinery. Also note that it means that autoscan, seeing
535# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
536
537
538
539# _AM_DEPENDENCIES(NAME)
540# ----------------------
541# See how the compiler implements dependency checking.
542# NAME is "CC", "CXX", "GCJ", or "OBJC".
543# We try a few techniques and use that to set a single cache variable.
544#
545# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
546# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
547# dependency, and given that the user is not expected to run this macro,
548# just rely on AC_PROG_CC.
549AC_DEFUN([_AM_DEPENDENCIES],
550[AC_REQUIRE([AM_SET_DEPDIR])dnl
551AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
552AC_REQUIRE([AM_MAKE_INCLUDE])dnl
553AC_REQUIRE([AM_DEP_TRACK])dnl
554
555ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
556 [$1], CXX, [depcc="$CXX" am_compiler_list=],
557 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
558 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
559 [depcc="$$1" am_compiler_list=])
560
561AC_CACHE_CHECK([dependency style of $depcc],
562 [am_cv_$1_dependencies_compiler_type],
563[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
564 # We make a subdir and do the tests there. Otherwise we can end up
565 # making bogus files that we don't know about and never remove. For
566 # instance it was reported that on HP-UX the gcc test will end up
567 # making a dummy file named `D' -- because `-MD' means `put the output
568 # in D'.
569 mkdir conftest.dir
570 # Copy depcomp to subdir because otherwise we won't find it if we're
571 # using a relative directory.
572 cp "$am_depcomp" conftest.dir
573 cd conftest.dir
574 # We will build objects and dependencies in a subdirectory because
575 # it helps to detect inapplicable dependency modes. For instance
576 # both Tru64's cc and ICC support -MD to output dependencies as a
577 # side effect of compilation, but ICC will put the dependencies in
578 # the current directory while Tru64 will put them in the object
579 # directory.
580 mkdir sub
581
582 am_cv_$1_dependencies_compiler_type=none
583 if test "$am_compiler_list" = ""; then
584 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
585 fi
586 for depmode in $am_compiler_list; do
587 # Setup a source with many dependencies, because some compilers
588 # like to wrap large dependency lists on column 80 (with \), and
589 # we should not choose a depcomp mode which is confused by this.
590 #
591 # We need to recreate these files for each test, as the compiler may
592 # overwrite some of them when testing with obscure command lines.
593 # This happens at least with the AIX C compiler.
594 : > sub/conftest.c
595 for i in 1 2 3 4 5 6; do
596 echo '#include "conftst'$i'.h"' >> sub/conftest.c
597 : > sub/conftst$i.h
598 done
599 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
600
601 case $depmode in
602 nosideeffect)
603 # after this tag, mechanisms are not by side-effect, so they'll
604 # only be used when explicitly requested
605 if test "x$enable_dependency_tracking" = xyes; then
606 continue
607 else
608 break
609 fi
610 ;;
611 none) break ;;
612 esac
613 # We check with `-c' and `-o' for the sake of the "dashmstdout"
614 # mode. It turns out that the SunPro C++ compiler does not properly
615 # handle `-M -o', and we need to detect this.
616 if depmode=$depmode \
617 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
618 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
619 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
620 >/dev/null 2>conftest.err &&
621 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
622 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
623 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
624 # icc doesn't choke on unknown options, it will just issue warnings
625 # (even with -Werror). So we grep stderr for any message
626 # that says an option was ignored.
627 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
628 am_cv_$1_dependencies_compiler_type=$depmode
629 break
630 fi
631 fi
632 done
633
634 cd ..
635 rm -rf conftest.dir
636else
637 am_cv_$1_dependencies_compiler_type=none
638fi
639])
640AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
641AM_CONDITIONAL([am__fastdep$1], [
642 test "x$enable_dependency_tracking" != xno \
643 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
644])
645
646
647# AM_SET_DEPDIR
648# -------------
649# Choose a directory name for dependency files.
650# This macro is AC_REQUIREd in _AM_DEPENDENCIES
651AC_DEFUN([AM_SET_DEPDIR],
652[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
653AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
654])
655
656
657# AM_DEP_TRACK
658# ------------
659AC_DEFUN([AM_DEP_TRACK],
660[AC_ARG_ENABLE(dependency-tracking,
661[ --disable-dependency-tracking Speeds up one-time builds
662 --enable-dependency-tracking Do not reject slow dependency extractors])
663if test "x$enable_dependency_tracking" != xno; then
664 am_depcomp="$ac_aux_dir/depcomp"
665 AMDEPBACKSLASH='\'
666fi
667AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
668AC_SUBST([AMDEPBACKSLASH])
669])
670
671# Generate code to set up dependency tracking. -*- Autoconf -*-
672
673# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
674
675# This program is free software; you can redistribute it and/or modify
676# it under the terms of the GNU General Public License as published by
677# the Free Software Foundation; either version 2, or (at your option)
678# any later version.
679
680# This program is distributed in the hope that it will be useful,
681# but WITHOUT ANY WARRANTY; without even the implied warranty of
682# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
683# GNU General Public License for more details.
684
685# You should have received a copy of the GNU General Public License
686# along with this program; if not, write to the Free Software
687# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
688# 02111-1307, USA.
689
690#serial 2
691
692# _AM_OUTPUT_DEPENDENCY_COMMANDS
693# ------------------------------
694AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
695[for mf in $CONFIG_FILES; do
696 # Strip MF so we end up with the name of the file.
697 mf=`echo "$mf" | sed -e 's/:.*$//'`
698 # Check whether this is an Automake generated Makefile or not.
699 # We used to match only the files named `Makefile.in', but
700 # some people rename them; so instead we look at the file content.
701 # Grep'ing the first line is not enough: some people post-process
702 # each Makefile.in and add a new line on top of each file to say so.
703 # So let's grep whole file.
704 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
705 dirpart=`AS_DIRNAME("$mf")`
706 else
707 continue
708 fi
709 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
710 # Extract the definition of DEP_FILES from the Makefile without
711 # running `make'.
712 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
713 test -z "$DEPDIR" && continue
714 # When using ansi2knr, U may be empty or an underscore; expand it
715 U=`sed -n -e '/^U = / s///p' < "$mf"`
716 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
717 # We invoke sed twice because it is the simplest approach to
718 # changing $(DEPDIR) to its actual value in the expansion.
719 for file in `sed -n -e '
720 /^DEP_FILES = .*\\\\$/ {
721 s/^DEP_FILES = //
722 :loop
723 s/\\\\$//
724 p
725 n
726 /\\\\$/ b loop
727 p
728 }
729 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
730 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
731 # Make sure the directory exists.
732 test -f "$dirpart/$file" && continue
733 fdir=`AS_DIRNAME(["$file"])`
734 AS_MKDIR_P([$dirpart/$fdir])
735 # echo "creating $dirpart/$file"
736 echo '# dummy' > "$dirpart/$file"
737 done
738done
739])# _AM_OUTPUT_DEPENDENCY_COMMANDS
740
741
742# AM_OUTPUT_DEPENDENCY_COMMANDS
743# -----------------------------
744# This macro should only be invoked once -- use via AC_REQUIRE.
745#
746# This code is only required when automatic dependency tracking
747# is enabled. FIXME. This creates each `.P' file that we will
748# need in order to bootstrap the dependency handling code.
749AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
750[AC_CONFIG_COMMANDS([depfiles],
751 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
752 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
753])
754
755# Check to see how 'make' treats includes. -*- Autoconf -*-
756
757# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
758
759# This program is free software; you can redistribute it and/or modify
760# it under the terms of the GNU General Public License as published by
761# the Free Software Foundation; either version 2, or (at your option)
762# any later version.
763
764# This program is distributed in the hope that it will be useful,
765# but WITHOUT ANY WARRANTY; without even the implied warranty of
766# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
767# GNU General Public License for more details.
768
769# You should have received a copy of the GNU General Public License
770# along with this program; if not, write to the Free Software
771# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
772# 02111-1307, USA.
773
774# serial 2
775
776# AM_MAKE_INCLUDE()
777# -----------------
778# Check to see how make treats includes.
779AC_DEFUN([AM_MAKE_INCLUDE],
780[am_make=${MAKE-make}
781cat > confinc << 'END'
782am__doit:
783 @echo done
784.PHONY: am__doit
785END
786# If we don't find an include directive, just comment out the code.
787AC_MSG_CHECKING([for style of include used by $am_make])
788am__include="#"
789am__quote=
790_am_result=none
791# First try GNU make style include.
792echo "include confinc" > confmf
793# We grep out `Entering directory' and `Leaving directory'
794# messages which can occur if `w' ends up in MAKEFLAGS.
795# In particular we don't look at `^make:' because GNU make might
796# be invoked under some other name (usually "gmake"), in which
797# case it prints its new name instead of `make'.
798if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
799 am__include=include
800 am__quote=
801 _am_result=GNU
802fi
803# Now try BSD make style include.
804if test "$am__include" = "#"; then
805 echo '.include "confinc"' > confmf
806 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
807 am__include=.include
808 am__quote="\""
809 _am_result=BSD
810 fi
811fi
812AC_SUBST([am__include])
813AC_SUBST([am__quote])
814AC_MSG_RESULT([$_am_result])
815rm -f confinc confmf
816])
817
818# AM_CONDITIONAL -*- Autoconf -*-
819
820# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
821
822# This program is free software; you can redistribute it and/or modify
823# it under the terms of the GNU General Public License as published by
824# the Free Software Foundation; either version 2, or (at your option)
825# any later version.
826
827# This program is distributed in the hope that it will be useful,
828# but WITHOUT ANY WARRANTY; without even the implied warranty of
829# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
830# GNU General Public License for more details.
831
832# You should have received a copy of the GNU General Public License
833# along with this program; if not, write to the Free Software
834# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
835# 02111-1307, USA.
836
837# serial 5
838
839AC_PREREQ(2.52)
840
841# AM_CONDITIONAL(NAME, SHELL-CONDITION)
842# -------------------------------------
843# Define a conditional.
844AC_DEFUN([AM_CONDITIONAL],
845[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
846 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
847AC_SUBST([$1_TRUE])
848AC_SUBST([$1_FALSE])
849if $2; then
850 $1_TRUE=
851 $1_FALSE='#'
852else
853 $1_TRUE='#'
854 $1_FALSE=
855fi
856AC_CONFIG_COMMANDS_PRE(
857[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
858 AC_MSG_ERROR([conditional "$1" was never defined.
859Usually this means the macro was only invoked conditionally.])
860fi])])
861
862# Add --enable-maintainer-mode option to configure.
863# From Jim Meyering
864
865# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
866
867# This program is free software; you can redistribute it and/or modify
868# it under the terms of the GNU General Public License as published by
869# the Free Software Foundation; either version 2, or (at your option)
870# any later version.
871
872# This program is distributed in the hope that it will be useful,
873# but WITHOUT ANY WARRANTY; without even the implied warranty of
874# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
875# GNU General Public License for more details.
876
877# You should have received a copy of the GNU General Public License
878# along with this program; if not, write to the Free Software
879# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
880# 02111-1307, USA.
881
882# serial 2
883
884AC_DEFUN([AM_MAINTAINER_MODE],
885[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
886 dnl maintainer-mode is disabled by default
887 AC_ARG_ENABLE(maintainer-mode,
888[ --enable-maintainer-mode enable make rules and dependencies not useful
889 (and sometimes confusing) to the casual installer],
890 USE_MAINTAINER_MODE=$enableval,
891 USE_MAINTAINER_MODE=no)
892 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
893 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
894 MAINT=$MAINTAINER_MODE_TRUE
895 AC_SUBST(MAINT)dnl
896]
897)
898
899AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
900
901
902# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
903
904# This program is free software; you can redistribute it and/or modify
905# it under the terms of the GNU General Public License as published by
906# the Free Software Foundation; either version 2, or (at your option)
907# any later version.
908
909# This program is distributed in the hope that it will be useful,
910# but WITHOUT ANY WARRANTY; without even the implied warranty of
911# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
912# GNU General Public License for more details.
913
914# You should have received a copy of the GNU General Public License
915# along with this program; if not, write to the Free Software
916# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
917# 02111-1307, USA.
918
919# serial 3
920
921AC_PREREQ(2.50)
922
923# AM_PROG_LEX
924# -----------
925# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
926# "missing" invocation, for better error output.
927AC_DEFUN([AM_PROG_LEX],
928[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
929AC_REQUIRE([AC_PROG_LEX])dnl
930if test "$LEX" = :; then
931 LEX=${am_missing_run}flex
932fi])
933
934dnl $Id: krb-prog-ln-s.m4,v 1.1.42.1 2004/04/01 07:27:34 joda Exp $
935dnl
936dnl
937dnl Better test for ln -s, ln or cp
938dnl
939
940AC_DEFUN([AC_KRB_PROG_LN_S],
941[AC_MSG_CHECKING(for ln -s or something else)
942AC_CACHE_VAL(ac_cv_prog_LN_S,
943[rm -f conftestdata
944if ln -s X conftestdata 2>/dev/null
945then
946 rm -f conftestdata
947 ac_cv_prog_LN_S="ln -s"
948else
949 touch conftestdata1
950 if ln conftestdata1 conftestdata2; then
951 rm -f conftestdata*
952 ac_cv_prog_LN_S=ln
953 else
954 ac_cv_prog_LN_S=cp
955 fi
956fi])dnl
957LN_S="$ac_cv_prog_LN_S"
958AC_MSG_RESULT($ac_cv_prog_LN_S)
959AC_SUBST(LN_S)dnl
960])
961
962
963dnl $Id: mips-abi.m4,v 1.6.8.1 2004/04/01 07:27:34 joda Exp $
964dnl
965dnl
966dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some
967dnl value.
968
969AC_DEFUN([AC_MIPS_ABI], [
970AC_ARG_WITH(mips_abi,
971 AC_HELP_STRING([--with-mips-abi=abi],[ABI to use for IRIX (32, n32, or 64)]))
972
973case "$host_os" in
974irix*)
975with_mips_abi="${with_mips_abi:-yes}"
976if test -n "$GCC"; then
977
978# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
979# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
980#
981# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
982# GCC and revert back to O32. The same goes if O32 is asked for - old
983# GCCs doesn't like the -mabi option, and new GCCs can't output O32.
984#
985# Don't you just love *all* the different SGI ABIs?
986
987case "${with_mips_abi}" in
988 32|o32) abi='-mabi=32'; abilibdirext='' ;;
989 n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
990 64) abi='-mabi=64'; abilibdirext='64' ;;
991 no) abi=''; abilibdirext='';;
992 *) AC_MSG_ERROR("Invalid ABI specified") ;;
993esac
994if test -n "$abi" ; then
995ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
996dnl
997dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
998dnl AC_MSG_RESULT
999dnl
1000AC_MSG_CHECKING([if $CC supports the $abi option])
1001AC_CACHE_VAL($ac_foo, [
1002save_CFLAGS="$CFLAGS"
1003CFLAGS="$CFLAGS $abi"
1004AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
1005CFLAGS="$save_CFLAGS"
1006])
1007ac_res=`eval echo \\\$$ac_foo`
1008AC_MSG_RESULT($ac_res)
1009if test $ac_res = no; then
1010# Try to figure out why that failed...
1011case $abi in
1012 -mabi=32)
1013 save_CFLAGS="$CFLAGS"
1014 CFLAGS="$CFLAGS -mabi=n32"
1015 AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
1016 CLAGS="$save_CFLAGS"
1017 if test $ac_res = yes; then
1018 # New GCC
1019 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI])
1020 fi
1021 # Old GCC
1022 abi=''
1023 abilibdirext=''
1024 ;;
1025 -mabi=n32|-mabi=64)
1026 if test $with_mips_abi = yes; then
1027 # Old GCC, default to O32
1028 abi=''
1029 abilibdirext=''
1030 else
1031 # Some broken GCC
1032 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI])
1033 fi
1034 ;;
1035esac
1036fi #if test $ac_res = no; then
1037fi #if test -n "$abi" ; then
1038else
1039case "${with_mips_abi}" in
1040 32|o32) abi='-32'; abilibdirext='' ;;
1041 n32|yes) abi='-n32'; abilibdirext='32' ;;
1042 64) abi='-64'; abilibdirext='64' ;;
1043 no) abi=''; abilibdirext='';;
1044 *) AC_MSG_ERROR("Invalid ABI specified") ;;
1045esac
1046fi #if test -n "$GCC"; then
1047;;
1048esac
1049])
1050
1051dnl
1052dnl $Id: c-attribute.m4,v 1.2.34.1 2004/04/01 07:27:32 joda Exp $
1053dnl
1054
1055dnl
1056dnl Test for __attribute__
1057dnl
1058
1059AC_DEFUN([AC_C___ATTRIBUTE__], [
1060AC_MSG_CHECKING(for __attribute__)
1061AC_CACHE_VAL(ac_cv___attribute__, [
1062AC_TRY_COMPILE([
1063#include <stdlib.h>
1064],
1065[
1066static void foo(void) __attribute__ ((noreturn));
1067
1068static void
1069foo(void)
1070{
1071 exit(1);
1072}
1073],
1074ac_cv___attribute__=yes,
1075ac_cv___attribute__=no)])
1076if test "$ac_cv___attribute__" = "yes"; then
1077 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
1078fi
1079AC_MSG_RESULT($ac_cv___attribute__)
1080])
1081
1082
1083# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1084
1085# serial 47 AC_PROG_LIBTOOL
1086
1087
1088# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1089# -----------------------------------------------------------
1090# If this macro is not defined by Autoconf, define it here.

--- 5892 unchanged lines hidden (view full) ---

6983 fi
6984 done
6985done
6986SED=$lt_cv_path_SED
6987])
6988AC_MSG_RESULT([$SED])
6989])
6990
14# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
16# serial 47 AC_PROG_LIBTOOL
17
18
19# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20# -----------------------------------------------------------
21# If this macro is not defined by Autoconf, define it here.

--- 5892 unchanged lines hidden (view full) ---

5914 fi
5915 done
5916done
5917SED=$lt_cv_path_SED
5918])
5919AC_MSG_RESULT([$SED])
5920])
5921
6991dnl $Id: wflags.m4,v 1.3.34.1 2004/04/01 07:27:35 joda Exp $
6992dnl
6993dnl set WFLAGS
5922# -*- Autoconf -*-
5923# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
5924# Generated from amversion.in; do not edit by hand.
6994
5925
6995AC_DEFUN([AC_WFLAGS],[
6996WFLAGS_NOUNUSED=""
6997WFLAGS_NOIMPLICITINT=""
6998if test -z "$WFLAGS" -a "$GCC" = "yes"; then
6999 # -Wno-implicit-int for broken X11 headers
7000 # leave these out for now:
7001 # -Wcast-align doesn't work well on alpha osf/1
7002 # -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
7003 # -Wmissing-declarations -Wnested-externs
7004 WFLAGS="ifelse($#, 0,-Wall, $1)"
7005 WFLAGS_NOUNUSED="-Wno-unused"
7006 WFLAGS_NOIMPLICITINT="-Wno-implicit-int"
7007fi
7008AC_SUBST(WFLAGS)dnl
7009AC_SUBST(WFLAGS_NOUNUSED)dnl
7010AC_SUBST(WFLAGS_NOIMPLICITINT)dnl
7011])
5926# This program is free software; you can redistribute it and/or modify
5927# it under the terms of the GNU General Public License as published by
5928# the Free Software Foundation; either version 2, or (at your option)
5929# any later version.
7012
5930
7013dnl $Id: test-package.m4,v 1.12.4.1 2004/04/01 07:27:35 joda Exp $
7014dnl
7015dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs,
7016dnl default locations, conditional, config-program)
5931# This program is distributed in the hope that it will be useful,
5932# but WITHOUT ANY WARRANTY; without even the implied warranty of
5933# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5934# GNU General Public License for more details.
7017
5935
7018AC_DEFUN([rk_TEST_PACKAGE],[
7019AC_ARG_WITH($1,
7020 AC_HELP_STRING([--with-$1=dir],[use $1 in dir]))
7021AC_ARG_WITH($1-lib,
7022 AC_HELP_STRING([--with-$1-lib=dir],[use $1 libraries in dir]),
7023[if test "$withval" = "yes" -o "$withval" = "no"; then
7024 AC_MSG_ERROR([No argument for --with-$1-lib])
7025elif test "X$with_$1" = "X"; then
7026 with_$1=yes
7027fi])
7028AC_ARG_WITH($1-include,
7029 AC_HELP_STRING([--with-$1-include=dir],[use $1 headers in dir]),
7030[if test "$withval" = "yes" -o "$withval" = "no"; then
7031 AC_MSG_ERROR([No argument for --with-$1-include])
7032elif test "X$with_$1" = "X"; then
7033 with_$1=yes
7034fi])
7035AC_ARG_WITH($1-config,
7036 AC_HELP_STRING([--with-$1-config=path],[config program for $1]))
5936# You should have received a copy of the GNU General Public License
5937# along with this program; if not, write to the Free Software
5938# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7037
5939
7038m4_ifval([$6],
7039 m4_define([rk_pkgname], $6),
7040 m4_define([rk_pkgname], AS_TR_CPP($1)))
5940# AM_AUTOMAKE_VERSION(VERSION)
5941# ----------------------------
5942# Automake X.Y traces this macro to ensure aclocal.m4 has been
5943# generated from the m4 files accompanying Automake X.Y.
5944AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
7041
5945
7042AC_MSG_CHECKING(for $1)
5946# AM_SET_CURRENT_AUTOMAKE_VERSION
5947# -------------------------------
5948# Call AM_AUTOMAKE_VERSION so it can be traced.
5949# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
5950AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5951 [AM_AUTOMAKE_VERSION([1.8.3])])
7043
5952
7044case "$with_$1" in
7045yes|"") d='$5' ;;
7046no) d= ;;
7047*) d="$with_$1" ;;
7048esac
5953# AM_AUX_DIR_EXPAND
7049
5954
7050header_dirs=
7051lib_dirs=
7052for i in $d; do
7053 if test "$with_$1_include" = ""; then
7054 if test -d "$i/include/$1"; then
7055 header_dirs="$header_dirs $i/include/$1"
7056 fi
7057 if test -d "$i/include"; then
7058 header_dirs="$header_dirs $i/include"
7059 fi
7060 fi
7061 if test "$with_$1_lib" = ""; then
7062 if test -d "$i/lib$abilibdirext"; then
7063 lib_dirs="$lib_dirs $i/lib$abilibdirext"
7064 fi
7065 fi
7066done
5955# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7067
5956
7068if test "$with_$1_include"; then
7069 header_dirs="$with_$1_include $header_dirs"
7070fi
7071if test "$with_$1_lib"; then
7072 lib_dirs="$with_$1_lib $lib_dirs"
7073fi
5957# This program is free software; you can redistribute it and/or modify
5958# it under the terms of the GNU General Public License as published by
5959# the Free Software Foundation; either version 2, or (at your option)
5960# any later version.
7074
5961
7075if test "$with_$1_config" = ""; then
7076 with_$1_config='$7'
7077fi
5962# This program is distributed in the hope that it will be useful,
5963# but WITHOUT ANY WARRANTY; without even the implied warranty of
5964# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5965# GNU General Public License for more details.
7078
5966
7079$1_cflags=
7080$1_libs=
5967# You should have received a copy of the GNU General Public License
5968# along with this program; if not, write to the Free Software
5969# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5970# 02111-1307, USA.
7081
5971
7082case "$with_$1_config" in
7083yes|no|"")
7084 ;;
7085*)
7086 $1_cflags="`$with_$1_config --cflags 2>&1`"
7087 $1_libs="`$with_$1_config --libs 2>&1`"
7088 ;;
7089esac
5972# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
5973# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
5974# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
5975#
5976# Of course, Automake must honor this variable whenever it calls a
5977# tool from the auxiliary directory. The problem is that $srcdir (and
5978# therefore $ac_aux_dir as well) can be either absolute or relative,
5979# depending on how configure is run. This is pretty annoying, since
5980# it makes $ac_aux_dir quite unusable in subdirectories: in the top
5981# source directory, any form will work fine, but in subdirectories a
5982# relative path needs to be adjusted first.
5983#
5984# $ac_aux_dir/missing
5985# fails when called from a subdirectory if $ac_aux_dir is relative
5986# $top_srcdir/$ac_aux_dir/missing
5987# fails if $ac_aux_dir is absolute,
5988# fails when called from a subdirectory in a VPATH build with
5989# a relative $ac_aux_dir
5990#
5991# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
5992# are both prefixed by $srcdir. In an in-source build this is usually
5993# harmless because $srcdir is `.', but things will broke when you
5994# start a VPATH build or use an absolute $srcdir.
5995#
5996# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
5997# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
5998# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
5999# and then we would define $MISSING as
6000# MISSING="\${SHELL} $am_aux_dir/missing"
6001# This will work as long as MISSING is not called from configure, because
6002# unfortunately $(top_srcdir) has no meaning in configure.
6003# However there are other variables, like CC, which are often used in
6004# configure, and could therefore not use this "fixed" $ac_aux_dir.
6005#
6006# Another solution, used here, is to always expand $ac_aux_dir to an
6007# absolute PATH. The drawback is that using absolute paths prevent a
6008# configured tree to be moved without reconfiguration.
7090
6009
7091found=no
7092if test "$with_$1" != no; then
7093 save_CFLAGS="$CFLAGS"
7094 save_LIBS="$LIBS"
7095 if test "$[]$1_cflags" -a "$[]$1_libs"; then
7096 CFLAGS="$[]$1_cflags $save_CFLAGS"
7097 LIBS="$[]$1_libs $save_LIBS"
7098 AC_TRY_LINK([$2],,[
7099 INCLUDE_$1="$[]$1_cflags"
7100 LIB_$1="$[]$1_libs"
7101 AC_MSG_RESULT([from $with_$1_config])
7102 found=yes])
7103 fi
7104 if test "$found" = no; then
7105 ires= lres=
7106 for i in $header_dirs; do
7107 CFLAGS="-I$i $save_CFLAGS"
7108 AC_TRY_COMPILE([$2],,ires=$i;break)
7109 done
7110 for i in $lib_dirs; do
7111 LIBS="-L$i $3 $4 $save_LIBS"
7112 AC_TRY_LINK([$2],,lres=$i;break)
7113 done
7114 if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
7115 INCLUDE_$1="-I$ires"
7116 LIB_$1="-L$lres $3 $4"
7117 found=yes
7118 AC_MSG_RESULT([headers $ires, libraries $lres])
7119 fi
7120 fi
7121 CFLAGS="$save_CFLAGS"
7122 LIBS="$save_LIBS"
7123fi
7124
7125if test "$found" = yes; then
7126 AC_DEFINE_UNQUOTED(rk_pkgname, 1, [Define if you have the $1 package.])
7127 with_$1=yes
7128else
7129 with_$1=no
7130 INCLUDE_$1=
7131 LIB_$1=
7132 AC_MSG_RESULT(no)
7133fi
7134
7135AC_SUBST(INCLUDE_$1)
7136AC_SUBST(LIB_$1)
6010AC_DEFUN([AM_AUX_DIR_EXPAND],
6011[dnl Rely on autoconf to set up CDPATH properly.
6012AC_PREREQ([2.50])dnl
6013# expand $ac_aux_dir to an absolute path
6014am_aux_dir=`cd $ac_aux_dir && pwd`
7137])
7138
6015])
6016
7139dnl $Id: find-func.m4,v 1.1.42.1 2004/04/01 07:27:33 joda Exp $
7140dnl
7141dnl AC_FIND_FUNC(func, libraries, includes, arguments)
7142AC_DEFUN([AC_FIND_FUNC], [
7143AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
7144if test -n "$LIB_$1"; then
7145 LIBS="$LIB_$1 $LIBS"
7146fi
7147])
6017# AM_CONDITIONAL -*- Autoconf -*-
7148
6018
7149dnl $Id: find-func-no-libs.m4,v 1.5.20.1 2004/04/01 07:27:33 joda Exp $
7150dnl
7151dnl
7152dnl Look for function in any of the specified libraries
7153dnl
6019# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7154
6020
7155dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
7156AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
7157AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
6021# This program is free software; you can redistribute it and/or modify
6022# it under the terms of the GNU General Public License as published by
6023# the Free Software Foundation; either version 2, or (at your option)
6024# any later version.
7158
6025
7159dnl $Id: find-func-no-libs2.m4,v 1.6.10.1 2004/04/01 07:27:33 joda Exp $
7160dnl
7161dnl
7162dnl Look for function in any of the specified libraries
7163dnl
6026# This program is distributed in the hope that it will be useful,
6027# but WITHOUT ANY WARRANTY; without even the implied warranty of
6028# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6029# GNU General Public License for more details.
7164
6030
7165dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
7166AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
6031# You should have received a copy of the GNU General Public License
6032# along with this program; if not, write to the Free Software
6033# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6034# 02111-1307, USA.
7167
6035
7168AC_MSG_CHECKING([for $1])
7169AC_CACHE_VAL(ac_cv_funclib_$1,
7170[
7171if eval "test \"\$ac_cv_func_$1\" != yes" ; then
7172 ac_save_LIBS="$LIBS"
7173 for ac_lib in $2; do
7174 case "$ac_lib" in
7175 "") ;;
7176 yes) ac_lib="" ;;
7177 no) continue ;;
7178 -l*) ;;
7179 *) ac_lib="-l$ac_lib" ;;
7180 esac
7181 LIBS="$6 $ac_lib $5 $ac_save_LIBS"
7182 AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
7183 done
7184 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
7185 LIBS="$ac_save_LIBS"
7186fi
7187])
6036# serial 6
7188
6037
7189eval "ac_res=\$ac_cv_funclib_$1"
7190
7191if false; then
7192 AC_CHECK_FUNCS($1)
7193dnl AC_CHECK_LIBS($2, foo)
6038# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6039# -------------------------------------
6040# Define a conditional.
6041AC_DEFUN([AM_CONDITIONAL],
6042[AC_PREREQ(2.52)dnl
6043 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6044 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6045AC_SUBST([$1_TRUE])
6046AC_SUBST([$1_FALSE])
6047if $2; then
6048 $1_TRUE=
6049 $1_FALSE='#'
6050else
6051 $1_TRUE='#'
6052 $1_FALSE=
7194fi
6053fi
7195# $1
7196eval "ac_tr_func=HAVE_[]upcase($1)"
7197eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
7198eval "LIB_$1=$ac_res"
6054AC_CONFIG_COMMANDS_PRE(
6055[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6056 AC_MSG_ERROR([conditional "$1" was never defined.
6057Usually this means the macro was only invoked conditionally.])
6058fi])])
7199
6059
7200case "$ac_res" in
7201 yes)
7202 eval "ac_cv_func_$1=yes"
7203 eval "LIB_$1="
7204 AC_DEFINE_UNQUOTED($ac_tr_func)
7205 AC_MSG_RESULT([yes])
7206 ;;
7207 no)
7208 eval "ac_cv_func_$1=no"
7209 eval "LIB_$1="
7210 AC_MSG_RESULT([no])
7211 ;;
7212 *)
7213 eval "ac_cv_func_$1=yes"
7214 eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
7215 AC_DEFINE_UNQUOTED($ac_tr_func)
7216 AC_DEFINE_UNQUOTED($ac_tr_lib)
7217 AC_MSG_RESULT([yes, in $ac_res])
7218 ;;
7219esac
7220AC_SUBST(LIB_$1)
7221])
6060# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
7222
6061
6062# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7223
6063
7224dnl $Id: misc.m4,v 1.5 2002/05/24 15:35:32 joda Exp $
7225dnl
7226AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl
7227AC_DEFUN([rk_LIBOBJ],[AC_LIBOBJ([$1])])dnl
7228AC_DEFUN([rk_CONFIG_HEADER],[AH_TOP([#ifndef RCSID
7229#define RCSID(msg) \
7230static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
7231#endif
6064# This program is free software; you can redistribute it and/or modify
6065# it under the terms of the GNU General Public License as published by
6066# the Free Software Foundation; either version 2, or (at your option)
6067# any later version.
7232
6068
7233/* Maximum values on all known systems */
7234#define MaxHostNameLen (64+4)
7235#define MaxPathLen (1024+4)
6069# This program is distributed in the hope that it will be useful,
6070# but WITHOUT ANY WARRANTY; without even the implied warranty of
6071# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6072# GNU General Public License for more details.
7236
6073
7237])])
7238dnl $Id: crypto.m4,v 1.16.2.1 2003/05/05 20:08:32 joda Exp $
7239dnl
7240dnl test for crypto libraries:
7241dnl - libcrypto (from openssl)
7242dnl - libdes (from krb4)
7243dnl - own-built libdes
6074# You should have received a copy of the GNU General Public License
6075# along with this program; if not, write to the Free Software
6076# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6077# 02111-1307, USA.
7244
6078
7245m4_define([test_headers], [
7246 #undef KRB5 /* makes md4.h et al unhappy */
7247 #ifdef HAVE_OPENSSL
7248 #include <openssl/md4.h>
7249 #include <openssl/md5.h>
7250 #include <openssl/sha.h>
7251 #define OPENSSL_DES_LIBDES_COMPATIBILITY
7252 #include <openssl/des.h>
7253 #include <openssl/rc4.h>
7254 #include <openssl/rand.h>
7255 #else
7256 #include <md4.h>
7257 #include <md5.h>
7258 #include <sha.h>
7259 #include <des.h>
7260 #include <rc4.h>
7261 #endif
7262 #ifdef OLD_HASH_NAMES
7263 typedef struct md4 MD4_CTX;
7264 #define MD4_Init(C) md4_init((C))
7265 #define MD4_Update(C, D, L) md4_update((C), (D), (L))
7266 #define MD4_Final(D, C) md4_finito((C), (D))
7267 typedef struct md5 MD5_CTX;
7268 #define MD5_Init(C) md5_init((C))
7269 #define MD5_Update(C, D, L) md5_update((C), (D), (L))
7270 #define MD5_Final(D, C) md5_finito((C), (D))
7271 typedef struct sha SHA_CTX;
7272 #define SHA1_Init(C) sha_init((C))
7273 #define SHA1_Update(C, D, L) sha_update((C), (D), (L))
7274 #define SHA1_Final(D, C) sha_finito((C), (D))
7275 #endif
7276 ])
7277m4_define([test_body], [
7278 void *schedule = 0;
7279 MD4_CTX md4;
7280 MD5_CTX md5;
7281 SHA_CTX sha1;
6079# serial 7
7282
6080
7283 MD4_Init(&md4);
7284 MD5_Init(&md5);
7285 SHA1_Init(&sha1);
7286 #ifdef HAVE_OPENSSL
7287 RAND_status();
7288 #endif
6081# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6082AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7289
6083
7290 des_cbc_encrypt(0, 0, 0, schedule, 0, 0);
7291 RC4(0, 0, 0, 0);])
6084# Do all the work for Automake. -*- Autoconf -*-
7292
6085
6086# This macro actually does too much some checks are only needed if
6087# your package does certain things. But this isn't really a big deal.
7293
6088
7294AC_DEFUN([KRB_CRYPTO],[
7295crypto_lib=unknown
7296AC_WITH_ALL([openssl])
6089# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6090# Free Software Foundation, Inc.
7297
6091
7298DIR_des=
6092# This program is free software; you can redistribute it and/or modify
6093# it under the terms of the GNU General Public License as published by
6094# the Free Software Foundation; either version 2, or (at your option)
6095# any later version.
7299
6096
7300AC_MSG_CHECKING([for crypto library])
6097# This program is distributed in the hope that it will be useful,
6098# but WITHOUT ANY WARRANTY; without even the implied warranty of
6099# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6100# GNU General Public License for more details.
7301
6101
7302openssl=no
7303old_hash=no
6102# You should have received a copy of the GNU General Public License
6103# along with this program; if not, write to the Free Software
6104# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6105# 02111-1307, USA.
7304
6106
7305if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then
7306 save_CPPFLAGS="$CPPFLAGS"
7307 save_LIBS="$LIBS"
6107# serial 11
7308
6108
7309 cdirs= clibs=
7310 for i in $LIB_krb4; do
7311 case "$i" in
7312 -L*) cdirs="$cdirs $i";;
7313 -l*) clibs="$clibs $i";;
7314 esac
7315 done
7316
7317 ires=
7318 for i in $INCLUDE_krb4; do
7319 CFLAGS="-DHAVE_OPENSSL $i $save_CFLAGS"
7320 for j in $cdirs; do
7321 for k in $clibs; do
7322 LIBS="$j $k $save_LIBS"
7323 AC_TRY_LINK(test_headers, test_body,
7324 openssl=yes ires="$i" lres="$j $k"; break 3)
7325 done
7326 done
7327 CFLAGS="$i $save_CFLAGS"
7328 for j in $cdirs; do
7329 for k in $clibs; do
7330 LIBS="$j $k $save_LIBS"
7331 AC_TRY_LINK(test_headers, test_body,
7332 openssl=no ires="$i" lres="$j $k"; break 3)
7333 done
7334 done
7335 CFLAGS="-DHAVE_OLD_HASH_NAMES $i $save_CFLAGS"
7336 for j in $cdirs; do
7337 for k in $clibs; do
7338 LIBS="$j $k $save_LIBS"
7339 AC_TRY_LINK(test_headers, test_body,
7340 openssl=no ires="$i" lres="$j $k"; break 3)
7341 done
7342 done
7343 done
7344
7345 CFLAGS="$save_CFLAGS"
7346 LIBS="$save_LIBS"
7347 if test "$ires" -a "$lres"; then
7348 INCLUDE_des="$ires"
7349 LIB_des="$lres"
7350 crypto_lib=krb4
7351 AC_MSG_RESULT([same as krb4])
7352 LIB_des_a='$(LIB_des)'
7353 LIB_des_so='$(LIB_des)'
7354 LIB_des_appl='$(LIB_des)'
7355 fi
6109# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6110# AM_INIT_AUTOMAKE([OPTIONS])
6111# -----------------------------------------------
6112# The call with PACKAGE and VERSION arguments is the old style
6113# call (pre autoconf-2.50), which is being phased out. PACKAGE
6114# and VERSION should now be passed to AC_INIT and removed from
6115# the call to AM_INIT_AUTOMAKE.
6116# We support both call styles for the transition. After
6117# the next Automake release, Autoconf can make the AC_INIT
6118# arguments mandatory, and then we can depend on a new Autoconf
6119# release and drop the old call support.
6120AC_DEFUN([AM_INIT_AUTOMAKE],
6121[AC_PREREQ([2.58])dnl
6122dnl Autoconf wants to disallow AM_ names. We explicitly allow
6123dnl the ones we care about.
6124m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6125AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6126AC_REQUIRE([AC_PROG_INSTALL])dnl
6127# test to see if srcdir already configured
6128if test "`cd $srcdir && pwd`" != "`pwd`" &&
6129 test -f $srcdir/config.status; then
6130 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7356fi
7357
6131fi
6132
7358if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then
7359 save_CFLAGS="$CFLAGS"
7360 save_LIBS="$LIBS"
7361 INCLUDE_des=
7362 LIB_des=
7363 if test "$with_openssl_include" != ""; then
7364 INCLUDE_des="-I${with_openssl_include}"
7365 fi
7366 if test "$with_openssl_lib" != ""; then
7367 LIB_des="-L${with_openssl_lib}"
7368 fi
7369 CFLAGS="-DHAVE_OPENSSL ${INCLUDE_des} ${CFLAGS}"
7370 saved_LIB_des="$LIB_des"
7371 for lres in "" "-lnsl -lsocket"; do
7372 LIB_des="${saved_LIB_des} -lcrypto $lres"
7373 LIB_des_a="$LIB_des"
7374 LIB_des_so="$LIB_des"
7375 LIB_des_appl="$LIB_des"
7376 LIBS="${LIBS} ${LIB_des}"
7377 AC_TRY_LINK(test_headers, test_body, [
7378 crypto_lib=libcrypto openssl=yes
7379 AC_MSG_RESULT([libcrypto])
7380 ])
7381 if test "$crypto_lib" = libcrypto ; then
7382 break;
7383 fi
7384 done
7385 CFLAGS="$save_CFLAGS"
7386 LIBS="$save_LIBS"
7387fi
7388
7389if test "$crypto_lib" = "unknown"; then
7390
7391 DIR_des='des'
7392 LIB_des='$(top_builddir)/lib/des/libdes.la'
7393 LIB_des_a='$(top_builddir)/lib/des/.libs/libdes.a'
7394 LIB_des_so='$(top_builddir)/lib/des/.libs/libdes.so'
7395 LIB_des_appl="-ldes"
7396
7397 AC_MSG_RESULT([included libdes])
7398
7399fi
7400
7401if test "$with_krb4" != no -a "$crypto_lib" != krb4; then
7402 AC_MSG_ERROR([the crypto library used by krb4 lacks features
7403required by Kerberos 5; to continue, you need to install a newer
7404Kerberos 4 or configure --without-krb4])
7405fi
7406
7407if test "$openssl" = "yes"; then
7408 AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto])
7409fi
7410if test "$old_hash" = yes; then
7411 AC_DEFINE([HAVE_OLD_HASH_NAMES], 1,
7412 [define if you have hash functions like md4_finito()])
7413fi
7414AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = yes)dnl
7415
7416AC_SUBST(DIR_des)
7417AC_SUBST(INCLUDE_des)
7418AC_SUBST(LIB_des)
7419AC_SUBST(LIB_des_a)
7420AC_SUBST(LIB_des_so)
7421AC_SUBST(LIB_des_appl)
7422])
7423
7424dnl
7425dnl $Id: with-all.m4,v 1.1 2001/08/29 17:01:23 assar Exp $
7426dnl
7427
7428dnl AC_WITH_ALL(name)
7429
7430AC_DEFUN([AC_WITH_ALL], [
7431AC_ARG_WITH($1,
7432 AC_HELP_STRING([--with-$1=dir],
7433 [use $1 in dir]))
7434
7435AC_ARG_WITH($1-lib,
7436 AC_HELP_STRING([--with-$1-lib=dir],
7437 [use $1 libraries in dir]),
7438[if test "$withval" = "yes" -o "$withval" = "no"; then
7439 AC_MSG_ERROR([No argument for --with-$1-lib])
7440elif test "X$with_$1" = "X"; then
7441 with_$1=yes
7442fi])
7443
7444AC_ARG_WITH($1-include,
7445 AC_HELP_STRING([--with-$1-include=dir],
7446 [use $1 headers in dir]),
7447[if test "$withval" = "yes" -o "$withval" = "no"; then
7448 AC_MSG_ERROR([No argument for --with-$1-include])
7449elif test "X$with_$1" = "X"; then
7450 with_$1=yes
7451fi])
7452
7453case "$with_$1" in
7454yes) ;;
7455no) ;;
7456"") ;;
7457*) if test "$with_$1_include" = ""; then
7458 with_$1_include="$with_$1/include"
7459 fi
7460 if test "$with_$1_lib" = ""; then
7461 with_$1_lib="$with_$1/lib$abilibdirext"
7462 fi
7463 ;;
7464esac
7465])
7466dnl $Id: db.m4,v 1.9 2002/09/10 14:29:47 joda Exp $
7467dnl
7468dnl tests for various db libraries
7469dnl
7470AC_DEFUN([rk_DB],[
7471AC_ARG_ENABLE(berkeley-db,
7472 AC_HELP_STRING([--disable-berkeley-db],
7473 [if you don't want berkeley db]),[
7474])
7475
7476have_ndbm=no
7477db_type=unknown
7478
7479if test "$enable_berkeley_db" != no; then
7480
7481 AC_CHECK_HEADERS([ \
7482 db4/db.h \
7483 db3/db.h \
7484 db.h \
7485 db_185.h \
7486 ])
7487
7488dnl db_create is used by db3 and db4
7489
7490 AC_FIND_FUNC_NO_LIBS(db_create, db4 db3 db, [
7491 #include <stdio.h>
7492 #ifdef HAVE_DB4_DB_H
7493 #include <db4/db.h>
7494 #elif defined(HAVE_DB3_DB_H)
7495 #include <db3/db.h>
7496 #else
7497 #include <db.h>
7498 #endif
7499 ],[NULL, NULL, 0])
7500
7501 if test "$ac_cv_func_db_create" = "yes"; then
7502 db_type=db3
7503 if test "$ac_cv_funclib_db_create" != "yes"; then
7504 DBLIB="$ac_cv_funclib_db_create"
7505 else
7506 DBLIB=""
7507 fi
7508 AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4 library])
6133# test whether we have cygpath
6134if test -z "$CYGPATH_W"; then
6135 if (cygpath --version) >/dev/null 2>/dev/null; then
6136 CYGPATH_W='cygpath -w'
7509 else
6137 else
7510
7511dnl dbopen is used by db1/db2
7512
7513 AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [
7514 #include <stdio.h>
7515 #if defined(HAVE_DB2_DB_H)
7516 #include <db2/db.h>
7517 #elif defined(HAVE_DB_185_H)
7518 #include <db_185.h>
7519 #elif defined(HAVE_DB_H)
7520 #include <db.h>
7521 #else
7522 #error no db.h
7523 #endif
7524 ],[NULL, 0, 0, 0, NULL])
7525
7526 if test "$ac_cv_func_dbopen" = "yes"; then
7527 db_type=db1
7528 if test "$ac_cv_funclib_dbopen" != "yes"; then
7529 DBLIB="$ac_cv_funclib_dbopen"
7530 else
7531 DBLIB=""
7532 fi
7533 AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library])
7534 fi
6138 CYGPATH_W=echo
7535 fi
6139 fi
7536
7537dnl test for ndbm compatability
7538
7539 if test "$ac_cv_func_dbm_firstkey" != yes; then
7540 AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [
7541 #include <stdio.h>
7542 #define DB_DBM_HSEARCH 1
7543 #include <db.h>
7544 DBM *dbm;
7545 ],[NULL])
7546
7547 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
7548 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
7549 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
7550 else
7551 LIB_NDBM=""
7552 fi
7553 AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db])
7554 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)])
7555 else
7556 $as_unset ac_cv_func_dbm_firstkey
7557 $as_unset ac_cv_funclib_dbm_firstkey
7558 fi
7559 fi
7560
7561fi # berkeley db
7562
7563if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then
7564
7565 AC_CHECK_HEADERS([ \
7566 dbm.h \
7567 ndbm.h \
7568 ])
7569
7570 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [
7571 #include <stdio.h>
7572 #if defined(HAVE_NDBM_H)
7573 #include <ndbm.h>
7574 #elif defined(HAVE_DBM_H)
7575 #include <dbm.h>
7576 #endif
7577 DBM *dbm;
7578 ],[NULL])
7579
7580 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
7581 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
7582 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
7583 else
7584 LIB_NDBM=""
7585 fi
7586 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
7587 have_ndbm=yes
7588 if test "$db_type" = "unknown"; then
7589 db_type=ndbm
7590 DBLIB="$LIB_NDBM"
7591 fi
7592 else
7593
7594 $as_unset ac_cv_func_dbm_firstkey
7595 $as_unset ac_cv_funclib_dbm_firstkey
7596
7597 AC_CHECK_HEADERS([ \
7598 gdbm/ndbm.h \
7599 ])
7600
7601 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [
7602 #include <stdio.h>
7603 #include <gdbm/ndbm.h>
7604 DBM *dbm;
7605 ],[NULL])
7606
7607 if test "$ac_cv_func_dbm_firstkey" = "yes"; then
7608 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then
7609 LIB_NDBM="$ac_cv_funclib_dbm_firstkey"
7610 else
7611 LIB_NDBM=""
7612 fi
7613 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl
7614 have_ndbm=yes
7615 if test "$db_type" = "unknown"; then
7616 db_type=ndbm
7617 DBLIB="$LIB_NDBM"
7618 fi
7619 fi
7620 fi
7621
7622fi # unknown
7623
7624if test "$have_ndbm" = "yes"; then
7625 AC_MSG_CHECKING([if ndbm is implemented with db])
7626 AC_TRY_RUN([
7627#include <unistd.h>
7628#include <fcntl.h>
7629#if defined(HAVE_GDBM_NDBM_H)
7630#include <gdbm/ndbm.h>
7631#elif defined(HAVE_NDBM_H)
7632#include <ndbm.h>
7633#elif defined(HAVE_DBM_H)
7634#include <dbm.h>
7635#endif
7636int main()
7637{
7638 DBM *d;
7639
7640 d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
7641 if (d == NULL)
7642 return 1;
7643 dbm_close(d);
7644 return 0;
7645}],[
7646 if test -f conftest.db; then
7647 AC_MSG_RESULT([yes])
7648 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)])
7649 else
7650 AC_MSG_RESULT([no])
7651 fi],[AC_MSG_RESULT([no])])
7652fi
6140fi
6141AC_SUBST([CYGPATH_W])
7653
6142
7654AM_CONDITIONAL(HAVE_DB1, test "$db_type" = db1)dnl
7655AM_CONDITIONAL(HAVE_DB3, test "$db_type" = db3)dnl
7656AM_CONDITIONAL(HAVE_NDBM, test "$db_type" = ndbm)dnl
6143# Define the identity of the package.
6144dnl Distinguish between old-style and new-style calls.
6145m4_ifval([$2],
6146[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6147 AC_SUBST([PACKAGE], [$1])dnl
6148 AC_SUBST([VERSION], [$2])],
6149[_AM_SET_OPTIONS([$1])dnl
6150 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6151 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7657
6152
7658z=""
7659for i in $LDFLAGS; do
7660 case "$i" in
7661 -L*) z="$z $i";;
7662 esac
7663done
7664DBLIB="$z $DBLIB"
7665AC_SUBST(DBLIB)dnl
7666AC_SUBST(LIB_NDBM)dnl
7667])
6153_AM_IF_OPTION([no-define],,
6154[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6155 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7668
6156
7669dnl $Id: roken-frag.m4,v 1.45.2.1 2004/04/01 07:27:35 joda Exp $
7670dnl
7671dnl some code to get roken working
7672dnl
7673dnl rk_ROKEN(subdir)
7674dnl
7675AC_DEFUN([rk_ROKEN], [
6157# Some tools Automake needs.
6158AC_REQUIRE([AM_SANITY_CHECK])dnl
6159AC_REQUIRE([AC_ARG_PROGRAM])dnl
6160AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6161AM_MISSING_PROG(AUTOCONF, autoconf)
6162AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6163AM_MISSING_PROG(AUTOHEADER, autoheader)
6164AM_MISSING_PROG(MAKEINFO, makeinfo)
6165AM_MISSING_PROG(AMTAR, tar)
6166AM_PROG_INSTALL_SH
6167AM_PROG_INSTALL_STRIP
6168AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6169# We need awk for the "check" target. The system "awk" is bad on
6170# some platforms.
6171AC_REQUIRE([AC_PROG_AWK])dnl
6172AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6173AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7676
6174
7677AC_REQUIRE([rk_CONFIG_HEADER])
7678
7679DIR_roken=roken
7680LIB_roken='$(top_builddir)/$1/libroken.la'
7681INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1'
7682
7683dnl Checks for programs
7684AC_REQUIRE([AC_PROG_CC])
7685AC_REQUIRE([AC_PROG_AWK])
7686AC_REQUIRE([AC_OBJEXT])
7687AC_REQUIRE([AC_EXEEXT])
7688AC_REQUIRE([AC_PROG_LIBTOOL])
7689
7690AC_REQUIRE([AC_MIPS_ABI])
7691
7692dnl C characteristics
7693
7694AC_REQUIRE([AC_C___ATTRIBUTE__])
7695AC_REQUIRE([AC_C_INLINE])
7696AC_REQUIRE([AC_C_CONST])
7697AC_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs)
7698
7699AC_REQUIRE([rk_DB])
7700
7701dnl C types
7702
7703AC_REQUIRE([AC_TYPE_SIZE_T])
7704AC_HAVE_TYPE([ssize_t],[#include <unistd.h>])
7705AC_REQUIRE([AC_TYPE_PID_T])
7706AC_REQUIRE([AC_TYPE_UID_T])
7707AC_HAVE_TYPE([long long])
7708
7709AC_REQUIRE([rk_RETSIGTYPE])
7710
7711dnl Checks for header files.
7712AC_REQUIRE([AC_HEADER_STDC])
7713AC_REQUIRE([AC_HEADER_TIME])
7714
7715AC_CHECK_HEADERS([\
7716 arpa/inet.h \
7717 arpa/nameser.h \
7718 config.h \
7719 crypt.h \
7720 dirent.h \
7721 errno.h \
7722 err.h \
7723 fcntl.h \
7724 grp.h \
7725 ifaddrs.h \
7726 net/if.h \
7727 netdb.h \
7728 netinet/in.h \
7729 netinet/in6.h \
7730 netinet/in_systm.h \
7731 netinet6/in6.h \
7732 netinet6/in6_var.h \
7733 paths.h \
7734 pwd.h \
7735 resolv.h \
7736 rpcsvc/ypclnt.h \
7737 shadow.h \
7738 sys/bswap.h \
7739 sys/ioctl.h \
7740 sys/mman.h \
7741 sys/param.h \
7742 sys/proc.h \
7743 sys/resource.h \
7744 sys/socket.h \
7745 sys/sockio.h \
7746 sys/stat.h \
7747 sys/sysctl.h \
7748 sys/time.h \
7749 sys/tty.h \
7750 sys/types.h \
7751 sys/uio.h \
7752 sys/utsname.h \
7753 sys/wait.h \
7754 syslog.h \
7755 termios.h \
7756 unistd.h \
7757 userconf.h \
7758 usersec.h \
7759 util.h \
7760 vis.h \
6175_AM_IF_OPTION([no-dependencies],,
6176[AC_PROVIDE_IFELSE([AC_PROG_CC],
6177 [_AM_DEPENDENCIES(CC)],
6178 [define([AC_PROG_CC],
6179 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6180AC_PROVIDE_IFELSE([AC_PROG_CXX],
6181 [_AM_DEPENDENCIES(CXX)],
6182 [define([AC_PROG_CXX],
6183 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7761])
6184])
7762
7763AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
7764
7765AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
7766AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
7767AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
7768AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
7769
7770dnl Check for functions and libraries
7771
7772AC_FIND_FUNC(socket, socket)
7773AC_FIND_FUNC(gethostbyname, nsl)
7774AC_FIND_FUNC(syslog, syslog)
7775
7776AC_KRB_IPV6
7777
7778AC_FIND_FUNC(gethostbyname2, inet6 ip6)
7779
7780AC_FIND_FUNC(res_search, resolv,
7781[
7782#include <stdio.h>
7783#ifdef HAVE_SYS_TYPES_H
7784#include <sys/types.h>
7785#endif
7786#ifdef HAVE_NETINET_IN_H
7787#include <netinet/in.h>
7788#endif
7789#ifdef HAVE_ARPA_NAMESER_H
7790#include <arpa/nameser.h>
7791#endif
7792#ifdef HAVE_RESOLV_H
7793#include <resolv.h>
7794#endif
7795],
7796[0,0,0,0,0])
7797
7798AC_FIND_FUNC(res_nsearch, resolv,
7799[
7800#include <stdio.h>
7801#ifdef HAVE_SYS_TYPES_H
7802#include <sys/types.h>
7803#endif
7804#ifdef HAVE_NETINET_IN_H
7805#include <netinet/in.h>
7806#endif
7807#ifdef HAVE_ARPA_NAMESER_H
7808#include <arpa/nameser.h>
7809#endif
7810#ifdef HAVE_RESOLV_H
7811#include <resolv.h>
7812#endif
7813],
7814[0,0,0,0,0,0])
7815
7816AC_FIND_FUNC(dn_expand, resolv,
7817[
7818#include <stdio.h>
7819#ifdef HAVE_SYS_TYPES_H
7820#include <sys/types.h>
7821#endif
7822#ifdef HAVE_NETINET_IN_H
7823#include <netinet/in.h>
7824#endif
7825#ifdef HAVE_ARPA_NAMESER_H
7826#include <arpa/nameser.h>
7827#endif
7828#ifdef HAVE_RESOLV_H
7829#include <resolv.h>
7830#endif
7831],
7832[0,0,0,0,0])
7833
7834rk_CHECK_VAR(_res,
7835[#include <stdio.h>
7836#ifdef HAVE_SYS_TYPES_H
7837#include <sys/types.h>
7838#endif
7839#ifdef HAVE_NETINET_IN_H
7840#include <netinet/in.h>
7841#endif
7842#ifdef HAVE_ARPA_NAMESER_H
7843#include <arpa/nameser.h>
7844#endif
7845#ifdef HAVE_RESOLV_H
7846#include <resolv.h>
7847#endif])
7848
7849
7850AC_BROKEN_SNPRINTF
7851AC_BROKEN_VSNPRINTF
7852
7853AC_BROKEN_GLOB
7854if test "$ac_cv_func_glob_working" != yes; then
7855 AC_LIBOBJ(glob)
7856fi
7857AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes)
7858
7859
7860AC_CHECK_FUNCS([ \
7861 asnprintf \
7862 asprintf \
7863 atexit \
7864 cgetent \
7865 getconfattr \
7866 getprogname \
7867 getrlimit \
7868 getspnam \
7869 initstate \
7870 issetugid \
7871 on_exit \
7872 random \
7873 setprogname \
7874 setstate \
7875 strsvis \
7876 strunvis \
7877 strvis \
7878 strvisx \
7879 svis \
7880 sysconf \
7881 sysctl \
7882 uname \
7883 unvis \
7884 vasnprintf \
7885 vasprintf \
7886 vis \
7887])
7888
6185])
6186
7889if test "$ac_cv_func_cgetent" = no; then
7890 AC_LIBOBJ(getcap)
7891fi
7892
6187
7893AC_REQUIRE([AC_FUNC_GETLOGIN])
6188# When config.status generates a header, we must update the stamp-h file.
6189# This file resides in the same directory as the config header
6190# that is generated. The stamp files are numbered to have different names.
7894
6191
7895AC_REQUIRE([AC_FUNC_MMAP])
6192# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6193# loop where config.status creates the headers, so we can generate
6194# our stamp files there.
6195AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6196[# Compute $1's index in $config_headers.
6197_am_stamp_count=1
6198for _am_header in $config_headers :; do
6199 case $_am_header in
6200 $1 | $1:* )
6201 break ;;
6202 * )
6203 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6204 esac
6205done
6206echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7896
6207
7897AC_FIND_FUNC_NO_LIBS(getsockopt,,
7898[#ifdef HAVE_SYS_TYPES_H
7899#include <sys/types.h>
7900#endif
7901#ifdef HAVE_SYS_SOCKET_H
7902#include <sys/socket.h>
7903#endif],
7904[0,0,0,0,0])
7905AC_FIND_FUNC_NO_LIBS(setsockopt,,
7906[#ifdef HAVE_SYS_TYPES_H
7907#include <sys/types.h>
7908#endif
7909#ifdef HAVE_SYS_SOCKET_H
7910#include <sys/socket.h>
7911#endif],
7912[0,0,0,0,0])
6208# AM_PROG_INSTALL_SH
6209# ------------------
6210# Define $install_sh.
7913
6211
7914AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
7915[#ifdef HAVE_NETDB_H
7916#include <netdb.h>
7917#endif],
791817)
7919AC_NEED_PROTO([
7920#ifdef HAVE_NETDB_H
7921#include <netdb.h>
7922#endif],
7923hstrerror)
6212# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7924
6213
7925AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
7926 [AC_NEED_PROTO([
7927 #include <stdio.h>
7928 #include <string.h>],
7929 rk_func)])
6214# This program is free software; you can redistribute it and/or modify
6215# it under the terms of the GNU General Public License as published by
6216# the Free Software Foundation; either version 2, or (at your option)
6217# any later version.
7930
6218
7931AC_FIND_FUNC_NO_LIBS(bswap16,,
7932[#ifdef HAVE_SYS_BSWAP_H
7933#include <sys/bswap.h>
7934#endif],0)
6219# This program is distributed in the hope that it will be useful,
6220# but WITHOUT ANY WARRANTY; without even the implied warranty of
6221# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6222# GNU General Public License for more details.
7935
6223
7936AC_FIND_FUNC_NO_LIBS(bswap32,,
7937[#ifdef HAVE_SYS_BSWAP_H
7938#include <sys/bswap.h>
7939#endif],0)
6224# You should have received a copy of the GNU General Public License
6225# along with this program; if not, write to the Free Software
6226# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6227# 02111-1307, USA.
7940
6228
7941AC_FIND_FUNC_NO_LIBS(pidfile,util,
7942[#ifdef HAVE_UTIL_H
7943#include <util.h>
7944#endif],0)
6229AC_DEFUN([AM_PROG_INSTALL_SH],
6230[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6231install_sh=${install_sh-"$am_aux_dir/install-sh"}
6232AC_SUBST(install_sh)])
7945
6233
7946AC_FIND_IF_NOT_BROKEN(getaddrinfo,,
7947[#ifdef HAVE_NETDB_H
7948#include <netdb.h>
7949#endif],[0,0,0,0])
6234# -*- Autoconf -*-
6235# Copyright (C) 2003 Free Software Foundation, Inc.
7950
6236
7951AC_FIND_IF_NOT_BROKEN(getnameinfo,,
7952[#ifdef HAVE_NETDB_H
7953#include <netdb.h>
7954#endif],[0,0,0,0,0,0,0])
6237# This program is free software; you can redistribute it and/or modify
6238# it under the terms of the GNU General Public License as published by
6239# the Free Software Foundation; either version 2, or (at your option)
6240# any later version.
7955
6241
7956AC_FIND_IF_NOT_BROKEN(freeaddrinfo,,
7957[#ifdef HAVE_NETDB_H
7958#include <netdb.h>
7959#endif],[0])
6242# This program is distributed in the hope that it will be useful,
6243# but WITHOUT ANY WARRANTY; without even the implied warranty of
6244# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6245# GNU General Public License for more details.
7960
6246
7961AC_FIND_IF_NOT_BROKEN(gai_strerror,,
7962[#ifdef HAVE_NETDB_H
7963#include <netdb.h>
7964#endif],[0])
6247# You should have received a copy of the GNU General Public License
6248# along with this program; if not, write to the Free Software
6249# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6250# 02111-1307, USA.
7965
6251
7966AC_BROKEN([ \
7967 chown \
7968 copyhostent \
7969 daemon \
7970 ecalloc \
7971 emalloc \
7972 erealloc \
7973 estrdup \
7974 err \
7975 errx \
7976 fchown \
7977 flock \
7978 fnmatch \
7979 freehostent \
7980 getcwd \
7981 getdtablesize \
7982 getegid \
7983 geteuid \
7984 getgid \
7985 gethostname \
7986 getifaddrs \
7987 getipnodebyaddr \
7988 getipnodebyname \
7989 getopt \
7990 gettimeofday \
7991 getuid \
7992 getusershell \
7993 initgroups \
7994 innetgr \
7995 iruserok \
7996 localtime_r \
7997 lstat \
7998 memmove \
7999 mkstemp \
8000 putenv \
8001 rcmd \
8002 readv \
8003 recvmsg \
8004 sendmsg \
8005 setegid \
8006 setenv \
8007 seteuid \
8008 strcasecmp \
8009 strdup \
8010 strerror \
8011 strftime \
8012 strlcat \
8013 strlcpy \
8014 strlwr \
8015 strncasecmp \
8016 strndup \
8017 strnlen \
8018 strptime \
8019 strsep \
8020 strsep_copy \
8021 strtok_r \
8022 strupr \
8023 swab \
8024 unsetenv \
8025 verr \
8026 verrx \
8027 vsyslog \
8028 vwarn \
8029 vwarnx \
8030 warn \
8031 warnx \
8032 writev \
8033])
6252# serial 1
8034
6253
8035AC_FOREACH([rk_func], [strndup strsep strtok_r],
8036 [AC_NEED_PROTO([#include <string.h>], rk_func)])
8037
8038AC_FOREACH([rk_func], [strsvis strunvis strvis strvisx svis unvis vis],
8039[AC_NEED_PROTO([#ifdef HAVE_VIS_H
8040#include <vis.h>
8041#endif], rk_func)])
8042
8043AC_BROKEN2(inet_aton,
8044[#ifdef HAVE_SYS_TYPES_H
8045#include <sys/types.h>
8046#endif
8047#ifdef HAVE_SYS_SOCKET_H
8048#include <sys/socket.h>
8049#endif
8050#ifdef HAVE_NETINET_IN_H
8051#include <netinet/in.h>
8052#endif
8053#ifdef HAVE_ARPA_INET_H
8054#include <arpa/inet.h>
8055#endif],
8056[0,0])
8057
8058AC_BROKEN2(inet_ntop,
8059[#ifdef HAVE_SYS_TYPES_H
8060#include <sys/types.h>
8061#endif
8062#ifdef HAVE_SYS_SOCKET_H
8063#include <sys/socket.h>
8064#endif
8065#ifdef HAVE_NETINET_IN_H
8066#include <netinet/in.h>
8067#endif
8068#ifdef HAVE_ARPA_INET_H
8069#include <arpa/inet.h>
8070#endif],
8071[0, 0, 0, 0])
8072
8073AC_BROKEN2(inet_pton,
8074[#ifdef HAVE_SYS_TYPES_H
8075#include <sys/types.h>
8076#endif
8077#ifdef HAVE_SYS_SOCKET_H
8078#include <sys/socket.h>
8079#endif
8080#ifdef HAVE_NETINET_IN_H
8081#include <netinet/in.h>
8082#endif
8083#ifdef HAVE_ARPA_INET_H
8084#include <arpa/inet.h>
8085#endif],
8086[0,0,0])
8087
8088dnl
8089dnl Check for sa_len in struct sockaddr,
8090dnl needs to come before the getnameinfo test
8091dnl
8092AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
8093#include <sys/socket.h>])
8094
8095if test "$ac_cv_func_getnameinfo" = "yes"; then
8096 rk_BROKEN_GETNAMEINFO
8097 if test "$ac_cv_func_getnameinfo_broken" = yes; then
8098 AC_LIBOBJ(getnameinfo)
8099 fi
6254# Check whether the underlying file-system supports filenames
6255# with a leading dot. For instance MS-DOS doesn't.
6256AC_DEFUN([AM_SET_LEADING_DOT],
6257[rm -rf .tst 2>/dev/null
6258mkdir .tst 2>/dev/null
6259if test -d .tst; then
6260 am__leading_dot=.
6261else
6262 am__leading_dot=_
8100fi
6263fi
6264rmdir .tst 2>/dev/null
6265AC_SUBST([am__leading_dot])])
8101
6266
8102if test "$ac_cv_func_getaddrinfo" = "yes"; then
8103 rk_BROKEN_GETADDRINFO
8104 if test "$ac_cv_func_getaddrinfo_numserv" = no; then
8105 AC_LIBOBJ(getaddrinfo)
8106 AC_LIBOBJ(freeaddrinfo)
8107 fi
8108fi
8109
6267
8110AC_NEED_PROTO([#include <stdlib.h>], setenv)
8111AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
8112AC_NEED_PROTO([#include <unistd.h>], gethostname)
8113AC_NEED_PROTO([#include <unistd.h>], mkstemp)
8114AC_NEED_PROTO([#include <unistd.h>], getusershell)
6268# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
6269# Free Software Foundation, Inc.
8115
6270
8116AC_NEED_PROTO([
8117#ifdef HAVE_SYS_TYPES_H
8118#include <sys/types.h>
8119#endif
8120#ifdef HAVE_SYS_SOCKET_H
8121#include <sys/socket.h>
8122#endif
8123#ifdef HAVE_NETINET_IN_H
8124#include <netinet/in.h>
8125#endif
8126#ifdef HAVE_ARPA_INET_H
8127#include <arpa/inet.h>
8128#endif],
8129inet_aton)
6271# This program is free software; you can redistribute it and/or modify
6272# it under the terms of the GNU General Public License as published by
6273# the Free Software Foundation; either version 2, or (at your option)
6274# any later version.
8130
6275
8131AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
6276# This program is distributed in the hope that it will be useful,
6277# but WITHOUT ANY WARRANTY; without even the implied warranty of
6278# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6279# GNU General Public License for more details.
8132
6280
8133AC_REQUIRE([rk_BROKEN_REALLOC])dnl
6281# You should have received a copy of the GNU General Public License
6282# along with this program; if not, write to the Free Software
6283# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6284# 02111-1307, USA.
8134
6285
8135dnl AC_KRB_FUNC_GETCWD_BROKEN
6286# serial 4
8136
6287
8137dnl
8138dnl Checks for prototypes and declarations
8139dnl
8140
8141AC_PROTO_COMPAT([
8142#ifdef HAVE_SYS_TYPES_H
8143#include <sys/types.h>
8144#endif
8145#ifdef HAVE_SYS_SOCKET_H
8146#include <sys/socket.h>
8147#endif
8148#ifdef HAVE_NETINET_IN_H
8149#include <netinet/in.h>
8150#endif
8151#ifdef HAVE_ARPA_INET_H
8152#include <arpa/inet.h>
8153#endif
8154#ifdef HAVE_NETDB_H
8155#include <netdb.h>
8156#endif
8157],
8158gethostbyname, struct hostent *gethostbyname(const char *))
8159
8160AC_PROTO_COMPAT([
8161#ifdef HAVE_SYS_TYPES_H
8162#include <sys/types.h>
8163#endif
8164#ifdef HAVE_SYS_SOCKET_H
8165#include <sys/socket.h>
8166#endif
8167#ifdef HAVE_NETINET_IN_H
8168#include <netinet/in.h>
8169#endif
8170#ifdef HAVE_ARPA_INET_H
8171#include <arpa/inet.h>
8172#endif
8173#ifdef HAVE_NETDB_H
8174#include <netdb.h>
8175#endif
8176],
8177gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
8178
8179AC_PROTO_COMPAT([
8180#ifdef HAVE_SYS_TYPES_H
8181#include <sys/types.h>
8182#endif
8183#ifdef HAVE_SYS_SOCKET_H
8184#include <sys/socket.h>
8185#endif
8186#ifdef HAVE_NETINET_IN_H
8187#include <netinet/in.h>
8188#endif
8189#ifdef HAVE_ARPA_INET_H
8190#include <arpa/inet.h>
8191#endif
8192#ifdef HAVE_NETDB_H
8193#include <netdb.h>
8194#endif
8195],
8196getservbyname, struct servent *getservbyname(const char *, const char *))
8197
8198AC_PROTO_COMPAT([
8199#ifdef HAVE_SYS_TYPES_H
8200#include <sys/types.h>
8201#endif
8202#ifdef HAVE_SYS_SOCKET_H
8203#include <sys/socket.h>
8204#endif
8205],
8206getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
8207
8208AC_PROTO_COMPAT([
8209#ifdef HAVE_SYSLOG_H
8210#include <syslog.h>
8211#endif
8212],
8213openlog, void openlog(const char *, int, int))
8214
8215AC_NEED_PROTO([
8216#ifdef HAVE_CRYPT_H
8217#include <crypt.h>
8218#endif
8219#ifdef HAVE_UNISTD_H
8220#include <unistd.h>
8221#endif
8222],
8223crypt)
8224
8225dnl variables
8226
8227rk_CHECK_VAR(h_errno,
8228[#ifdef HAVE_SYS_TYPES_H
8229#include <sys/types.h>
8230#endif
8231#ifdef HAVE_NETDB_H
8232#include <netdb.h>
8233#endif])
8234
8235rk_CHECK_VAR(h_errlist,
8236[#ifdef HAVE_NETDB_H
8237#include <netdb.h>
8238#endif])
8239
8240rk_CHECK_VAR(h_nerr,
8241[#ifdef HAVE_NETDB_H
8242#include <netdb.h>
8243#endif])
8244
8245rk_CHECK_VAR([__progname],
8246[#ifdef HAVE_ERR_H
8247#include <err.h>
8248#endif])
8249
8250AC_CHECK_DECLARATION([#include <stdlib.h>
8251#ifdef HAVE_UNISTD_H
8252#include <unistd.h>
8253#endif], optarg)
8254AC_CHECK_DECLARATION([#include <stdlib.h>
8255#ifdef HAVE_UNISTD_H
8256#include <unistd.h>
8257#endif], optind)
8258AC_CHECK_DECLARATION([#include <stdlib.h>
8259#ifdef HAVE_UNISTD_H
8260#include <unistd.h>
8261#endif], opterr)
8262AC_CHECK_DECLARATION([#include <stdlib.h>
8263#ifdef HAVE_UNISTD_H
8264#include <unistd.h>
8265#endif], optopt)
8266
8267AC_CHECK_DECLARATION([#include <stdlib.h>], environ)
8268
8269dnl
8270dnl Check for fields in struct tm
8271dnl
8272
8273AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
8274AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
8275
8276dnl
8277dnl or do we have a variable `timezone' ?
8278dnl
8279
8280rk_CHECK_VAR(timezone,[#include <time.h>])
8281rk_CHECK_VAR(altzone,[#include <time.h>])
8282
8283AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
8284AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
8285AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
8286AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
8287AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
8288AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
8289AC_HAVE_TYPE([struct iovec],[
8290#include <sys/types.h>
8291#include <sys/uio.h>
8292])
8293AC_HAVE_TYPE([struct msghdr],[
8294#include <sys/types.h>
8295#include <sys/socket.h>
8296])
8297
8298dnl
8299dnl Check for struct winsize
8300dnl
8301
8302AC_KRB_STRUCT_WINSIZE
8303
8304dnl
8305dnl Check for struct spwd
8306dnl
8307
8308AC_KRB_STRUCT_SPWD
8309
8310dnl won't work with automake
8311dnl moved to AC_OUTPUT in configure.in
8312dnl AC_CONFIG_FILES($1/Makefile)
8313
8314LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
8315
8316AC_SUBST(DIR_roken)dnl
8317AC_SUBST(LIB_roken)dnl
8318AC_SUBST(INCLUDES_roken)dnl
8319])
8320
8321dnl $Id: have-type.m4,v 1.6.12.1 2004/04/01 07:27:33 joda Exp $
8322dnl
8323dnl check for existance of a type
8324
8325dnl AC_HAVE_TYPE(TYPE,INCLUDES)
8326AC_DEFUN([AC_HAVE_TYPE], [
8327AC_REQUIRE([AC_HEADER_STDC])
8328cv=`echo "$1" | sed 'y%./+- %__p__%'`
8329AC_MSG_CHECKING(for $1)
8330AC_CACHE_VAL([ac_cv_type_$cv],
8331AC_TRY_COMPILE(
8332[#include <sys/types.h>
8333#if STDC_HEADERS
8334#include <stdlib.h>
8335#include <stddef.h>
8336#endif
8337$2],
8338[$1 foo;],
8339eval "ac_cv_type_$cv=yes",
8340eval "ac_cv_type_$cv=no"))dnl
8341ac_foo=`eval echo \\$ac_cv_type_$cv`
8342AC_MSG_RESULT($ac_foo)
8343if test "$ac_foo" = yes; then
8344 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
8345if false; then
8346 AC_CHECK_TYPES($1)
8347fi
8348 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
8349fi
8350])
8351
8352dnl
8353dnl $Id: retsigtype.m4,v 1.1.12.1 2004/04/01 07:27:35 joda Exp $
8354dnl
8355dnl Figure out return type of signal handlers, and define SIGRETURN macro
8356dnl that can be used to return from one
8357dnl
8358AC_DEFUN([rk_RETSIGTYPE],[
8359AC_TYPE_SIGNAL
8360if test "$ac_cv_type_signal" = "void" ; then
8361 AC_DEFINE(VOID_RETSIGTYPE, 1, [Define if signal handlers return void.])
8362fi
8363AC_SUBST(VOID_RETSIGTYPE)
8364AH_BOTTOM([#ifdef VOID_RETSIGTYPE
8365#define SIGRETURN(x) return
8366#else
8367#define SIGRETURN(x) return (RETSIGTYPE)(x)
8368#endif])
8369])
8370dnl
8371dnl $Id: check-netinet-ip-and-tcp.m4,v 1.3.12.1 2004/04/01 07:27:33 joda Exp $
8372dnl
8373
8374dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
8375dnl you have to include standards.h before including these files
8376
8377AC_DEFUN([CHECK_NETINET_IP_AND_TCP],
8378[
8379AC_CHECK_HEADERS(standards.h)
8380for i in netinet/ip.h netinet/tcp.h; do
8381
8382cv=`echo "$i" | sed 'y%./+-%__p_%'`
8383
8384AC_CACHE_CHECK([for $i],ac_cv_header_$cv,
8385[AC_TRY_CPP([\
8386#ifdef HAVE_STANDARDS_H
8387#include <standards.h>
8388#endif
8389#include <$i>
8390],
8391eval "ac_cv_header_$cv=yes",
8392eval "ac_cv_header_$cv=no")])
8393ac_res=`eval echo \\$ac_cv_header_$cv`
8394if test "$ac_res" = yes; then
8395 ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8396 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
8397fi
8398done
8399if false;then
8400 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h)
8401fi
8402])
8403
8404dnl $Id: krb-ipv6.m4,v 1.13.8.1 2004/04/01 07:27:34 joda Exp $
8405dnl
8406dnl test for IPv6
8407dnl
8408AC_DEFUN([AC_KRB_IPV6], [
8409AC_ARG_WITH(ipv6,
8410 AC_HELP_STRING([--without-ipv6],[do not enable IPv6 support]),[
8411if test "$withval" = "no"; then
8412 ac_cv_lib_ipv6=no
6288# AM_PROG_LEX
6289# -----------
6290# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
6291# "missing" invocation, for better error output.
6292AC_DEFUN([AM_PROG_LEX],
6293[AC_PREREQ(2.50)dnl
6294AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
6295AC_REQUIRE([AC_PROG_LEX])dnl
6296if test "$LEX" = :; then
6297 LEX=${am_missing_run}flex
8413fi])
6298fi])
8414save_CFLAGS="${CFLAGS}"
8415AC_CACHE_CHECK([for IPv6 stack type], v6type,
8416[dnl check for different v6 implementations (by itojun)
8417v6type=unknown
8418v6lib=none
8419
6299
8420for i in v6d toshiba kame inria zeta linux; do
8421 case $i in
8422 v6d)
8423 AC_EGREP_CPP(yes, [
8424#include </usr/local/v6/include/sys/types.h>
8425#ifdef __V6D__
8426yes
8427#endif],
8428 [v6type=$i; v6lib=v6;
8429 v6libdir=/usr/local/v6/lib;
8430 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
8431 ;;
8432 toshiba)
8433 AC_EGREP_CPP(yes, [
8434#include <sys/param.h>
8435#ifdef _TOSHIBA_INET6
8436yes
8437#endif],
8438 [v6type=$i; v6lib=inet6;
8439 v6libdir=/usr/local/v6/lib;
8440 CFLAGS="-DINET6 $CFLAGS"])
8441 ;;
8442 kame)
8443 AC_EGREP_CPP(yes, [
8444#include <netinet/in.h>
8445#ifdef __KAME__
8446yes
8447#endif],
8448 [v6type=$i; v6lib=inet6;
8449 v6libdir=/usr/local/v6/lib;
8450 CFLAGS="-DINET6 $CFLAGS"])
8451 ;;
8452 inria)
8453 AC_EGREP_CPP(yes, [
8454#include <netinet/in.h>
8455#ifdef IPV6_INRIA_VERSION
8456yes
8457#endif],
8458 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
8459 ;;
8460 zeta)
8461 AC_EGREP_CPP(yes, [
8462#include <sys/param.h>
8463#ifdef _ZETA_MINAMI_INET6
8464yes
8465#endif],
8466 [v6type=$i; v6lib=inet6;
8467 v6libdir=/usr/local/v6/lib;
8468 CFLAGS="-DINET6 $CFLAGS"])
8469 ;;
8470 linux)
8471 if test -d /usr/inet6; then
8472 v6type=$i
8473 v6lib=inet6
8474 v6libdir=/usr/inet6
8475 CFLAGS="-DINET6 $CFLAGS"
8476 fi
8477 ;;
8478 esac
8479 if test "$v6type" != "unknown"; then
8480 break
8481 fi
8482done
6300# Add --enable-maintainer-mode option to configure.
6301# From Jim Meyering
8483
6302
8484if test "$v6lib" != "none"; then
8485 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
8486 if test -d $dir -a -f $dir/lib$v6lib.a; then
8487 LIBS="-L$dir -l$v6lib $LIBS"
8488 break
8489 fi
8490 done
8491fi
8492])
6303# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
6304# Free Software Foundation, Inc.
8493
6305
8494AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [
8495AC_TRY_LINK([
8496#ifdef HAVE_SYS_TYPES_H
8497#include <sys/types.h>
8498#endif
8499#ifdef HAVE_SYS_SOCKET_H
8500#include <sys/socket.h>
8501#endif
8502#ifdef HAVE_NETINET_IN_H
8503#include <netinet/in.h>
8504#endif
8505#ifdef HAVE_NETINET_IN6_H
8506#include <netinet/in6.h>
8507#endif
8508],
8509[
8510 struct sockaddr_in6 sin6;
8511 int s;
6306# This program is free software; you can redistribute it and/or modify
6307# it under the terms of the GNU General Public License as published by
6308# the Free Software Foundation; either version 2, or (at your option)
6309# any later version.
8512
6310
8513 s = socket(AF_INET6, SOCK_DGRAM, 0);
6311# This program is distributed in the hope that it will be useful,
6312# but WITHOUT ANY WARRANTY; without even the implied warranty of
6313# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6314# GNU General Public License for more details.
8514
6315
8515 sin6.sin6_family = AF_INET6;
8516 sin6.sin6_port = htons(17);
8517 sin6.sin6_addr = in6addr_any;
8518 bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
8519],
8520ac_cv_lib_ipv6=yes,
8521ac_cv_lib_ipv6=no)])
8522if test "$ac_cv_lib_ipv6" = yes; then
8523 AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
8524else
8525 CFLAGS="${save_CFLAGS}"
8526fi
6316# You should have received a copy of the GNU General Public License
6317# along with this program; if not, write to the Free Software
6318# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6319# 02111-1307, USA.
8527
6320
8528if test "$ac_cv_lib_ipv6" = yes; then
8529 AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[
8530 AC_TRY_LINK([
8531#ifdef HAVE_SYS_TYPES_H
8532#include <sys/types.h>
8533#endif
8534#ifdef HAVE_SYS_SOCKET_H
8535#include <sys/socket.h>
8536#endif
8537#ifdef HAVE_NETINET_IN_H
8538#include <netinet/in.h>
8539#endif
8540#ifdef HAVE_NETINET_IN6_H
8541#include <netinet/in6.h>
8542#endif],[
8543struct sockaddr_in6 sin6;
8544sin6.sin6_addr = in6addr_loopback;
8545],ac_cv_var_in6addr_loopback=yes,ac_cv_var_in6addr_loopback=no)])
8546 if test "$ac_cv_var_in6addr_loopback" = yes; then
8547 AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1,
8548 [Define if you have the in6addr_loopback variable])
8549 fi
8550fi
8551])
8552dnl $Id: check-var.m4,v 1.7 2003/02/17 00:44:57 lha Exp $
8553dnl
8554dnl rk_CHECK_VAR(variable, includes)
8555AC_DEFUN([rk_CHECK_VAR], [
8556AC_MSG_CHECKING(for $1)
8557AC_CACHE_VAL(ac_cv_var_$1, [
8558m4_ifval([$2],[
8559 AC_TRY_LINK([$2
8560 void * foo() { return &$1; }],
8561 [foo()],
8562 ac_cv_var_$1=yes, ac_cv_var_$1=no)])
8563if test "$ac_cv_var_$1" != yes ; then
8564AC_TRY_LINK([extern int $1;
8565int foo() { return $1; }],
8566 [foo()],
8567 ac_cv_var_$1=yes, ac_cv_var_$1=no)
8568fi
8569])
8570ac_foo=`eval echo \\$ac_cv_var_$1`
8571AC_MSG_RESULT($ac_foo)
8572if test "$ac_foo" = yes; then
8573 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1,
8574 [Define if you have the `]$1[' variable.])
8575 m4_ifval([$2], AC_CHECK_DECLARATION([$2],[$1]))
8576fi
8577])
6321# serial 3
8578
6322
8579AC_WARNING_ENABLE([obsolete])
8580AU_DEFUN([AC_CHECK_VAR], [rk_CHECK_VAR([$2], [$1])], [foo])
6323AC_DEFUN([AM_MAINTAINER_MODE],
6324[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6325 dnl maintainer-mode is disabled by default
6326 AC_ARG_ENABLE(maintainer-mode,
6327[ --enable-maintainer-mode enable make rules and dependencies not useful
6328 (and sometimes confusing) to the casual installer],
6329 USE_MAINTAINER_MODE=$enableval,
6330 USE_MAINTAINER_MODE=no)
6331 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6332 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6333 MAINT=$MAINTAINER_MODE_TRUE
6334 AC_SUBST(MAINT)dnl
6335]
6336)
8581
6337
8582dnl $Id: check-declaration.m4,v 1.3.34.1 2004/04/01 07:27:32 joda Exp $
8583dnl
8584dnl
8585dnl Check if we need the declaration of a variable
8586dnl
6338AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8587
6339
8588dnl AC_HAVE_DECLARATION(includes, variable)
8589AC_DEFUN([AC_CHECK_DECLARATION], [
8590AC_MSG_CHECKING([if $2 is properly declared])
8591AC_CACHE_VAL(ac_cv_var_$2_declaration, [
8592AC_TRY_COMPILE([$1
8593extern struct { int foo; } $2;],
8594[$2.foo = 1;],
8595eval "ac_cv_var_$2_declaration=no",
8596eval "ac_cv_var_$2_declaration=yes")
8597])
6340# -*- Autoconf -*-
8598
6341
8599define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
8600
6342
8601AC_MSG_RESULT($ac_cv_var_$2_declaration)
8602if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
8603 AC_DEFINE(foo, 1, [define if your system declares $2])
8604fi
8605undefine([foo])
8606])
6343# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
8607
6344
8608dnl $Id: broken-snprintf.m4,v 1.4.10.1 2004/04/01 07:27:32 joda Exp $
8609dnl
8610AC_DEFUN([AC_BROKEN_SNPRINTF], [
8611AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working,
8612ac_cv_func_snprintf_working=yes
8613AC_TRY_RUN([
8614#include <stdio.h>
8615#include <string.h>
8616int main()
8617{
8618 char foo[[3]];
8619 snprintf(foo, 2, "12");
8620 return strcmp(foo, "1");
8621}],:,ac_cv_func_snprintf_working=no,:))
6345# This program is free software; you can redistribute it and/or modify
6346# it under the terms of the GNU General Public License as published by
6347# the Free Software Foundation; either version 2, or (at your option)
6348# any later version.
8622
6349
8623if test "$ac_cv_func_snprintf_working" = yes; then
8624 AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf])
8625fi
8626if test "$ac_cv_func_snprintf_working" = yes; then
8627AC_NEED_PROTO([#include <stdio.h>],snprintf)
8628fi
8629])
6350# This program is distributed in the hope that it will be useful,
6351# but WITHOUT ANY WARRANTY; without even the implied warranty of
6352# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6353# GNU General Public License for more details.
8630
6354
8631AC_DEFUN([AC_BROKEN_VSNPRINTF],[
8632AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working,
8633ac_cv_func_vsnprintf_working=yes
8634AC_TRY_RUN([
8635#include <stdio.h>
8636#include <string.h>
8637#include <stdarg.h>
6355# You should have received a copy of the GNU General Public License
6356# along with this program; if not, write to the Free Software
6357# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6358# 02111-1307, USA.
8638
6359
8639int foo(int num, ...)
8640{
8641 char bar[[3]];
8642 va_list arg;
8643 va_start(arg, num);
8644 vsnprintf(bar, 2, "%s", arg);
8645 va_end(arg);
8646 return strcmp(bar, "1");
8647}
6360# serial 3
8648
6361
6362# AM_MISSING_PROG(NAME, PROGRAM)
6363# ------------------------------
6364AC_DEFUN([AM_MISSING_PROG],
6365[AC_REQUIRE([AM_MISSING_HAS_RUN])
6366$1=${$1-"${am_missing_run}$2"}
6367AC_SUBST($1)])
8649
6368
8650int main()
8651{
8652 return foo(0, "12");
8653}],:,ac_cv_func_vsnprintf_working=no,:))
8654
6369
8655if test "$ac_cv_func_vsnprintf_working" = yes; then
8656 AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf])
8657fi
8658if test "$ac_cv_func_vsnprintf_working" = yes; then
8659AC_NEED_PROTO([#include <stdio.h>],vsnprintf)
8660fi
8661])
8662
8663dnl $Id: need-proto.m4,v 1.4.6.1 2004/04/01 07:27:35 joda Exp $
8664dnl
8665dnl
8666dnl Check if we need the prototype for a function
8667dnl
8668
8669dnl AC_NEED_PROTO(includes, function)
8670
8671AC_DEFUN([AC_NEED_PROTO], [
8672if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then
8673AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto,
8674AC_TRY_COMPILE([$1],
8675[struct foo { int foo; } xx;
8676extern int $2 (struct foo*);
8677$2(&xx);
8678],
8679eval "ac_cv_func_$2_noproto=yes",
8680eval "ac_cv_func_$2_noproto=no"))
8681if test "$ac_cv_func_$2_noproto" = yes; then
8682 AC_DEFINE(AS_TR_CPP(NEED_[]$2[]_PROTO), 1,
8683 [define if the system is missing a prototype for $2()])
8684fi
8685fi
8686])
8687
8688dnl $Id: broken-glob.m4,v 1.4.12.1 2004/04/01 07:27:32 joda Exp $
8689dnl
8690dnl check for glob(3)
8691dnl
8692AC_DEFUN([AC_BROKEN_GLOB],[
8693AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
8694ac_cv_func_glob_working=yes
8695AC_TRY_LINK([
8696#include <stdio.h>
8697#include <glob.h>],[
8698glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
8699#ifdef GLOB_MAXPATH
8700GLOB_MAXPATH
8701#else
8702GLOB_LIMIT
8703#endif
8704,
8705NULL, NULL);
8706],:,ac_cv_func_glob_working=no,:))
8707
8708if test "$ac_cv_func_glob_working" = yes; then
8709 AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
8710 GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT])
8711fi
8712if test "$ac_cv_func_glob_working" = yes; then
8713AC_NEED_PROTO([#include <stdio.h>
8714#include <glob.h>],glob)
8715fi
8716])
8717
8718dnl
8719dnl $Id: krb-func-getlogin.m4,v 1.1.32.1 2004/04/01 07:27:34 joda Exp $
8720dnl
8721dnl test for POSIX (broken) getlogin
8722dnl
8723
8724
8725AC_DEFUN([AC_FUNC_GETLOGIN], [
8726AC_CHECK_FUNCS(getlogin setlogin)
8727if test "$ac_cv_func_getlogin" = yes; then
8728AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
8729if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
8730 ac_cv_func_getlogin_posix=no
6370# AM_MISSING_HAS_RUN
6371# ------------------
6372# Define MISSING if not defined so far and test if it supports --run.
6373# If it does, set am_missing_run to use it, otherwise, to nothing.
6374AC_DEFUN([AM_MISSING_HAS_RUN],
6375[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6376test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6377# Use eval to expand $SHELL
6378if eval "$MISSING --run true"; then
6379 am_missing_run="$MISSING --run "
8731else
6380else
8732 ac_cv_func_getlogin_posix=yes
6381 am_missing_run=
6382 AC_MSG_WARN([`missing' script is too old or missing])
8733fi
8734])
6383fi
6384])
8735if test "$ac_cv_func_getlogin_posix" = yes; then
8736 AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])
8737fi
8738fi
8739])
8740
6385
8741dnl $Id: find-if-not-broken.m4,v 1.4.8.1 2004/04/01 07:27:33 joda Exp $
8742dnl
8743dnl
8744dnl Mix between AC_FIND_FUNC and AC_BROKEN
8745dnl
6386# AM_PROG_MKDIR_P
6387# ---------------
6388# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
8746
6389
8747AC_DEFUN([AC_FIND_IF_NOT_BROKEN],
8748[AC_FIND_FUNC([$1], [$2], [$3], [$4])
8749if eval "test \"$ac_cv_func_$1\" != yes"; then
8750 rk_LIBOBJ([$1])
8751fi
8752])
6390# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
8753
6391
8754dnl $Id: broken.m4,v 1.6 2002/05/19 19:36:52 joda Exp $
8755dnl
8756dnl
8757dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal
8758dnl libraries
6392# This program is free software; you can redistribute it and/or modify
6393# it under the terms of the GNU General Public License as published by
6394# the Free Software Foundation; either version 2, or (at your option)
6395# any later version.
8759
6396
8760AC_DEFUN([AC_BROKEN],
8761[AC_FOREACH([rk_func], [$1],
8762 [AC_CHECK_FUNC(rk_func,
8763 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]rk_func), 1,
8764 [Define if you have the function `]rk_func['.])],
8765 [rk_LIBOBJ(rk_func)])])])
6397# This program is distributed in the hope that it will be useful,
6398# but WITHOUT ANY WARRANTY; without even the implied warranty of
6399# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6400# GNU General Public License for more details.
8766
6401
8767dnl $Id: broken2.m4,v 1.4 2002/05/19 22:16:46 joda Exp $
8768dnl
8769dnl AC_BROKEN but with more arguments
6402# You should have received a copy of the GNU General Public License
6403# along with this program; if not, write to the Free Software
6404# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6405# 02111-1307, USA.
8770
6406
8771dnl AC_BROKEN2(func, includes, arguments)
8772AC_DEFUN([AC_BROKEN2],
8773[AC_MSG_CHECKING([for $1])
8774AC_CACHE_VAL(ac_cv_func_[]$1,
8775[AC_TRY_LINK([$2],
8776[
8777/* The GNU C library defines this for functions which it implements
8778 to always fail with ENOSYS. Some functions are actually named
8779 something starting with __ and the normal name is an alias. */
8780#if defined (__stub_$1) || defined (__stub___$1)
8781choke me
8782#else
8783$1($3)
8784#endif
8785], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])])
8786if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
8787 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
8788 AC_MSG_RESULT(yes)
6407# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6408# created by `make install' are always world readable, even if the
6409# installer happens to have an overly restrictive umask (e.g. 077).
6410# This was a mistake. There are at least two reasons why we must not
6411# use `-m 0755':
6412# - it causes special bits like SGID to be ignored,
6413# - it may be too restrictive (some setups expect 775 directories).
6414#
6415# Do not use -m 0755 and let people choose whatever they expect by
6416# setting umask.
6417#
6418# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6419# Some implementations (such as Solaris 8's) are not thread-safe: if a
6420# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6421# concurrently, both version can detect that a/ is missing, but only
6422# one can create it and the other will error out. Consequently we
6423# restrict ourselves to GNU make (using the --version option ensures
6424# this.)
6425AC_DEFUN([AM_PROG_MKDIR_P],
6426[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6427 # Keeping the `.' argument allows $(mkdir_p) to be used without
6428 # argument. Indeed, we sometimes output rules like
6429 # $(mkdir_p) $(somedir)
6430 # where $(somedir) is conditionally defined.
6431 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
6432 # expensive solution, as it forces Make to start a sub-shell.)
6433 mkdir_p='mkdir -p -- .'
8789else
6434else
8790 AC_MSG_RESULT(no)
8791 rk_LIBOBJ($1)
8792fi])
8793
8794dnl $Id: have-struct-field.m4,v 1.6.22.1 2004/04/01 07:27:33 joda Exp $
8795dnl
8796dnl check for fields in a structure
8797dnl
8798dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
8799
8800AC_DEFUN([AC_HAVE_STRUCT_FIELD], [
8801define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
8802AC_CACHE_CHECK([for $2 in $1], cache_val,[
8803AC_TRY_COMPILE([$3],[$1 x; x.$2;],
8804cache_val=yes,
8805cache_val=no)])
8806if test "$cache_val" = yes; then
8807 define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
8808 AC_DEFINE(foo, 1, [Define if $1 has field $2.])
8809 undefine([foo])
8810fi
8811undefine([cache_val])
8812])
8813
8814dnl $Id: broken-getnameinfo.m4,v 1.2.12.1 2004/04/01 07:27:32 joda Exp $
8815dnl
8816dnl test for broken AIX getnameinfo
8817
8818AC_DEFUN([rk_BROKEN_GETNAMEINFO],[
8819AC_CACHE_CHECK([if getnameinfo is broken], ac_cv_func_getnameinfo_broken,
8820AC_TRY_RUN([[#include <stdio.h>
8821#include <sys/types.h>
8822#include <sys/socket.h>
8823#include <netinet/in.h>
8824#include <netdb.h>
8825
8826int
8827main(int argc, char **argv)
8828{
8829 struct sockaddr_in sin;
8830 char host[256];
8831 memset(&sin, 0, sizeof(sin));
8832#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
8833 sin.sin_len = sizeof(sin);
8834#endif
8835 sin.sin_family = AF_INET;
8836 sin.sin_addr.s_addr = 0xffffffff;
8837 sin.sin_port = 0;
8838 return getnameinfo((struct sockaddr*)&sin, sizeof(sin), host, sizeof(host),
8839 NULL, 0, 0);
8840}
8841]], ac_cv_func_getnameinfo_broken=no, ac_cv_func_getnameinfo_broken=yes))])
8842
8843dnl $Id: broken-getaddrinfo.m4,v 1.3.6.1 2004/04/01 07:27:32 joda Exp $
8844dnl
8845dnl test if getaddrinfo can handle numeric services
8846
8847AC_DEFUN([rk_BROKEN_GETADDRINFO],[
8848AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv,
8849AC_TRY_RUN([[#include <stdio.h>
8850#include <sys/types.h>
8851#include <sys/socket.h>
8852#include <netdb.h>
8853
8854int
8855main(int argc, char **argv)
8856{
8857 struct addrinfo hints, *ai;
8858 memset(&hints, 0, sizeof(hints));
8859 hints.ai_flags = AI_PASSIVE;
8860 hints.ai_socktype = SOCK_STREAM;
8861 hints.ai_family = PF_UNSPEC;
8862 if(getaddrinfo(NULL, "17", &hints, &ai) != 0)
8863 return 1;
8864 return 0;
8865}
8866]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))])
8867
8868dnl
8869dnl $Id: broken-realloc.m4,v 1.1.12.1 2004/04/01 07:27:32 joda Exp $
8870dnl
8871dnl Test for realloc that doesn't handle NULL as first parameter
8872dnl
8873AC_DEFUN([rk_BROKEN_REALLOC], [
8874AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [
8875ac_cv_func_realloc_broken=no
8876AC_TRY_RUN([
8877#include <stddef.h>
8878#include <stdlib.h>
8879
8880int main()
8881{
8882 return realloc(NULL, 17) == NULL;
8883}
8884],:, ac_cv_func_realloc_broken=yes, :)
8885])
8886if test "$ac_cv_func_realloc_broken" = yes ; then
8887 AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.])
8888fi
8889AH_BOTTOM([#ifdef BROKEN_REALLOC
8890#define realloc(X, Y) isoc_realloc((X), (Y))
8891#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
8892#endif])
8893])
8894
8895dnl $Id: proto-compat.m4,v 1.3.34.1 2004/04/01 07:27:35 joda Exp $
8896dnl
8897dnl
8898dnl Check if the prototype of a function is compatible with another one
8899dnl
8900
8901dnl AC_PROTO_COMPAT(includes, function, prototype)
8902
8903AC_DEFUN([AC_PROTO_COMPAT], [
8904AC_CACHE_CHECK([if $2 is compatible with system prototype],
8905ac_cv_func_$2_proto_compat,
8906AC_TRY_COMPILE([$1],
8907[$3;],
8908eval "ac_cv_func_$2_proto_compat=yes",
8909eval "ac_cv_func_$2_proto_compat=no"))
8910define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
8911if test "$ac_cv_func_$2_proto_compat" = yes; then
8912 AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
8913 $3])
8914fi
8915undefine([foo])
8916])
8917dnl $Id: krb-struct-winsize.m4,v 1.3.10.1 2004/04/01 07:27:34 joda Exp $
8918dnl
8919dnl
8920dnl Search for struct winsize
8921dnl
8922
8923AC_DEFUN([AC_KRB_STRUCT_WINSIZE], [
8924AC_MSG_CHECKING(for struct winsize)
8925AC_CACHE_VAL(ac_cv_struct_winsize, [
8926ac_cv_struct_winsize=no
8927for i in sys/termios.h sys/ioctl.h; do
8928AC_EGREP_HEADER(
8929struct[[ ]]*winsize,dnl
8930$i, ac_cv_struct_winsize=yes; break)dnl
8931done
8932])
8933if test "$ac_cv_struct_winsize" = "yes"; then
8934 AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
8935fi
8936AC_MSG_RESULT($ac_cv_struct_winsize)
8937AC_EGREP_HEADER(ws_xpixel, termios.h,
8938 AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
8939AC_EGREP_HEADER(ws_ypixel, termios.h,
8940 AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
8941])
8942
8943dnl $Id: krb-struct-spwd.m4,v 1.3.32.1 2004/04/01 07:27:34 joda Exp $
8944dnl
8945dnl Test for `struct spwd'
8946
8947AC_DEFUN([AC_KRB_STRUCT_SPWD], [
8948AC_MSG_CHECKING(for struct spwd)
8949AC_CACHE_VAL(ac_cv_struct_spwd, [
8950AC_TRY_COMPILE(
8951[#include <pwd.h>
8952#ifdef HAVE_SHADOW_H
8953#include <shadow.h>
8954#endif],
8955[struct spwd foo;],
8956ac_cv_struct_spwd=yes,
8957ac_cv_struct_spwd=no)
8958])
8959AC_MSG_RESULT($ac_cv_struct_spwd)
8960
8961if test "$ac_cv_struct_spwd" = "yes"; then
8962 AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd])
8963fi
8964])
8965
8966dnl $Id: otp.m4,v 1.2 2002/05/19 20:51:08 joda Exp $
8967dnl
8968dnl check requirements for OTP library
8969dnl
8970AC_DEFUN([rk_OTP],[
8971AC_REQUIRE([rk_DB])dnl
8972AC_ARG_ENABLE(otp,
8973 AC_HELP_STRING([--disable-otp],[if you don't want OTP support]))
8974if test "$enable_otp" = yes -a "$db_type" = unknown; then
8975 AC_MSG_ERROR([OTP requires a NDBM/DB compatible library])
8976fi
8977if test "$enable_otp" != no; then
8978 if test "$db_type" != unknown; then
8979 enable_otp=yes
8980 else
8981 enable_otp=no
8982 fi
8983fi
8984if test "$enable_otp" = yes; then
8985 AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.])
8986 LIB_otp='$(top_builddir)/lib/otp/libotp.la'
8987 AC_SUBST(LIB_otp)
8988fi
8989AC_MSG_CHECKING([whether to enable OTP library])
8990AC_MSG_RESULT($enable_otp)
8991AM_CONDITIONAL(OTP, test "$enable_otp" = yes)dnl
8992])
8993
8994dnl $Id: osfc2.m4,v 1.3.8.1 2004/04/01 07:27:35 joda Exp $
8995dnl
8996dnl enable OSF C2 stuff
8997
8998AC_DEFUN([AC_CHECK_OSFC2],[
8999AC_ARG_ENABLE(osfc2,
9000 AC_HELP_STRING([--enable-osfc2],[enable some OSF C2 support]))
9001LIB_security=
9002if test "$enable_osfc2" = yes; then
9003 AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.])
9004 LIB_security=-lsecurity
9005fi
9006AC_SUBST(LIB_security)
9007])
9008
9009dnl $Id: check-man.m4,v 1.3.12.1 2004/04/01 07:27:32 joda Exp $
9010dnl check how to format manual pages
9011dnl
9012
9013AC_DEFUN([rk_CHECK_MAN],
9014[AC_PATH_PROG(NROFF, nroff)
9015AC_PATH_PROG(GROFF, groff)
9016AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
9017[cat > conftest.1 << END
9018.Dd January 1, 1970
9019.Dt CONFTEST 1
9020.Sh NAME
9021.Nm conftest
9022.Nd
9023foobar
9024END
9025
9026if test "$NROFF" ; then
9027 for i in "-mdoc" "-mandoc"; do
9028 if "$NROFF" $i conftest.1 2> /dev/null | \
9029 grep Jan > /dev/null 2>&1 ; then
9030 ac_cv_sys_man_format="$NROFF $i"
9031 break
9032 fi
9033 done
9034fi
9035if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
9036 for i in "-mdoc" "-mandoc"; do
9037 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
9038 grep Jan > /dev/null 2>&1 ; then
9039 ac_cv_sys_man_format="$GROFF -Tascii $i"
9040 break
9041 fi
9042 done
9043fi
9044if test "$ac_cv_sys_man_format"; then
9045 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
9046fi
9047])
9048if test "$ac_cv_sys_man_format"; then
9049 CATMAN="$ac_cv_sys_man_format"
9050 AC_SUBST(CATMAN)
9051fi
9052AM_CONDITIONAL(CATMAN, test "$CATMAN")
9053AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
9054[if grep _suffix /etc/man.conf > /dev/null 2>&1; then
9055 ac_cv_sys_catman_ext=0
9056else
9057 ac_cv_sys_catman_ext=number
9058fi
9059])
9060if test "$ac_cv_sys_catman_ext" = number; then
9061 CATMANEXT='$$section'
9062else
9063 CATMANEXT=0
9064fi
9065AC_SUBST(CATMANEXT)
9066])
9067dnl
9068dnl $Id: krb-bigendian.m4,v 1.8.6.1 2004/04/01 07:27:33 joda Exp $
9069dnl
9070
9071dnl check if this computer is little or big-endian
9072dnl if we can figure it out at compile-time then don't define the cpp symbol
9073dnl otherwise test for it and define it. also allow options for overriding
9074dnl it when cross-compiling
9075
9076AC_DEFUN([KRB_C_BIGENDIAN], [
9077AC_ARG_ENABLE(bigendian,
9078 AC_HELP_STRING([--enable-bigendian],[the target is big endian]),
9079krb_cv_c_bigendian=yes)
9080AC_ARG_ENABLE(littleendian,
9081 AC_HELP_STRING([--enable-littleendian],[the target is little endian]),
9082krb_cv_c_bigendian=no)
9083AC_CACHE_CHECK(whether byte order is known at compile time,
9084krb_cv_c_bigendian_compile,
9085[AC_TRY_COMPILE([
9086#include <sys/types.h>
9087#include <sys/param.h>],[
9088#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9089 bogus endian macros
9090#endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)])
9091AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[
9092 if test "$krb_cv_c_bigendian_compile" = "yes"; then
9093 AC_TRY_COMPILE([
9094#include <sys/types.h>
9095#include <sys/param.h>],[
9096#if BYTE_ORDER != BIG_ENDIAN
9097 not big endian
9098#endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no)
6435 # On NextStep and OpenStep, the `mkdir' command does not
6436 # recognize any option. It will interpret all options as
6437 # directories to create, and then abort because `.' already
6438 # exists.
6439 for d in ./-p ./--version;
6440 do
6441 test -d $d && rmdir $d
6442 done
6443 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6444 if test -f "$ac_aux_dir/mkinstalldirs"; then
6445 mkdir_p='$(mkinstalldirs)'
9099 else
6446 else
9100 AC_TRY_RUN([main () {
9101 /* Are we little or big endian? From Harbison&Steele. */
9102 union
9103 {
9104 long l;
9105 char c[sizeof (long)];
9106 } u;
9107 u.l = 1;
9108 exit (u.c[sizeof (long) - 1] == 1);
9109 }], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes,
9110 AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian]))
6447 mkdir_p='$(install_sh) -d'
9111 fi
6448 fi
9112])
9113if test "$krb_cv_c_bigendian" = "yes"; then
9114 AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
9115fi
6449fi
9116if test "$krb_cv_c_bigendian_compile" = "yes"; then
9117 AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
9118fi
9119AH_BOTTOM([
9120#if ENDIANESS_IN_SYS_PARAM_H
9121# include <sys/types.h>
9122# include <sys/param.h>
9123# if BYTE_ORDER == BIG_ENDIAN
9124# define WORDS_BIGENDIAN 1
9125# endif
9126#endif
9127])
9128])
6450AC_SUBST([mkdir_p])])
9129
6451
9130dnl
9131dnl $Id: aix.m4,v 1.9.6.1 2004/04/01 07:27:32 joda Exp $
9132dnl
6452# Helper functions for option handling. -*- Autoconf -*-
9133
6453
9134AC_DEFUN([rk_AIX],[
6454# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
9135
6455
9136aix=no
9137case "$host" in
9138*-*-aix3*)
9139 aix=3
9140 ;;
9141*-*-aix4*|*-*-aix5*)
9142 aix=4
9143 ;;
9144esac
6456# This program is free software; you can redistribute it and/or modify
6457# it under the terms of the GNU General Public License as published by
6458# the Free Software Foundation; either version 2, or (at your option)
6459# any later version.
9145
6460
9146AM_CONDITIONAL(AIX, test "$aix" != no)dnl
9147AM_CONDITIONAL(AIX4, test "$aix" = 4)
6461# This program is distributed in the hope that it will be useful,
6462# but WITHOUT ANY WARRANTY; without even the implied warranty of
6463# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6464# GNU General Public License for more details.
9148
6465
6466# You should have received a copy of the GNU General Public License
6467# along with this program; if not, write to the Free Software
6468# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6469# 02111-1307, USA.
9149
6470
9150AC_ARG_ENABLE(dynamic-afs,
9151 AC_HELP_STRING([--disable-dynamic-afs],
9152 [do not use loaded AFS library with AIX]))
6471# serial 2
9153
6472
9154if test "$aix" != no; then
9155 if test "$enable_dynamic_afs" != no; then
9156 AC_REQUIRE([rk_DLOPEN])
9157 if test "$ac_cv_func_dlopen" = no; then
9158 AC_FIND_FUNC_NO_LIBS(loadquery, ld)
9159 fi
9160 if test "$ac_cv_func_dlopen" != no; then
9161 AIX_EXTRA_KAFS='$(LIB_dlopen)'
9162 elif test "$ac_cv_func_loadquery" != no; then
9163 AIX_EXTRA_KAFS='$(LIB_loadquery)'
9164 else
9165 AC_MSG_NOTICE([not using dynloaded AFS library])
9166 AIX_EXTRA_KAFS=
9167 enable_dynamic_afs=no
9168 fi
9169 else
9170 AIX_EXTRA_KAFS=
9171 fi
9172fi
6473# _AM_MANGLE_OPTION(NAME)
6474# -----------------------
6475AC_DEFUN([_AM_MANGLE_OPTION],
6476[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9173
6477
9174AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl
9175AC_SUBST(AIX_EXTRA_KAFS)dnl
6478# _AM_SET_OPTION(NAME)
6479# ------------------------------
6480# Set option NAME. Presently that only means defining a flag for this option.
6481AC_DEFUN([_AM_SET_OPTION],
6482[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9176
6483
9177AH_BOTTOM([#if _AIX
9178#define _ALL_SOURCE
9179/* XXX this is gross, but kills about a gazillion warnings */
9180struct ether_addr;
9181struct sockaddr;
9182struct sockaddr_dl;
9183struct sockaddr_in;
9184#endif])
6484# _AM_SET_OPTIONS(OPTIONS)
6485# ----------------------------------
6486# OPTIONS is a space-separated list of Automake options.
6487AC_DEFUN([_AM_SET_OPTIONS],
6488[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9185
6489
9186])
6490# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6491# -------------------------------------------
6492# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6493AC_DEFUN([_AM_IF_OPTION],
6494[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9187
6495
9188dnl
9189dnl $Id: dlopen.m4,v 1.1 2002/08/28 16:32:16 joda Exp $
9190dnl
9191
9192AC_DEFUN([rk_DLOPEN], [
9193 AC_FIND_FUNC_NO_LIBS(dlopen, dl)
9194 AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no)
9195])
9196
9197dnl
9198dnl $Id: irix.m4,v 1.1 2002/08/28 19:11:44 joda Exp $
9199dnl
9200
9201AC_DEFUN([rk_IRIX],
9202[
9203irix=no
9204case "$host" in
9205*-*-irix4*)
9206 AC_DEFINE([IRIX4], 1,
9207 [Define if you are running IRIX 4.])
9208 irix=yes
9209 ;;
9210*-*-irix*)
9211 irix=yes
9212 ;;
9213esac
9214AM_CONDITIONAL(IRIX, test "$irix" != no)dnl
9215
9216AH_BOTTOM([
9217/* IRIX 4 braindamage */
9218#if IRIX == 4 && !defined(__STDC__)
9219#define __STDC__ 0
9220#endif
9221])
9222])
9223
9224dnl
9225dnl $Id: sunos.m4,v 1.2 2002/10/16 14:42:13 joda Exp $
9226dnl
9227
9228AC_DEFUN([rk_SUNOS],[
9229sunos=no
9230case "$host" in
9231*-*-sunos4*)
9232 sunos=40
9233 ;;
9234*-*-solaris2.7)
9235 sunos=57
9236 ;;
9237*-*-solaris2.[[89]])
9238 sunos=58
9239 ;;
9240*-*-solaris2*)
9241 sunos=50
9242 ;;
9243esac
9244if test "$sunos" != no; then
9245 AC_DEFINE_UNQUOTED(SunOS, $sunos,
9246 [Define to what version of SunOS you are running.])
9247fi
9248])
9249dnl
9250dnl See if there is any X11 present
9251dnl
9252dnl $Id: check-x.m4,v 1.2.20.1 2004/04/01 07:27:33 joda Exp $
9253
9254AC_DEFUN([KRB_CHECK_X],[
9255AC_PATH_XTRA
9256
9257# try to figure out if we need any additional ld flags, like -R
9258# and yes, the autoconf X test is utterly broken
9259if test "$no_x" != yes; then
9260 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
9261 ac_save_libs="$LIBS"
9262 ac_save_cflags="$CFLAGS"
9263 CFLAGS="$CFLAGS $X_CFLAGS"
9264 krb_cv_sys_x_libs_rpath=""
9265 krb_cv_sys_x_libs=""
9266 for rflag in "" "-R" "-R " "-rpath "; do
9267 if test "$rflag" = ""; then
9268 foo="$X_LIBS"
9269 else
9270 foo=""
9271 for flag in $X_LIBS; do
9272 case $flag in
9273 -L*)
9274 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
9275 ;;
9276 *)
9277 foo="$foo $flag"
9278 ;;
9279 esac
9280 done
9281 fi
9282 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
9283 AC_TRY_RUN([
9284 #include <X11/Xlib.h>
9285 foo()
9286 {
9287 XOpenDisplay(NULL);
9288 }
9289 main()
9290 {
9291 return 0;
9292 }
9293 ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:)
9294 done
9295 LIBS="$ac_save_libs"
9296 CFLAGS="$ac_save_cflags"
9297 ])
9298 X_LIBS="$krb_cv_sys_x_libs"
9299fi
9300])
9301
9302dnl $Id: check-xau.m4,v 1.3.34.1 2004/04/01 07:27:33 joda Exp $
9303dnl
9304dnl check for Xau{Read,Write}Auth and XauFileName
9305dnl
9306AC_DEFUN([AC_CHECK_XAU],[
9307save_CFLAGS="$CFLAGS"
9308CFLAGS="$X_CFLAGS $CFLAGS"
9309save_LIBS="$LIBS"
9310dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
9311LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
9312save_LDFLAGS="$LDFLAGS"
9313LDFLAGS="$LDFLAGS $X_LIBS"
9314
9315
9316AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau)
9317ac_xxx="$LIBS"
9318LIBS="$LIB_XauWriteAuth $LIBS"
9319AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau)
9320LIBS="$LIB_XauReadAauth $LIBS"
9321AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau)
9322LIBS="$ac_xxx"
9323
9324case "$ac_cv_funclib_XauWriteAuth" in
9325yes) ;;
9326no) ;;
9327*) if test "$ac_cv_funclib_XauReadAuth" = yes; then
9328 if test "$ac_cv_funclib_XauFileName" = yes; then
9329 LIB_XauReadAuth="$LIB_XauWriteAuth"
9330 else
9331 LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
9332 fi
9333 else
9334 if test "$ac_cv_funclib_XauFileName" = yes; then
9335 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
9336 else
9337 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
9338 fi
9339 fi
9340 ;;
9341esac
9342
9343if test "$AUTOMAKE" != ""; then
9344 AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes")
9345else
9346 AC_SUBST(NEED_WRITEAUTH_TRUE)
9347 AC_SUBST(NEED_WRITEAUTH_FALSE)
9348 if test "$ac_cv_func_XauWriteAuth" != "yes"; then
9349 NEED_WRITEAUTH_TRUE=
9350 NEED_WRITEAUTH_FALSE='#'
9351 else
9352 NEED_WRITEAUTH_TRUE='#'
9353 NEED_WRITEAUTH_FALSE=
9354 fi
9355fi
9356CFLAGS=$save_CFLAGS
9357LIBS=$save_LIBS
9358LDFLAGS=$save_LDFLAGS
9359])
9360
9361dnl $Id: check-type-extra.m4,v 1.2.34.1 2004/04/01 07:27:33 joda Exp $
9362dnl
9363dnl ac_check_type + extra headers
9364
9365dnl AC_CHECK_TYPE_EXTRA(TYPE, DEFAULT, HEADERS)
9366AC_DEFUN([AC_CHECK_TYPE_EXTRA],
9367[AC_REQUIRE([AC_HEADER_STDC])dnl
9368AC_MSG_CHECKING(for $1)
9369AC_CACHE_VAL(ac_cv_type_$1,
9370[AC_EGREP_CPP(dnl
9371changequote(<<,>>)dnl
9372<<$1[^a-zA-Z_0-9]>>dnl
9373changequote([,]), [#include <sys/types.h>
9374#if STDC_HEADERS
9375#include <stdlib.h>
9376#include <stddef.h>
9377#endif
9378$3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
9379AC_MSG_RESULT($ac_cv_type_$1)
9380if test $ac_cv_type_$1 = no; then
9381 AC_DEFINE($1, $2, [Define this to what the type $1 should be.])
9382fi
9383])
9384
9385dnl
9386dnl $Id: capabilities.m4,v 1.2.20.1 2004/04/01 07:27:32 joda Exp $
9387dnl
9388
9389dnl
9390dnl Test SGI capabilities
9391dnl
9392
9393AC_DEFUN([KRB_CAPABILITIES],[
9394
9395AC_CHECK_HEADERS(capability.h sys/capability.h)
9396
9397AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc)
9398])
9399
9400dnl $Id: check-getpwnam_r-posix.m4,v 1.2.34.1 2004/04/01 07:27:32 joda Exp $
9401dnl
9402dnl check for getpwnam_r, and if it's posix or not
9403
9404AC_DEFUN([AC_CHECK_GETPWNAM_R_POSIX],[
9405AC_FIND_FUNC_NO_LIBS(getpwnam_r,c_r)
9406if test "$ac_cv_func_getpwnam_r" = yes; then
9407 AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix,
9408 ac_libs="$LIBS"
9409 LIBS="$LIBS $LIB_getpwnam_r"
9410 AC_TRY_RUN([
9411#include <pwd.h>
9412int main()
9413{
9414 struct passwd pw, *pwd;
9415 return getpwnam_r("", &pw, NULL, 0, &pwd) < 0;
9416}
9417],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:)
9418LIBS="$ac_libs")
9419if test "$ac_cv_func_getpwnam_r_posix" = yes; then
9420 AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.])
9421fi
9422fi
9423])
9424dnl $Id: krb-readline.m4,v 1.5.6.1 2004/04/01 07:27:34 joda Exp $
9425dnl
9426dnl Tests for readline functions
9427dnl
9428
9429dnl el_init
9430
9431AC_DEFUN([KRB_READLINE],[
9432AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent])
9433if test "$ac_cv_func_el_init" = yes ; then
9434 AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[
9435 AC_TRY_COMPILE([#include <stdio.h>
9436 #include <histedit.h>],
9437 [el_init("", NULL, NULL, NULL);],
9438 ac_cv_func_el_init_four=yes,
9439 ac_cv_func_el_init_four=no)])
9440 if test "$ac_cv_func_el_init_four" = yes; then
9441 AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.])
9442 fi
9443fi
9444
9445dnl readline
9446
9447ac_foo=no
9448if test "$with_readline" = yes; then
9449 :
9450elif test "$ac_cv_func_readline" = yes; then
9451 :
9452elif test "$ac_cv_func_el_init" = yes; then
9453 ac_foo=yes
9454 LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)"
9455else
9456 LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)"
9457fi
9458AM_CONDITIONAL(el_compat, test "$ac_foo" = yes)
9459AC_DEFINE(HAVE_READLINE, 1,
9460 [Define if you have a readline compatible library.])dnl
9461
9462])
9463
9464dnl
9465dnl $Id: telnet.m4,v 1.1 2002/08/28 19:19:01 joda Exp $
9466dnl
9467dnl stuff used by telnet
9468
9469AC_DEFUN([rk_TELNET],[
9470AC_DEFINE(AUTHENTICATION, 1,
9471 [Define if you want authentication support in telnet.])dnl
9472AC_DEFINE(ENCRYPTION, 1,
9473 [Define if you want encryption support in telnet.])dnl
9474AC_DEFINE(DES_ENCRYPTION, 1,
9475 [Define if you want to use DES encryption in telnet.])dnl
9476AC_DEFINE(DIAGNOSTICS, 1,
9477 [Define this to enable diagnostics in telnet.])dnl
9478AC_DEFINE(OLD_ENVIRON, 1,
9479 [Define this to enable old environment option in telnet.])dnl
9480if false; then
9481 AC_DEFINE(ENV_HACK, 1,
9482 [Define this if you want support for broken ENV_{VAR,VAL} telnets.])
9483fi
9484
9485# Simple test for streamspty, based on the existance of getmsg(), alas
9486# this breaks on SunOS4 which have streams but BSD-like ptys
9487#
6496#
9488# And also something wierd has happend with dec-osf1, fallback to bsd-ptys
6497# Check to make sure that the build environment is sane.
6498#
9489
6499
9490case "$host" in
9491*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
9492 ;;
9493*)
9494 AC_CHECK_FUNC(getmsg)
9495 if test "$ac_cv_func_getmsg" = "yes"; then
9496 AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works,
9497 AC_TRY_RUN([
9498 #include <stdio.h>
9499 #include <errno.h>
6500# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
9500
6501
9501 int main()
9502 {
9503 int ret;
9504 ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
9505 if(ret < 0 && errno == ENOSYS)
9506 return 1;
9507 return 0;
9508 }
9509 ], ac_cv_func_getmsg_works=yes,
9510 ac_cv_func_getmsg_works=no,
9511 ac_cv_func_getmsg_works=no))
9512 if test "$ac_cv_func_getmsg_works" = "yes"; then
9513 AC_DEFINE(HAVE_GETMSG, 1,
9514 [Define if you have a working getmsg.])
9515 AC_DEFINE(STREAMSPTY, 1,
9516 [Define if you have streams ptys.])
9517 fi
9518 fi
9519 ;;
9520esac
6502# This program is free software; you can redistribute it and/or modify
6503# it under the terms of the GNU General Public License as published by
6504# the Free Software Foundation; either version 2, or (at your option)
6505# any later version.
9521
6506
9522AH_BOTTOM([
9523#if defined(ENCRYPTION) && !defined(AUTHENTICATION)
9524#define AUTHENTICATION 1
9525#endif
6507# This program is distributed in the hope that it will be useful,
6508# but WITHOUT ANY WARRANTY; without even the implied warranty of
6509# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6510# GNU General Public License for more details.
9526
6511
9527/* Set this to the default system lead string for telnetd
9528 * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
9529 * %v=os-version, %t=tty, %h=hostname, %d=date and time
9530 */
9531#undef USE_IM
6512# You should have received a copy of the GNU General Public License
6513# along with this program; if not, write to the Free Software
6514# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6515# 02111-1307, USA.
9532
6516
9533/* Used with login -p */
9534#undef LOGIN_ARGS
6517# serial 3
9535
6518
9536/* set this to a sensible login */
9537#ifndef LOGIN_PATH
9538#define LOGIN_PATH BINDIR "/login"
9539#endif
9540])
9541])
6519# AM_SANITY_CHECK
6520# ---------------
6521AC_DEFUN([AM_SANITY_CHECK],
6522[AC_MSG_CHECKING([whether build environment is sane])
6523# Just in case
6524sleep 1
6525echo timestamp > conftest.file
6526# Do `set' in a subshell so we don't clobber the current shell's
6527# arguments. Must try -L first in case configure is actually a
6528# symlink; some systems play weird games with the mod time of symlinks
6529# (eg FreeBSD returns the mod time of the symlink's containing
6530# directory).
6531if (
6532 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6533 if test "$[*]" = "X"; then
6534 # -L didn't work.
6535 set X `ls -t $srcdir/configure conftest.file`
6536 fi
6537 rm -f conftest.file
6538 if test "$[*]" != "X $srcdir/configure conftest.file" \
6539 && test "$[*]" != "X conftest.file $srcdir/configure"; then
9542
6540
9543dnl $Id: check-compile-et.m4,v 1.7.2.1 2003/08/15 14:40:42 lha Exp $
9544dnl
9545dnl CHECK_COMPILE_ET
9546AC_DEFUN([CHECK_COMPILE_ET], [
6541 # If neither matched, then we have a broken ls. This can happen
6542 # if, for instance, CONFIG_SHELL is bash and it inherits a
6543 # broken ls alias from the environment. This has actually
6544 # happened. Such a system could not be considered "sane".
6545 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
6546alias in your environment])
6547 fi
9547
6548
9548AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et])
9549
9550krb_cv_compile_et="no"
9551krb_cv_com_err_need_r=""
9552if test "${COMPILE_ET}" = "compile_et"; then
9553
9554dnl We have compile_et. Now let's see if it supports `prefix' and `index'.
9555AC_MSG_CHECKING(whether compile_et has the features we need)
9556cat > conftest_et.et <<'EOF'
9557error_table test conf
9558prefix CONFTEST
9559index 1
9560error_code CODE1, "CODE1"
9561index 128
9562error_code CODE2, "CODE2"
9563end
9564EOF
9565if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then
9566 dnl XXX Some systems have <et/com_err.h>.
9567 save_CPPFLAGS="${CPPFLAGS}"
9568 if test -d "/usr/include/et"; then
9569 CPPFLAGS="-I/usr/include/et ${CPPFLAGS}"
9570 fi
9571 dnl Check that the `prefix' and `index' directives were honored.
9572 AC_TRY_RUN([
9573#include <com_err.h>
9574#include <string.h>
9575#include "conftest_et.h"
9576int main(){
9577#ifndef ERROR_TABLE_BASE_conf
9578#error compile_et does not handle error_table N M
9579#endif
9580return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;}
9581 ], [krb_cv_compile_et="yes"],[CPPFLAGS="${save_CPPFLAGS}"])
9582fi
9583AC_MSG_RESULT(${krb_cv_compile_et})
9584if test "${krb_cv_compile_et}" = "yes"; then
9585 AC_MSG_CHECKING(for if com_err needs to have a initialize_error_table_r)
9586 AC_EGREP_CPP(initialize_error_table_r,[#include "conftest_et.c"],
9587 [krb_cv_com_err_need_r="initialize_error_table_r(0,0,0,0);"])
9588 if test X"$krb_cv_com_err_need_r" = X ; then
9589 AC_MSG_RESULT(no)
9590 else
9591 AC_MSG_RESULT(yes)
9592 fi
9593fi
9594rm -fr conftest*
9595fi
9596
9597if test "${krb_cv_compile_et}" = "yes"; then
9598 dnl Since compile_et seems to work, let's check libcom_err
9599 krb_cv_save_LIBS="${LIBS}"
9600 LIBS="${LIBS} -lcom_err"
9601 AC_MSG_CHECKING(for com_err)
9602 AC_TRY_LINK([#include <com_err.h>],[
9603 const char *p;
9604 p = error_message(0);
9605 $krb_cv_com_err_need_r
9606 ],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"])
9607 AC_MSG_RESULT(${krb_cv_com_err})
9608 LIBS="${krb_cv_save_LIBS}"
6549 test "$[2]" = conftest.file
6550 )
6551then
6552 # Ok.
6553 :
9609else
6554else
9610 dnl Since compile_et doesn't work, forget about libcom_err
9611 krb_cv_com_err="no"
6555 AC_MSG_ERROR([newly created file is older than distributed files!
6556Check your system clock])
9612fi
6557fi
6558AC_MSG_RESULT(yes)])
9613
6559
9614dnl Only use the system's com_err if we found compile_et, libcom_err, and
9615dnl com_err.h.
9616if test "${krb_cv_com_err}" = "yes"; then
9617 DIR_com_err=""
9618 LIB_com_err="-lcom_err"
9619 LIB_com_err_a=""
9620 LIB_com_err_so=""
9621 AC_MSG_NOTICE(Using the already-installed com_err)
9622else
9623 COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et"
9624 DIR_com_err="com_err"
9625 LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la"
9626 LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a"
9627 LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so"
9628 AC_MSG_NOTICE(Using our own com_err)
9629fi
9630AC_SUBST(DIR_com_err)
9631AC_SUBST(LIB_com_err)
9632AC_SUBST(LIB_com_err_a)
9633AC_SUBST(LIB_com_err_so)
6560# AM_PROG_INSTALL_STRIP
9634
6561
9635])
6562# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
9636
6563
9637dnl $Id: auth-modules.m4,v 1.5.6.1 2004/04/01 07:27:32 joda Exp $
9638dnl
9639dnl Figure what authentication modules should be built
9640dnl
9641dnl rk_AUTH_MODULES(module-list)
6564# This program is free software; you can redistribute it and/or modify
6565# it under the terms of the GNU General Public License as published by
6566# the Free Software Foundation; either version 2, or (at your option)
6567# any later version.
9642
6568
9643AC_DEFUN([rk_AUTH_MODULES],[
9644AC_MSG_CHECKING([which authentication modules should be built])
6569# This program is distributed in the hope that it will be useful,
6570# but WITHOUT ANY WARRANTY; without even the implied warranty of
6571# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6572# GNU General Public License for more details.
9645
6573
9646z='m4_ifval([$1], $1, [sia pam afskauthlib])'
9647LIB_AUTH_SUBDIRS=
9648for i in $z; do
9649case $i in
9650sia)
9651if test "$ac_cv_header_siad_h" = yes; then
9652 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia"
9653fi
9654;;
9655pam)
9656case "${host}" in
9657*-*-freebsd*) ac_cv_want_pam_krb4=no ;;
9658*) ac_cv_want_pam_krb4=yes ;;
9659esac
6574# You should have received a copy of the GNU General Public License
6575# along with this program; if not, write to the Free Software
6576# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6577# 02111-1307, USA.
9660
6578
9661if test "$ac_cv_want_pam_krb4" = yes -a \
9662 "$ac_cv_header_security_pam_modules_h" = yes -a \
9663 "$enable_shared" = yes; then
9664 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam"
6579# One issue with vendor `install' (even GNU) is that you can't
6580# specify the program used to strip binaries. This is especially
6581# annoying in cross-compiling environments, where the build's strip
6582# is unlikely to handle the host's binaries.
6583# Fortunately install-sh will honor a STRIPPROG variable, so we
6584# always use install-sh in `make install-strip', and initialize
6585# STRIPPROG with the value of the STRIP variable (set by the user).
6586AC_DEFUN([AM_PROG_INSTALL_STRIP],
6587[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6588# Installed binaries are usually stripped using `strip' when the user
6589# run `make install-strip'. However `strip' might not be the right
6590# tool to use in cross-compilation environments, therefore Automake
6591# will honor the `STRIP' environment variable to overrule this program.
6592dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
6593if test "$cross_compiling" != no; then
6594 AC_CHECK_TOOL([STRIP], [strip], :)
9665fi
6595fi
9666;;
9667afskauthlib)
9668case "${host}" in
9669*-*-irix[[56]]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;;
9670esac
9671;;
9672esac
9673done
9674if test "$LIB_AUTH_SUBDIRS"; then
9675 AC_MSG_RESULT($LIB_AUTH_SUBDIRS)
9676else
9677 AC_MSG_RESULT(none)
9678fi
6596INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6597AC_SUBST([INSTALL_STRIP_PROGRAM])])
9679
6598
9680AC_SUBST(LIB_AUTH_SUBDIRS)dnl
9681])
9682
9683dnl
9684dnl $Id: destdirs.m4,v 1.2 2002/08/12 15:12:50 joda Exp $
9685dnl
9686
9687AC_DEFUN([rk_DESTDIRS], [
9688# This is done by AC_OUTPUT but we need the result here.
9689test "x$prefix" = xNONE && prefix=$ac_default_prefix
9690test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9691
9692AC_FOREACH([rk_dir], [bin lib libexec localstate sbin sysconf], [
9693 x="${rk_dir[]dir}"
9694 eval y="$x"
9695 while test "x$y" != "x$x"; do
9696 x="$y"
9697 eval y="$x"
9698 done
9699 AC_DEFINE_UNQUOTED(AS_TR_CPP(rk_dir[]dir), "$x", [path to ]rk_dir[])])
9700])
9701
6599m4_include([cf/aix.m4])
6600m4_include([cf/auth-modules.m4])
6601m4_include([cf/broken-getaddrinfo.m4])
6602m4_include([cf/broken-getnameinfo.m4])
6603m4_include([cf/broken-glob.m4])
6604m4_include([cf/broken-realloc.m4])
6605m4_include([cf/broken-snprintf.m4])
6606m4_include([cf/broken.m4])
6607m4_include([cf/broken2.m4])
6608m4_include([cf/c-attribute.m4])
6609m4_include([cf/capabilities.m4])
6610m4_include([cf/check-compile-et.m4])
6611m4_include([cf/check-declaration.m4])
6612m4_include([cf/check-getpwnam_r-posix.m4])
6613m4_include([cf/check-man.m4])
6614m4_include([cf/check-netinet-ip-and-tcp.m4])
6615m4_include([cf/check-type-extra.m4])
6616m4_include([cf/check-var.m4])
6617m4_include([cf/check-x.m4])
6618m4_include([cf/check-xau.m4])
6619m4_include([cf/crypto.m4])
6620m4_include([cf/db.m4])
6621m4_include([cf/destdirs.m4])
6622m4_include([cf/dlopen.m4])
6623m4_include([cf/find-func-no-libs.m4])
6624m4_include([cf/find-func-no-libs2.m4])
6625m4_include([cf/find-func.m4])
6626m4_include([cf/find-if-not-broken.m4])
6627m4_include([cf/have-struct-field.m4])
6628m4_include([cf/have-type.m4])
6629m4_include([cf/irix.m4])
6630m4_include([cf/krb-bigendian.m4])
6631m4_include([cf/krb-func-getlogin.m4])
6632m4_include([cf/krb-ipv6.m4])
6633m4_include([cf/krb-prog-ln-s.m4])
6634m4_include([cf/krb-readline.m4])
6635m4_include([cf/krb-struct-spwd.m4])
6636m4_include([cf/krb-struct-winsize.m4])
6637m4_include([cf/mips-abi.m4])
6638m4_include([cf/misc.m4])
6639m4_include([cf/need-proto.m4])
6640m4_include([cf/osfc2.m4])
6641m4_include([cf/otp.m4])
6642m4_include([cf/proto-compat.m4])
6643m4_include([cf/retsigtype.m4])
6644m4_include([cf/roken-frag.m4])
6645m4_include([cf/sunos.m4])
6646m4_include([cf/telnet.m4])
6647m4_include([cf/test-package.m4])
6648m4_include([cf/wflags.m4])
6649m4_include([cf/with-all.m4])