1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
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.
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
15
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
16
# local automake definitions for ntop
17
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
19
# Copyright (c) 1998-2003 Luca Deri <deri@ntop.org>
20
# Updated 1Q 2000 Rocco Carbone <rocco@ntop.org>
21
# Rewrite 1Q 2003 Burton M. Strauss III <burton@ntopsupport.com>
23
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
25
# This program is free software; you can redistribute it and/or modify
26
# it under the terms of the GNU General Public License as published by
27
# the Free Software Foundation; either version 2 of the License, or
28
# (at your option) any later version.
30
# This program is distributed in the hope that it will be useful,
31
# but WITHOUT ANY WARRANTY; without even the implied warranty of
32
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
# GNU General Public License for more details.
35
# You should have received a copy of the GNU General Public License
36
# along with this program; if not, write to the Free Software
37
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41
dnl> Check for an ANSI C typedef in a header
44
dnl> AC_CHECK_TYPEDEF(<typedef>, <header>)
46
dnl> #undef HAVE_<typedef>
49
AC_DEFUN([AC_CHECK_TYPEDEF],[dnl
50
AC_REQUIRE([AC_HEADER_STDC])dnl
51
AC_MSG_CHECKING(for typedef $1)
52
AC_CACHE_VAL(ac_cv_typedef_$1,
55
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
58
], ac_cv_typedef_$1=yes, ac_cv_typedef_$1=no)])dnl
59
AC_MSG_RESULT($ac_cv_typedef_$1)
60
if test $ac_cv_typedef_$1 = yes; then
61
AC_DEFINE(HAVE_[]translit($1, [a-z], [A-Z]))
66
dnl> Appends values to $CPPFLAGS, $LDFLAGS and $LIBS
67
dnl> Also: Allows us to automate for those OSes which DO NOT check subdirectories.
68
dnl> Allows us to strip dups.
71
# NTOP_APPENDS(Ivalue, Lvalue, lvalue)
72
# ----------------------------------------------
73
AC_DEFUN([NTOP_APPENDS],
75
# Expansion of NTOP_APPENDS($1, $2, $3)
76
if test ".$1" != "."; then
77
rc=`(echo $CPPFLAGS | grep '$1 ' > /dev/null 2> /dev/null; echo $?)`
78
if [[ $rc -eq 1 ]]; then
79
CPPFLAGS="$CPPFLAGS -I$1"
81
rc=`(echo $INCS | grep '$1' > /dev/null 2> /dev/null; echo $?)`
82
if [[ $rc -eq 1 ]]; then
86
if test ".$2" != "."; then
87
rc=`(echo $LDFLAGS | grep '$2 ' > /dev/null 2> /dev/null; echo $?)`
88
if [[ $rc -eq 1 ]]; then
91
LDFLAGS="$LDFLAGS -L$2 -L$2/lib"
94
LDFLAGS="$LDFLAGS -L$2"
99
if test ".$3" != "."; then
100
rc=`(echo $LIBS | grep '\-l$3 ' > /dev/null 2> /dev/null; echo $?)`
101
if [[ $rc -eq 1 ]]; then
105
# Finished expansion of NTOP_APPENDS()
112
# NTOP_RPT_LOC(item, lib, include)
113
# ----------------------------------------------
114
AC_DEFUN([NTOP_RPT_LOC],
116
# Expansion of NTOP_RPT_LOC($1 $2 $3)
117
if test ".$3" = "."; then
118
echo "$1 .h : standard system headers"
122
if test ".$2" = "."; then
123
echo "$1 library : standard system libraries"
125
echo "$1 library : $2"
127
# Finished expansion of NTOP_RPT_LOC()
130
# NTOP_SET_LIBINC(item)
131
# ----------------------------------------------
132
AC_DEFUN([NTOP_SET_LIBINC],
134
# Expansion of NTOP_SET_LIBINC($1)
135
if test ".${$1_DIRECTORY}" != "."; then
136
if test ".${$1_LIB}" = "."; then
137
if test -d ${$1_DIRECTORY}/lib; then
138
$1_LIB="${$1_DIRECTORY}/lib"
140
$1_LIB="${$1_DIRECTORY}"
143
if test ".${$1_INCLUDE}" = "."; then
144
if test -d ${$1_DIRECTORY}/include; then
145
$1_INCLUDE="${$1_DIRECTORY}/include"
147
$1_INCLUDE="${$1_DIRECTORY}"
151
# Finished expansion of NTOP_SET_LIBINC()
154
# NTOP_SUGGESTION(item, version)
155
# ----------------------------------------------
156
AC_DEFUN([NTOP_SUGGESTION],
158
# Expansion of NTOP_SUGGESTION($1, $2, $3)
159
echo "*??? Suggestion - Install a private copy of $1 $2."
160
echo "*??? It's quite easy and does NOT require root:"
162
echo "* Download $1 $2 from gnu"
163
echo "* \$ wget http://ftp.gnu.org/gnu/$1/$1-$2.tar.gz"
166
echo "* \$ tar xfvz $1-$2.tar.gz"
170
echo "* \$ ./configure --prefix=/home/<whatever>/$1$3"
172
echo "* \$ make install"
174
echo "* Add it to your path. Under bash do this:"
175
echo "* \$ PATH=/home/<whatever>/$1$3/bin:\$PATH"
176
echo "* \$ export PATH"
178
# Finished expansion of NTOP_SUGGESTION()
181
# NTOPCONFIGDEBUG_SETTINGS(where)
182
# ----------------------------------------------
183
AC_DEFUN([NTOPCONFIGDEBUG_SETTINGS],
185
# Expansion of NTOPCONFIGDEBUG_SETTINGS()
186
if test ".${NTOPCONFIGDEBUG}" = ".yes"; then
188
echo " AWK.................'${AWK}'"
189
echo " AS..................'${AS}'"
190
echo " ACLOCAL.............'${ACLOCAL}'"
191
echo " AUTOCONF............'${AUTOCONF}'"
192
echo " AUTOHEADER..........'${AUTOHEADER}'"
193
echo " AUTOMAKE............'${AUTOMAKE}'"
194
echo " CC..................'${CC}'"
195
echo " gcc?.............'${GCC}'"
196
echo " CCLD................'${CCLD}'"
197
echo " CFLAGS..............'${CFLAGS}'"
198
echo " CPP.................'${CPP}'"
199
echo " CPPFLAGS............'${CPPFLAGS}'"
200
echo " DEFS................'${DEFS}'"
201
echo " DEPDIR..............'${DEPDIR}'"
202
echo " DLLTOOL.............'${DLLTOOL}'"
203
echo " DYN_FLAGS...........'${DYNFLAGS}'"
204
echo " EXEEXT..............'${EXEEXT}'"
205
echo " INCS................'${INCS}'"
206
echo " LDFLAGS.............'${LDFLAGS}'"
207
echo " LIBS................'${LIBS}'"
208
echo " LN_S................'${LN_S}'"
209
echo " MYRRD...............'${MYRRD}'"
210
echo " OBJDUMP.............'${OBJDUMP}'"
211
echo " OBJEXT..............'${OBJEXT}'"
212
echo " RANLIB..............'${RANLIB}'"
213
echo " SO_VERSION_PATCH....'${SO_VERSION_PATCH}'"
214
echo " build...............'${build}'"
215
echo " host................'${host}'"
216
echo " target..............'${target}'"
218
# Finished expansion of NTOPCONFIGDEBUG_SETTINGS()
222
# serial 40 AC_PROG_LIBTOOL
223
AC_DEFUN([AC_PROG_LIBTOOL],
224
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
226
# Save cache, so that ltconfig can load it
229
# Actually configure libtool. ac_aux_dir is where install-sh is found.
230
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
231
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
232
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
233
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
234
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
235
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
236
|| AC_MSG_ERROR([libtool configure failed])
238
# Reload cache, that may have been modified by ltconfig
241
# This can be used to rebuild libtool when needed
242
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
244
# Always use our own libtool.
245
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
248
# Redirect the config.log output again, so that the ltconfig log is not
249
# clobbered by the next message.
253
AC_DEFUN([AC_LIBTOOL_SETUP],
255
AC_REQUIRE([AC_ENABLE_SHARED])dnl
256
AC_REQUIRE([AC_ENABLE_STATIC])dnl
257
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
258
AC_REQUIRE([AC_CANONICAL_HOST])dnl
259
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
260
AC_REQUIRE([AC_PROG_RANLIB])dnl
261
AC_REQUIRE([AC_PROG_CC])dnl
262
AC_REQUIRE([AC_PROG_LD])dnl
263
AC_REQUIRE([AC_PROG_NM])dnl
264
AC_REQUIRE([AC_PROG_LN_S])dnl
267
# Check for any special flags to pass to ltconfig.
268
libtool_flags="--cache-file=$cache_file"
269
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
270
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
271
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
272
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
273
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
274
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
275
[libtool_flags="$libtool_flags --enable-dlopen"])
276
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
277
[libtool_flags="$libtool_flags --enable-win32-dll"])
278
AC_ARG_ENABLE(libtool-lock,
279
[ --disable-libtool-lock avoid locking (might break parallel builds)])
280
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
281
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
283
# Some flags need to be propagated to the compiler or linker for good
287
# Find out which ABI we are using.
288
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
289
if AC_TRY_EVAL(ac_compile); then
290
case "`/usr/bin/file conftest.o`" in
306
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
307
SAVE_CFLAGS="$CFLAGS"
308
CFLAGS="$CFLAGS -belf"
309
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
310
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
311
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
312
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
313
CFLAGS="$SAVE_CFLAGS"
317
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
318
[*-*-cygwin* | *-*-mingw*)
319
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
320
AC_CHECK_TOOL(AS, as, false)
321
AC_CHECK_TOOL(OBJDUMP, objdump, false)
327
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
328
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
330
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
331
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
333
# AC_ENABLE_SHARED - implement the --enable-shared flag
334
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
335
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
337
AC_DEFUN([AC_ENABLE_SHARED], [dnl
338
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
339
AC_ARG_ENABLE(shared,
340
changequote(<<, >>)dnl
341
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
343
[p=${PACKAGE-default}
345
yes) enable_shared=yes ;;
346
no) enable_shared=no ;;
349
# Look at the argument we got. We use all the common list separators.
350
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
351
for pkg in $enableval; do
352
if test "X$pkg" = "X$p"; then
359
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
362
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
363
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
364
AC_ENABLE_SHARED(no)])
366
# AC_ENABLE_STATIC - implement the --enable-static flag
367
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
368
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
370
AC_DEFUN([AC_ENABLE_STATIC], [dnl
371
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
372
AC_ARG_ENABLE(static,
373
changequote(<<, >>)dnl
374
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
376
[p=${PACKAGE-default}
378
yes) enable_static=yes ;;
379
no) enable_static=no ;;
382
# Look at the argument we got. We use all the common list separators.
383
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
384
for pkg in $enableval; do
385
if test "X$pkg" = "X$p"; then
392
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
395
# AC_DISABLE_STATIC - set the default static flag to --disable-static
396
AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
397
AC_ENABLE_STATIC(no)])
400
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
401
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
402
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
404
AC_DEFUN([AC_ENABLE_FAST_INSTALL], [dnl
405
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
406
AC_ARG_ENABLE(fast-install,
407
changequote(<<, >>)dnl
408
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
410
[p=${PACKAGE-default}
412
yes) enable_fast_install=yes ;;
413
no) enable_fast_install=no ;;
415
enable_fast_install=no
416
# Look at the argument we got. We use all the common list separators.
417
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
418
for pkg in $enableval; do
419
if test "X$pkg" = "X$p"; then
420
enable_fast_install=yes
426
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
429
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
430
AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
431
AC_ENABLE_FAST_INSTALL(no)])
433
# AC_PROG_LD - find the path to the GNU or non-GNU linker
434
AC_DEFUN([AC_PROG_LD],
436
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
437
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
438
AC_REQUIRE([AC_PROG_CC])dnl
439
AC_REQUIRE([AC_CANONICAL_HOST])dnl
440
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
442
if test "$ac_cv_prog_gcc" = yes; then
443
# Check if gcc -print-prog-name=ld gives a path.
444
AC_MSG_CHECKING([for ld used by GCC])
445
ac_prog=`($CC -print-prog-name=ld) 2>&5`
447
# Accept absolute paths.
449
[\\/]* | [A-Za-z]:[\\/]*)
450
re_direlt='/[^/][^/]*/\.\./'
452
# Canonicalize the path of ld
453
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
454
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
455
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
457
test -z "$LD" && LD="$ac_prog"
460
# If it fails, then pretend we aren't using GCC.
464
# If it is relative, then search for the first ld in PATH.
468
elif test "$with_gnu_ld" = yes; then
469
AC_MSG_CHECKING([for GNU ld])
471
AC_MSG_CHECKING([for non-GNU ld])
473
AC_CACHE_VAL(ac_cv_path_LD,
474
[if test -z "$LD"; then
475
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
476
for ac_dir in $PATH; do
477
test -z "$ac_dir" && ac_dir=.
478
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
479
ac_cv_path_LD="$ac_dir/$ac_prog"
480
# Check to see if the program is GNU ld. I'd rather use --version,
481
# but apparently some GNU ld's only accept -v.
482
# Break only if it was the GNU/non-GNU ld that we prefer.
483
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
484
test "$with_gnu_ld" != no && break
486
test "$with_gnu_ld" != yes && break
492
ac_cv_path_LD="$LD" # Let the user override the test with a path.
495
if test -n "$LD"; then
500
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
505
AC_DEFUN([AC_PROG_LD_GNU],
506
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
507
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
508
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
509
ac_cv_prog_gnu_ld=yes
515
# AC_PROG_NM - find the path to a BSD-compatible name lister
516
AC_DEFUN([AC_PROG_NM],
517
[AC_MSG_CHECKING([for BSD-compatible nm])
518
AC_CACHE_VAL(ac_cv_path_NM,
519
[if test -n "$NM"; then
520
# Let the user override the test.
523
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
524
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
525
test -z "$ac_dir" && ac_dir=.
526
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
527
# Check to see if the nm accepts a BSD-compat flag.
528
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
529
# nm: unknown option "B" ignored
530
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
531
ac_cv_path_NM="$ac_dir/nm -B"
533
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
534
ac_cv_path_NM="$ac_dir/nm -p"
537
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
538
continue # so that we can try to find one that supports BSD flags
543
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
550
# AC_CHECK_LIBM - check for math library
551
AC_DEFUN([AC_CHECK_LIBM],
552
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
555
*-*-beos* | *-*-cygwin*)
556
# These system don't have libm
559
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
560
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
563
AC_CHECK_LIB(m, main, LIBM="-lm")
568
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
569
# the libltdl convenience library, adds --enable-ltdl-convenience to
570
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
571
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
572
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
573
# '${top_builddir}/' (note the single quotes!) if your package is not
574
# flat, and, if you're not using automake, define top_builddir as
575
# appropriate in the Makefiles.
576
AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
577
case "$enable_ltdl_convenience" in
578
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
579
"") enable_ltdl_convenience=yes
580
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
582
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
583
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
586
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
587
# the libltdl installable library, and adds --enable-ltdl-install to
588
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
589
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
590
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
591
# '${top_builddir}/' (note the single quotes!) if your package is not
592
# flat, and, if you're not using automake, define top_builddir as
593
# appropriate in the Makefiles.
594
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
595
AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
596
AC_CHECK_LIB(ltdl, main,
597
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
598
[if test x"$enable_ltdl_install" = xno; then
599
AC_MSG_WARN([libltdl not installed, but installation disabled])
601
enable_ltdl_install=yes
604
if test x"$enable_ltdl_install" = x"yes"; then
605
ac_configure_args="$ac_configure_args --enable-ltdl-install"
606
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
607
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
609
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
616
AC_DEFUN([AM_PROG_LIBTOOL], [indir([AC_PROG_LIBTOOL])])dnl
617
AC_DEFUN([AM_ENABLE_SHARED], [indir([AC_ENABLE_SHARED], $@)])dnl
618
AC_DEFUN([AM_ENABLE_STATIC], [indir([AC_ENABLE_STATIC], $@)])dnl
619
AC_DEFUN([AM_DISABLE_SHARED], [indir([AC_DISABLE_SHARED], $@)])dnl
620
AC_DEFUN([AM_DISABLE_STATIC], [indir([AC_DISABLE_STATIC], $@)])dnl
621
AC_DEFUN([AM_PROG_LD], [indir([AC_PROG_LD])])dnl
622
AC_DEFUN([AM_PROG_NM], [indir([AC_PROG_NM])])dnl
624
dnl This is just to silence aclocal about the macro not being used
625
ifelse([AC_DISABLE_FAST_INSTALL])dnl
627
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
629
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
631
# This program is free software; you can redistribute it and/or modify
632
# it under the terms of the GNU General Public License as published by
633
# the Free Software Foundation; either version 2, or (at your option)
636
# This program is distributed in the hope that it will be useful,
637
# but WITHOUT ANY WARRANTY; without even the implied warranty of
638
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
639
# GNU General Public License for more details.
641
# You should have received a copy of the GNU General Public License
642
# along with this program; if not, write to the Free Software
643
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
650
# When config.status generates a header, we must update the stamp-h file.
651
# This file resides in the same directory as the config header
652
# that is generated. We must strip everything past the first ":",
653
# and everything past the last "/".
657
# Like AS_DIRNAME, only do it during macro expansion
658
AC_DEFUN([_AM_DIRNAME],
659
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
660
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
661
m4_if(regexp([$1], [^/.*]), -1,
663
patsubst([$1], [^\(/\).*], [\1])),
664
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
665
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
669
# The stamp files are numbered to have different names.
670
# We could number them on a directory basis, but that's additional
671
# complications, let's have a unique counter.
672
m4_define([_AM_STAMP_Count], [0])
677
# The name of the stamp file for HEADER.
678
AC_DEFUN([_AM_STAMP],
679
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
680
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
681
[:.*])))/stamp-h[]_AM_STAMP_Count])
684
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
685
# ------------------------------------------------------------
686
# We used to try to get a real timestamp in stamp-h. But the fear is that
687
# that will cause unnecessary cvs conflicts.
688
AC_DEFUN([_AM_CONFIG_HEADER],
689
[# Add the stamp file to the list of files AC keeps track of,
690
# along with our hook.
691
AC_CONFIG_HEADERS([$1],
692
[# update the timestamp
693
echo 'timestamp for $1' >"_AM_STAMP([$1])"
696
])# _AM_CONFIG_HEADER
699
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
700
# --------------------------------------------------------------
701
AC_DEFUN([AM_CONFIG_HEADER],
702
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
705
# Do all the work for Automake. -*- Autoconf -*-
707
# This macro actually does too much some checks are only needed if
708
# your package does certain things. But this isn't really a big deal.
710
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
711
# Free Software Foundation, Inc.
713
# This program is free software; you can redistribute it and/or modify
714
# it under the terms of the GNU General Public License as published by
715
# the Free Software Foundation; either version 2, or (at your option)
718
# This program is distributed in the hope that it will be useful,
719
# but WITHOUT ANY WARRANTY; without even the implied warranty of
720
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
721
# GNU General Public License for more details.
723
# You should have received a copy of the GNU General Public License
724
# along with this program; if not, write to the Free Software
725
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
730
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
731
# written in clear, in which case automake, when reading aclocal.m4,
732
# will think it sees a *use*, and therefore will trigger all it's
733
# C support machinery. Also note that it means that autoscan, seeing
734
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
739
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
740
# the ones we care about.
741
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
743
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
744
# AM_INIT_AUTOMAKE([OPTIONS])
745
# -----------------------------------------------
746
# The call with PACKAGE and VERSION arguments is the old style
747
# call (pre autoconf-2.50), which is being phased out. PACKAGE
748
# and VERSION should now be passed to AC_INIT and removed from
749
# the call to AM_INIT_AUTOMAKE.
750
# We support both call styles for the transition. After
751
# the next Automake release, Autoconf can make the AC_INIT
752
# arguments mandatory, and then we can depend on a new Autoconf
753
# release and drop the old call support.
754
AC_DEFUN([AM_INIT_AUTOMAKE],
755
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
756
AC_REQUIRE([AC_PROG_INSTALL])dnl
757
# test to see if srcdir already configured
758
if test "`cd $srcdir && pwd`" != "`pwd`" &&
759
test -f $srcdir/config.status; then
760
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
763
# Define the identity of the package.
764
dnl Distinguish between old-style and new-style calls.
766
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
767
AC_SUBST([PACKAGE], [$1])dnl
768
AC_SUBST([VERSION], [$2])],
769
[_AM_SET_OPTIONS([$1])dnl
770
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
771
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
773
_AM_IF_OPTION([no-define],,
774
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
775
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
777
# Some tools Automake needs.
778
AC_REQUIRE([AM_SANITY_CHECK])dnl
779
AC_REQUIRE([AC_ARG_PROGRAM])dnl
780
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
781
AM_MISSING_PROG(AUTOCONF, autoconf)
782
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
783
AM_MISSING_PROG(AUTOHEADER, autoheader)
784
AM_MISSING_PROG(MAKEINFO, makeinfo)
785
AM_MISSING_PROG(AMTAR, tar)
787
AM_PROG_INSTALL_STRIP
788
# We need awk for the "check" target. The system "awk" is bad on
790
AC_REQUIRE([AC_PROG_AWK])dnl
791
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
793
_AM_IF_OPTION([no-dependencies],,
794
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
795
[_AM_DEPENDENCIES(CC)],
796
[define([AC_PROG_][CC],
797
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
798
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
799
[_AM_DEPENDENCIES(CXX)],
800
[define([AC_PROG_][CXX],
801
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
805
# Copyright 2002 Free Software Foundation, Inc.
807
# This program is free software; you can redistribute it and/or modify
808
# it under the terms of the GNU General Public License as published by
809
# the Free Software Foundation; either version 2, or (at your option)
812
# This program is distributed in the hope that it will be useful,
813
# but WITHOUT ANY WARRANTY; without even the implied warranty of
814
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
815
# GNU General Public License for more details.
817
# You should have received a copy of the GNU General Public License
818
# along with this program; if not, write to the Free Software
819
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
821
# AM_AUTOMAKE_VERSION(VERSION)
822
# ----------------------------
823
# Automake X.Y traces this macro to ensure aclocal.m4 has been
824
# generated from the m4 files accompanying Automake X.Y.
825
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
827
# AM_SET_CURRENT_AUTOMAKE_VERSION
828
# -------------------------------
829
# Call AM_AUTOMAKE_VERSION so it can be traced.
830
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
831
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
832
[AM_AUTOMAKE_VERSION([1.6.3])])
834
# Helper functions for option handling. -*- Autoconf -*-
836
# Copyright 2001, 2002 Free Software Foundation, Inc.
838
# This program is free software; you can redistribute it and/or modify
839
# it under the terms of the GNU General Public License as published by
840
# the Free Software Foundation; either version 2, or (at your option)
843
# This program is distributed in the hope that it will be useful,
844
# but WITHOUT ANY WARRANTY; without even the implied warranty of
845
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
846
# GNU General Public License for more details.
848
# You should have received a copy of the GNU General Public License
849
# along with this program; if not, write to the Free Software
850
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
855
# _AM_MANGLE_OPTION(NAME)
856
# -----------------------
857
AC_DEFUN([_AM_MANGLE_OPTION],
858
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
860
# _AM_SET_OPTION(NAME)
861
# ------------------------------
862
# Set option NAME. Presently that only means defining a flag for this option.
863
AC_DEFUN([_AM_SET_OPTION],
864
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
866
# _AM_SET_OPTIONS(OPTIONS)
867
# ----------------------------------
868
# OPTIONS is a space-separated list of Automake options.
869
AC_DEFUN([_AM_SET_OPTIONS],
870
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
872
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
873
# -------------------------------------------
874
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
875
AC_DEFUN([_AM_IF_OPTION],
876
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
879
# Check to make sure that the build environment is sane.
882
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
884
# This program is free software; you can redistribute it and/or modify
885
# it under the terms of the GNU General Public License as published by
886
# the Free Software Foundation; either version 2, or (at your option)
889
# This program is distributed in the hope that it will be useful,
890
# but WITHOUT ANY WARRANTY; without even the implied warranty of
891
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
892
# GNU General Public License for more details.
894
# You should have received a copy of the GNU General Public License
895
# along with this program; if not, write to the Free Software
896
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
903
AC_DEFUN([AM_SANITY_CHECK],
904
[AC_MSG_CHECKING([whether build environment is sane])
907
echo timestamp > conftest.file
908
# Do `set' in a subshell so we don't clobber the current shell's
909
# arguments. Must try -L first in case configure is actually a
910
# symlink; some systems play weird games with the mod time of symlinks
911
# (eg FreeBSD returns the mod time of the symlink's containing
914
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
915
if test "$[*]" = "X"; then
917
set X `ls -t $srcdir/configure conftest.file`
920
if test "$[*]" != "X $srcdir/configure conftest.file" \
921
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
923
# If neither matched, then we have a broken ls. This can happen
924
# if, for instance, CONFIG_SHELL is bash and it inherits a
925
# broken ls alias from the environment. This has actually
926
# happened. Such a system could not be considered "sane".
927
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
928
alias in your environment])
931
test "$[2]" = conftest.file
937
AC_MSG_ERROR([newly created file is older than distributed files!
938
Check your system clock])
945
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
947
# This program is free software; you can redistribute it and/or modify
948
# it under the terms of the GNU General Public License as published by
949
# the Free Software Foundation; either version 2, or (at your option)
952
# This program is distributed in the hope that it will be useful,
953
# but WITHOUT ANY WARRANTY; without even the implied warranty of
954
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
955
# GNU General Public License for more details.
957
# You should have received a copy of the GNU General Public License
958
# along with this program; if not, write to the Free Software
959
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
964
# AM_MISSING_PROG(NAME, PROGRAM)
965
# ------------------------------
966
AC_DEFUN([AM_MISSING_PROG],
967
[AC_REQUIRE([AM_MISSING_HAS_RUN])
968
$1=${$1-"${am_missing_run}$2"}
974
# Define MISSING if not defined so far and test if it supports --run.
975
# If it does, set am_missing_run to use it, otherwise, to nothing.
976
AC_DEFUN([AM_MISSING_HAS_RUN],
977
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
978
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
979
# Use eval to expand $SHELL
980
if eval "$MISSING --run true"; then
981
am_missing_run="$MISSING --run "
984
AC_MSG_WARN([`missing' script is too old or missing])
990
# Copyright 2001 Free Software Foundation, Inc.
992
# This program is free software; you can redistribute it and/or modify
993
# it under the terms of the GNU General Public License as published by
994
# the Free Software Foundation; either version 2, or (at your option)
997
# This program is distributed in the hope that it will be useful,
998
# but WITHOUT ANY WARRANTY; without even the implied warranty of
999
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1000
# GNU General Public License for more details.
1002
# You should have received a copy of the GNU General Public License
1003
# along with this program; if not, write to the Free Software
1004
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1007
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1008
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1009
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1011
# Of course, Automake must honor this variable whenever it calls a
1012
# tool from the auxiliary directory. The problem is that $srcdir (and
1013
# therefore $ac_aux_dir as well) can be either absolute or relative,
1014
# depending on how configure is run. This is pretty annoying, since
1015
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1016
# source directory, any form will work fine, but in subdirectories a
1017
# relative path needs to be adjusted first.
1019
# $ac_aux_dir/missing
1020
# fails when called from a subdirectory if $ac_aux_dir is relative
1021
# $top_srcdir/$ac_aux_dir/missing
1022
# fails if $ac_aux_dir is absolute,
1023
# fails when called from a subdirectory in a VPATH build with
1024
# a relative $ac_aux_dir
1026
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1027
# are both prefixed by $srcdir. In an in-source build this is usually
1028
# harmless because $srcdir is `.', but things will broke when you
1029
# start a VPATH build or use an absolute $srcdir.
1031
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1032
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1033
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1034
# and then we would define $MISSING as
1035
# MISSING="\${SHELL} $am_aux_dir/missing"
1036
# This will work as long as MISSING is not called from configure, because
1037
# unfortunately $(top_srcdir) has no meaning in configure.
1038
# However there are other variables, like CC, which are often used in
1039
# configure, and could therefore not use this "fixed" $ac_aux_dir.
1041
# Another solution, used here, is to always expand $ac_aux_dir to an
1042
# absolute PATH. The drawback is that using absolute paths prevent a
1043
# configured tree to be moved without reconfiguration.
1045
# Rely on autoconf to set up CDPATH properly.
1048
AC_DEFUN([AM_AUX_DIR_EXPAND], [
1049
# expand $ac_aux_dir to an absolute path
1050
am_aux_dir=`cd $ac_aux_dir && pwd`
1053
# AM_PROG_INSTALL_SH
1054
# ------------------
1055
# Define $install_sh.
1057
# Copyright 2001 Free Software Foundation, Inc.
1059
# This program is free software; you can redistribute it and/or modify
1060
# it under the terms of the GNU General Public License as published by
1061
# the Free Software Foundation; either version 2, or (at your option)
1062
# any later version.
1064
# This program is distributed in the hope that it will be useful,
1065
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1066
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1067
# GNU General Public License for more details.
1069
# You should have received a copy of the GNU General Public License
1070
# along with this program; if not, write to the Free Software
1071
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1074
AC_DEFUN([AM_PROG_INSTALL_SH],
1075
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1076
install_sh=${install_sh-"$am_aux_dir/install-sh"}
1077
AC_SUBST(install_sh)])
1079
# AM_PROG_INSTALL_STRIP
1081
# Copyright 2001 Free Software Foundation, Inc.
1083
# This program is free software; you can redistribute it and/or modify
1084
# it under the terms of the GNU General Public License as published by
1085
# the Free Software Foundation; either version 2, or (at your option)
1086
# any later version.
1088
# This program is distributed in the hope that it will be useful,
1089
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1090
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1091
# GNU General Public License for more details.
1093
# You should have received a copy of the GNU General Public License
1094
# along with this program; if not, write to the Free Software
1095
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1098
# One issue with vendor `install' (even GNU) is that you can't
1099
# specify the program used to strip binaries. This is especially
1100
# annoying in cross-compiling environments, where the build's strip
1101
# is unlikely to handle the host's binaries.
1102
# Fortunately install-sh will honor a STRIPPROG variable, so we
1103
# always use install-sh in `make install-strip', and initialize
1104
# STRIPPROG with the value of the STRIP variable (set by the user).
1105
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1106
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1107
# Installed binaries are usually stripped using `strip' when the user
1108
# run `make install-strip'. However `strip' might not be the right
1109
# tool to use in cross-compilation environments, therefore Automake
1110
# will honor the `STRIP' environment variable to overrule this program.
1111
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1112
if test "$cross_compiling" != no; then
1113
AC_CHECK_TOOL([STRIP], [strip], :)
1115
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1116
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1118
# serial 4 -*- Autoconf -*-
1120
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
1122
# This program is free software; you can redistribute it and/or modify
1123
# it under the terms of the GNU General Public License as published by
1124
# the Free Software Foundation; either version 2, or (at your option)
1125
# any later version.
1127
# This program is distributed in the hope that it will be useful,
1128
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1129
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1130
# GNU General Public License for more details.
1132
# You should have received a copy of the GNU General Public License
1133
# along with this program; if not, write to the Free Software
1134
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1138
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1139
# written in clear, in which case automake, when reading aclocal.m4,
1140
# will think it sees a *use*, and therefore will trigger all it's
1141
# C support machinery. Also note that it means that autoscan, seeing
1142
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1146
# _AM_DEPENDENCIES(NAME)
1147
# ----------------------
1148
# See how the compiler implements dependency checking.
1149
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1150
# We try a few techniques and use that to set a single cache variable.
1152
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1153
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1154
# dependency, and given that the user is not expected to run this macro,
1155
# just rely on AC_PROG_CC.
1156
AC_DEFUN([_AM_DEPENDENCIES],
1157
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1158
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1159
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1160
AC_REQUIRE([AM_DEP_TRACK])dnl
1162
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1163
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1164
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1165
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1166
[depcc="$$1" am_compiler_list=])
1168
AC_CACHE_CHECK([dependency style of $depcc],
1169
[am_cv_$1_dependencies_compiler_type],
1170
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1171
# We make a subdir and do the tests there. Otherwise we can end up
1172
# making bogus files that we don't know about and never remove. For
1173
# instance it was reported that on HP-UX the gcc test will end up
1174
# making a dummy file named `D' -- because `-MD' means `put the output
1177
# Copy depcomp to subdir because otherwise we won't find it if we're
1178
# using a relative directory.
1179
cp "$am_depcomp" conftest.dir
1182
am_cv_$1_dependencies_compiler_type=none
1183
if test "$am_compiler_list" = ""; then
1184
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1186
for depmode in $am_compiler_list; do
1187
# We need to recreate these files for each test, as the compiler may
1188
# overwrite some of them when testing with obscure command lines.
1189
# This happens at least with the AIX C compiler.
1190
echo '#include "conftest.h"' > conftest.c
1191
echo 'int i;' > conftest.h
1192
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
1196
# after this tag, mechanisms are not by side-effect, so they'll
1197
# only be used when explicitly requested
1198
if test "x$enable_dependency_tracking" = xyes; then
1206
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1207
# mode. It turns out that the SunPro C++ compiler does not properly
1208
# handle `-M -o', and we need to detect this.
1209
if depmode=$depmode \
1210
source=conftest.c object=conftest.o \
1211
depfile=conftest.Po tmpdepfile=conftest.TPo \
1212
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1213
grep conftest.h conftest.Po > /dev/null 2>&1 &&
1214
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1215
am_cv_$1_dependencies_compiler_type=$depmode
1223
am_cv_$1_dependencies_compiler_type=none
1226
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1232
# Choose a directory name for dependency files.
1233
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1234
AC_DEFUN([AM_SET_DEPDIR],
1235
[rm -f .deps 2>/dev/null
1236
mkdir .deps 2>/dev/null
1237
if test -d .deps; then
1240
# MS-DOS does not allow filenames that begin with a dot.
1243
rmdir .deps 2>/dev/null
1250
AC_DEFUN([AM_DEP_TRACK],
1251
[AC_ARG_ENABLE(dependency-tracking,
1252
[ --disable-dependency-tracking Speeds up one-time builds
1253
--enable-dependency-tracking Do not reject slow dependency extractors])
1254
if test "x$enable_dependency_tracking" != xno; then
1255
am_depcomp="$ac_aux_dir/depcomp"
1258
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1259
AC_SUBST([AMDEPBACKSLASH])
1262
# Generate code to set up dependency tracking. -*- Autoconf -*-
1264
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1266
# This program is free software; you can redistribute it and/or modify
1267
# it under the terms of the GNU General Public License as published by
1268
# the Free Software Foundation; either version 2, or (at your option)
1269
# any later version.
1271
# This program is distributed in the hope that it will be useful,
1272
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1273
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1274
# GNU General Public License for more details.
1276
# You should have received a copy of the GNU General Public License
1277
# along with this program; if not, write to the Free Software
1278
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1283
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1284
# ------------------------------
1285
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1286
[for mf in $CONFIG_FILES; do
1287
# Strip MF so we end up with the name of the file.
1288
mf=`echo "$mf" | sed -e 's/:.*$//'`
1289
# Check whether this is an Automake generated Makefile or not.
1290
# We used to match only the files named `Makefile.in', but
1291
# some people rename them; so instead we look at the file content.
1292
# Grep'ing the first line is not enough: some people post-process
1293
# each Makefile.in and add a new line on top of each file to say so.
1294
# So let's grep whole file.
1295
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1296
dirpart=`AS_DIRNAME("$mf")`
1300
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1301
# Extract the definition of DEP_FILES from the Makefile without
1303
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1304
test -z "$DEPDIR" && continue
1305
# When using ansi2knr, U may be empty or an underscore; expand it
1306
U=`sed -n -e '/^U = / s///p' < "$mf"`
1307
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1308
# We invoke sed twice because it is the simplest approach to
1309
# changing $(DEPDIR) to its actual value in the expansion.
1310
for file in `sed -n -e '
1311
/^DEP_FILES = .*\\\\$/ {
1320
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1321
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1322
# Make sure the directory exists.
1323
test -f "$dirpart/$file" && continue
1324
fdir=`AS_DIRNAME(["$file"])`
1325
AS_MKDIR_P([$dirpart/$fdir])
1326
# echo "creating $dirpart/$file"
1327
echo '# dummy' > "$dirpart/$file"
1330
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1333
# AM_OUTPUT_DEPENDENCY_COMMANDS
1334
# -----------------------------
1335
# This macro should only be invoked once -- use via AC_REQUIRE.
1337
# This code is only required when automatic dependency tracking
1338
# is enabled. FIXME. This creates each `.P' file that we will
1339
# need in order to bootstrap the dependency handling code.
1340
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1341
[AC_CONFIG_COMMANDS([depfiles],
1342
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1343
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1346
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
1348
# This program is free software; you can redistribute it and/or modify
1349
# it under the terms of the GNU General Public License as published by
1350
# the Free Software Foundation; either version 2, or (at your option)
1351
# any later version.
1353
# This program is distributed in the hope that it will be useful,
1354
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1355
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1356
# GNU General Public License for more details.
1358
# You should have received a copy of the GNU General Public License
1359
# along with this program; if not, write to the Free Software
1360
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1367
# Check to see how make treats includes.
1368
AC_DEFUN([AM_MAKE_INCLUDE],
1369
[am_make=${MAKE-make}
1370
cat > confinc << 'END'
1374
# If we don't find an include directive, just comment out the code.
1375
AC_MSG_CHECKING([for style of include used by $am_make])
1379
# First try GNU make style include.
1380
echo "include confinc" > confmf
1381
# We grep out `Entering directory' and `Leaving directory'
1382
# messages which can occur if `w' ends up in MAKEFLAGS.
1383
# In particular we don't look at `^make:' because GNU make might
1384
# be invoked under some other name (usually "gmake"), in which
1385
# case it prints its new name instead of `make'.
1386
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
1391
# Now try BSD make style include.
1392
if test "$am__include" = "#"; then
1393
echo '.include "confinc"' > confmf
1394
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1395
am__include=.include
1400
AC_SUBST(am__include)
1402
AC_MSG_RESULT($_am_result)
1403
rm -f confinc confmf
1406
# AM_CONDITIONAL -*- Autoconf -*-
1408
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1410
# This program is free software; you can redistribute it and/or modify
1411
# it under the terms of the GNU General Public License as published by
1412
# the Free Software Foundation; either version 2, or (at your option)
1413
# any later version.
1415
# This program is distributed in the hope that it will be useful,
1416
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1417
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1418
# GNU General Public License for more details.
1420
# You should have received a copy of the GNU General Public License
1421
# along with this program; if not, write to the Free Software
1422
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1429
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1430
# -------------------------------------
1431
# Define a conditional.
1432
AC_DEFUN([AM_CONDITIONAL],
1433
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1434
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1436
AC_SUBST([$1_FALSE])
1444
AC_CONFIG_COMMANDS_PRE(
1445
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1446
AC_MSG_ERROR([conditional \"$1\" was never defined.
1447
Usually this means the macro was only invoked conditionally.])
1451
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
1453
# This program is free software; you can redistribute it and/or modify
1454
# it under the terms of the GNU General Public License as published by
1455
# the Free Software Foundation; either version 2, or (at your option)
1456
# any later version.
1458
# This program is distributed in the hope that it will be useful,
1459
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1460
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1461
# GNU General Public License for more details.
1463
# You should have received a copy of the GNU General Public License
1464
# along with this program; if not, write to the Free Software
1465
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1470
# @defmac AC_PROG_CC_STDC
1471
# @maindex PROG_CC_STDC
1473
# If the C compiler in not in ANSI C mode by default, try to add an option
1474
# to output variable @code{CC} to make it so. This macro tries various
1475
# options that select ANSI C on some system or another. It considers the
1476
# compiler to be in ANSI C mode if it handles function prototypes correctly.
1478
# If you use this macro, you should check after calling it whether the C
1479
# compiler has been set to accept ANSI C; if not, the shell variable
1480
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
1481
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
1482
# program @code{ansi2knr}, which comes with Ghostscript.
1485
AC_DEFUN([AM_PROG_CC_STDC],
1486
[AC_REQUIRE([AC_PROG_CC])
1487
AC_BEFORE([$0], [AC_C_INLINE])
1488
AC_BEFORE([$0], [AC_C_CONST])
1489
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
1490
dnl a magic option to avoid problems with ANSI preprocessor commands
1492
dnl FIXME: can't do this because then AC_AIX won't work due to a
1493
dnl circular dependency.
1494
dnl AC_BEFORE([$0], [AC_PROG_CPP])
1495
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
1496
AC_CACHE_VAL(am_cv_prog_cc_stdc,
1497
[am_cv_prog_cc_stdc=no
1499
# Don't try gcc -ansi; that turns off useful extensions and
1500
# breaks some systems' header files.
1501
# AIX -qlanglvl=ansi
1502
# Ultrix and OSF/1 -std1
1503
# HP-UX 10.20 and later -Ae
1504
# HP-UX older versions -Aa -D_HPUX_SOURCE
1505
# SVR4 -Xc -D__EXTENSIONS__
1506
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1508
CC="$ac_save_CC $ac_arg"
1510
[#include <stdarg.h>
1512
#include <sys/types.h>
1513
#include <sys/stat.h>
1514
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1515
struct buf { int x; };
1516
FILE * (*rcsopen) (struct buf *, struct stat *, int);
1517
static char *e (p, i)
1523
static char *f (char * (*g) (char **, int), char **p, ...)
1528
s = g (p, va_arg (v,int));
1532
int test (int i, double x);
1533
struct s1 {int (*f) (int a);};
1534
struct s2 {int (*f) (double a);};
1535
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1539
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1541
[am_cv_prog_cc_stdc="$ac_arg"; break])
1545
if test -z "$am_cv_prog_cc_stdc"; then
1546
AC_MSG_RESULT([none needed])
1548
AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1550
case "x$am_cv_prog_cc_stdc" in
1552
*) CC="$CC $am_cv_prog_cc_stdc" ;;