]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/radiusclient/aclocal.m4
Added radius_pre_auth_hook to let additional plugins stacked on top
[ppp.git] / pppd / plugins / radius / radiusclient / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.3
2
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
12
13 # Do all the work for Automake.  This macro actually does too much --
14 # some checks are only needed if your package does certain things.
15 # But this isn't really a big deal.
16
17 # serial 1
18
19 dnl Usage:
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21
22 AC_DEFUN(AM_INIT_AUTOMAKE,
23 [AC_REQUIRE([AM_PROG_INSTALL])
24 PACKAGE=[$1]
25 AC_SUBST(PACKAGE)
26 VERSION=[$2]
27 AC_SUBST(VERSION)
28 dnl test to see if srcdir already configured
29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
31 fi
32 ifelse([$3],,
33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
35 AC_REQUIRE([AM_SANITY_CHECK])
36 AC_REQUIRE([AC_ARG_PROGRAM])
37 dnl FIXME This is truly gross.
38 missing_dir=`cd $ac_aux_dir && pwd`
39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44 AC_REQUIRE([AC_PROG_MAKE_SET])])
45
46
47 # serial 1
48
49 AC_DEFUN(AM_PROG_INSTALL,
50 [AC_REQUIRE([AC_PROG_INSTALL])
51 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
52 AC_SUBST(INSTALL_SCRIPT)dnl
53 ])
54
55 #
56 # Check to make sure that the build environment is sane.
57 #
58
59 AC_DEFUN(AM_SANITY_CHECK,
60 [AC_MSG_CHECKING([whether build environment is sane])
61 # Just in case
62 sleep 1
63 echo timestamp > conftestfile
64 # Do `set' in a subshell so we don't clobber the current shell's
65 # arguments.  Must try -L first in case configure is actually a
66 # symlink; some systems play weird games with the mod time of symlinks
67 # (eg FreeBSD returns the mod time of the symlink's containing
68 # directory).
69 if (
70    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
71    if test "[$]*" = "X"; then
72       # -L didn't work.
73       set X `ls -t $srcdir/configure conftestfile`
74    fi
75    if test "[$]*" != "X $srcdir/configure conftestfile" \
76       && test "[$]*" != "X conftestfile $srcdir/configure"; then
77
78       # If neither matched, then we have a broken ls.  This can happen
79       # if, for instance, CONFIG_SHELL is bash and it inherits a
80       # broken ls alias from the environment.  This has actually
81       # happened.  Such a system could not be considered "sane".
82       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
83 alias in your environment])
84    fi
85
86    test "[$]2" = conftestfile
87    )
88 then
89    # Ok.
90    :
91 else
92    AC_MSG_ERROR([newly created file is older than distributed files!
93 Check your system clock])
94 fi
95 rm -f conftest*
96 AC_MSG_RESULT(yes)])
97
98 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
99 dnl The program must properly implement --version.
100 AC_DEFUN(AM_MISSING_PROG,
101 [AC_MSG_CHECKING(for working $2)
102 # Run test in a subshell; some versions of sh will print an error if
103 # an executable is not found, even if stderr is redirected.
104 # Redirect stdin to placate older versions of autoconf.  Sigh.
105 if ($2 --version) < /dev/null > /dev/null 2>&1; then
106    $1=$2
107    AC_MSG_RESULT(found)
108 else
109    $1="$3/missing $2"
110    AC_MSG_RESULT(missing)
111 fi
112 AC_SUBST($1)])
113
114
115 # serial 18 AM_PROG_LIBTOOL
116 AC_DEFUN(AM_PROG_LIBTOOL,
117 [AC_REQUIRE([AC_CANONICAL_HOST])
118 AC_REQUIRE([AC_PROG_RANLIB])
119 AC_REQUIRE([AC_PROG_CC])
120 AC_REQUIRE([AM_PROG_LD])
121 AC_REQUIRE([AM_PROG_NM])
122 AC_REQUIRE([AC_PROG_LN_S])
123
124 # Always use our own libtool.
125 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
126 AC_SUBST(LIBTOOL)
127
128 dnl Allow the --disable-shared flag to stop us from building shared libs.
129 AC_ARG_ENABLE(shared,
130 [  --enable-shared         build shared libraries [default=yes]],
131 [if test "$enableval" = no; then
132   libtool_enable_shared=no
133 else
134   libtool_enable_shared=yes
135 fi])
136 test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
137 libtool_shared=
138 test "$enable_shared" = no && libtool_shared=" --disable-shared"
139
140 dnl Allow the --disable-static flag to stop us from building static libs.
141 AC_ARG_ENABLE(static,
142 [  --enable-static         build static libraries [default=yes]],
143 [if test "$enableval" = no; then
144   libtool_enable_static=no
145 else
146   libtool_enable_static=yes
147 fi])
148 test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
149 libtool_static=
150 test "$enable_static" = no && libtool_static=" --disable-static"
151
152 libtool_flags="$libtool_shared$libtool_static"
153 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
154 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
155 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
156
157 # Some flags need to be propagated to the compiler or linker for good
158 # libtool support.
159 [case "$host" in
160 *-*-irix6*)
161   ac_save_CFLAGS="$CFLAGS"
162   flag_passed=no
163   for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
164     case "$f" in
165     ABI)
166       test -n "$SGI_ABI" && flag_passed=yes
167       if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
168         # Choose the ABI flag according to GCC's specs.
169         if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[         ]-32' >/dev/null; then
170           LD="${LD-ld} -32"
171         else
172           LD="${LD-ld} -n32"
173         fi
174       fi
175       ;;
176
177     *)
178       if echo " $CC $CFLAGS " | egrep -e "[     ]$f[     ]" > /dev/null; then
179         flag_passed=yes
180         LD="${LD-ld} $f"
181       fi
182       ;;
183     esac
184   done
185   CFLAGS="$ac_save_CFLAGS"
186   ;;
187
188 *-*-sco3.2v5*)
189   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
190   CFLAGS="$CFLAGS -belf"
191   ;;
192 esac]
193
194 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
195 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
196 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
197 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
198 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
199 || AC_MSG_ERROR([libtool configure failed])
200 ])
201
202 # AM_PROG_LD - find the path to the GNU or non-GNU linker
203 AC_DEFUN(AM_PROG_LD,
204 [AC_ARG_WITH(gnu-ld,
205 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
206 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
207 AC_REQUIRE([AC_PROG_CC])
208 ac_prog=ld
209 if test "$ac_cv_prog_gcc" = yes; then
210   # Check if gcc -print-prog-name=ld gives a path.
211   AC_MSG_CHECKING([for ld used by GCC])
212   ac_prog=`($CC -print-prog-name=ld) 2>&5`
213   case "$ac_prog" in
214   # Accept absolute paths.
215   /*)
216     test -z "$LD" && LD="$ac_prog"
217     ;;
218   "")
219     # If it fails, then pretend we aren't using GCC.
220     ac_prog=ld
221     ;;
222   *)
223     # If it is relative, then search for the first ld in PATH.
224     with_gnu_ld=unknown
225     ;;
226   esac
227 elif test "$with_gnu_ld" = yes; then
228   AC_MSG_CHECKING([for GNU ld])
229 else
230   AC_MSG_CHECKING([for non-GNU ld])
231 fi
232 AC_CACHE_VAL(ac_cv_path_LD,
233 [if test -z "$LD"; then
234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
235   for ac_dir in $PATH; do
236     test -z "$ac_dir" && ac_dir=.
237     if test -f "$ac_dir/$ac_prog"; then
238       ac_cv_path_LD="$ac_dir/$ac_prog"
239       # Check to see if the program is GNU ld.  I'd rather use --version,
240       # but apparently some GNU ld's only accept -v.
241       # Break only if it was the GNU/non-GNU ld that we prefer.
242       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
243         test "$with_gnu_ld" != no && break
244       else
245         test "$with_gnu_ld" != yes && break
246       fi
247     fi
248   done
249   IFS="$ac_save_ifs"
250 else
251   ac_cv_path_LD="$LD" # Let the user override the test with a path.
252 fi])
253 LD="$ac_cv_path_LD"
254 if test -n "$LD"; then
255   AC_MSG_RESULT($LD)
256 else
257   AC_MSG_RESULT(no)
258 fi
259 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
260 AC_SUBST(LD)
261 AM_PROG_LD_GNU
262 ])
263
264 AC_DEFUN(AM_PROG_LD_GNU,
265 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
266 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
267 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
268   ac_cv_prog_gnu_ld=yes
269 else
270   ac_cv_prog_gnu_ld=no
271 fi])
272 ])
273
274 # AM_PROG_NM - find the path to a BSD-compatible name lister
275 AC_DEFUN(AM_PROG_NM,
276 [AC_MSG_CHECKING([for BSD-compatible nm])
277 AC_CACHE_VAL(ac_cv_path_NM,
278 [case "$NM" in
279 /*)
280   ac_cv_path_NM="$NM" # Let the user override the test with a path.
281   ;;
282 *)
283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
284   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
285     test -z "$ac_dir" && dir=.
286     if test -f $ac_dir/nm; then
287       # Check to see if the nm accepts a BSD-compat flag.
288       # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
289       #   nm: unknown option "B" ignored
290       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
291         ac_cv_path_NM="$ac_dir/nm -B"
292       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
293         ac_cv_path_NM="$ac_dir/nm -p"
294       else
295         ac_cv_path_NM="$ac_dir/nm"
296       fi
297       break
298     fi
299   done
300   IFS="$ac_save_ifs"
301   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
302   ;;
303 esac])
304 NM="$ac_cv_path_NM"
305 AC_MSG_RESULT([$NM])
306 AC_SUBST(NM)
307 ])
308
309 # Like AC_CONFIG_HEADER, but automatically create stamp file.
310
311 AC_DEFUN(AM_CONFIG_HEADER,
312 [AC_PREREQ([2.12])
313 AC_CONFIG_HEADER([$1])
314 dnl When config.status generates a header, we must update the stamp-h file.
315 dnl This file resides in the same directory as the config header
316 dnl that is generated.  We must strip everything past the first ":",
317 dnl and everything past the last "/".
318 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
319 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
320 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
321 <<am_indx=1
322 for am_file in <<$1>>; do
323   case " <<$>>CONFIG_HEADERS " in
324   *" <<$>>am_file "*<<)>>
325     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
326     ;;
327   esac
328   am_indx=`expr "<<$>>am_indx" + 1`
329 done<<>>dnl>>)
330 changequote([,]))])
331