~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-01-30 21:59:13 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050130215913-xc3ke963bw49b3k4
Tags: 2:3.0-5
* Updated README.Debian file so users will understand what to do at
  install, closes: #291794, #287802.
* Updated ntop init script to give better output.
* Also changed log directory from /var/lib/ntop to /var/log/ntop,
  closes: #252352.
* Quoted the interface list to allow whitespace, closes: #267248.
* Added a couple of logcheck ignores, closes: #269321, #269319.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 
2
 
 
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.
 
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
#
 
15
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
16
# local automake definitions for ntop
 
17
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
18
#
 
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>
 
22
#
 
23
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
24
#
 
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.
 
29
#
 
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.
 
34
#
 
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.
 
38
#
 
39
 
 
40
dnl>
 
41
dnl>  Check for an ANSI C typedef in a header
 
42
dnl>
 
43
dnl>  configure.in:
 
44
dnl>    AC_CHECK_TYPEDEF(<typedef>, <header>)
 
45
dnl>  acconfig.h:
 
46
dnl>    #undef HAVE_<typedef>
 
47
dnl>
 
48
 
 
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,
 
53
[AC_EGREP_CPP(dnl
 
54
changequote(<<,>>)dnl
 
55
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
 
56
changequote([,]), [
 
57
#include <$2>
 
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]))
 
62
fi
 
63
])
 
64
 
 
65
dnl>
 
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.
 
69
dnl>
 
70
 
 
71
# NTOP_APPENDS(Ivalue, Lvalue, lvalue)
 
72
# ----------------------------------------------
 
73
AC_DEFUN([NTOP_APPENDS],
 
74
[dnl
 
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"
 
80
        fi
 
81
        rc=`(echo $INCS | grep '$1' > /dev/null 2> /dev/null; echo $?)`
 
82
        if [[ $rc -eq 1 ]]; then
 
83
            INCS="$INCS -I$1"
 
84
        fi
 
85
    fi
 
86
    if test ".$2" != "."; then
 
87
        rc=`(echo $LDFLAGS | grep '$2 ' > /dev/null 2> /dev/null; echo $?)`
 
88
        if [[ $rc -eq 1 ]]; then
 
89
            case "${DEFINEOS}" in
 
90
              DARWIN )
 
91
                LDFLAGS="$LDFLAGS -L$2 -L$2/lib"
 
92
                ;;
 
93
              * )
 
94
                LDFLAGS="$LDFLAGS -L$2"
 
95
                ;;
 
96
            esac
 
97
        fi
 
98
    fi
 
99
    if test ".$3" != "."; then
 
100
        rc=`(echo $LIBS | grep '\-l$3 ' > /dev/null 2> /dev/null; echo $?)`
 
101
        if [[ $rc -eq 1 ]]; then
 
102
            LIBS="$LIBS -l$3"
 
103
        fi
 
104
    fi
 
105
# Finished expansion of NTOP_APPENDS()
 
106
])
 
107
 
 
108
dnl>
 
109
dnl>  Report location
 
110
dnl>
 
111
 
 
112
# NTOP_RPT_LOC(item, lib, include)
 
113
# ----------------------------------------------
 
114
AC_DEFUN([NTOP_RPT_LOC],
 
115
[dnl
 
116
# Expansion of NTOP_RPT_LOC($1 $2 $3)
 
117
if test ".$3" = "."; then
 
118
    echo "$1 .h             : standard system headers"
 
119
else
 
120
    echo "$1 .h             : $3"
 
121
fi
 
122
if test ".$2" = "."; then
 
123
    echo "$1 library        : standard system libraries"
 
124
else
 
125
    echo "$1 library        : $2"
 
126
fi
 
127
# Finished expansion of NTOP_RPT_LOC()
 
128
])
 
129
 
 
130
# NTOP_SET_LIBINC(item)
 
131
# ----------------------------------------------
 
132
AC_DEFUN([NTOP_SET_LIBINC],
 
133
[dnl
 
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"
 
139
        else
 
140
            $1_LIB="${$1_DIRECTORY}"
 
141
        fi
 
142
    fi
 
143
    if test ".${$1_INCLUDE}" = "."; then
 
144
        if test -d ${$1_DIRECTORY}/include; then
 
145
            $1_INCLUDE="${$1_DIRECTORY}/include"
 
146
        else
 
147
            $1_INCLUDE="${$1_DIRECTORY}"
 
148
        fi
 
149
    fi
 
150
fi
 
151
# Finished expansion of NTOP_SET_LIBINC()
 
152
])
 
153
 
 
154
# NTOP_SUGGESTION(item, version)
 
155
# ----------------------------------------------
 
156
AC_DEFUN([NTOP_SUGGESTION],
 
157
[dnl
 
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:"
 
161
    echo "*"
 
162
    echo "*   Download $1 $2 from gnu"
 
163
    echo "*     \$ wget http://ftp.gnu.org/gnu/$1/$1-$2.tar.gz"
 
164
    echo "*"
 
165
    echo "*   Untar it"
 
166
    echo "*     \$ tar xfvz $1-$2.tar.gz"
 
167
    echo "*"
 
168
    echo "*   Make it"
 
169
    echo "*     \$ cd $1-$2"
 
170
    echo "*     \$ ./configure --prefix=/home/<whatever>/$1$3"
 
171
    echo "*     \$ make"
 
172
    echo "*     \$ make install"
 
173
    echo "*"
 
174
    echo "*   Add it to your path.  Under bash do this:"
 
175
    echo "*     \$ PATH=/home/<whatever>/$1$3/bin:\$PATH"
 
176
    echo "*     \$ export PATH"
 
177
    echo "*"
 
178
# Finished expansion of NTOP_SUGGESTION()
 
179
])
 
180
 
 
181
# NTOPCONFIGDEBUG_SETTINGS(where)
 
182
# ----------------------------------------------
 
183
AC_DEFUN([NTOPCONFIGDEBUG_SETTINGS],
 
184
[dnl
 
185
# Expansion of NTOPCONFIGDEBUG_SETTINGS()
 
186
if test ".${NTOPCONFIGDEBUG}" = ".yes"; then
 
187
    echo "DEBUG: $1"
 
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}'"
 
217
fi
 
218
# Finished expansion of NTOPCONFIGDEBUG_SETTINGS()
 
219
])
 
220
 
 
221
 
 
222
# serial 40 AC_PROG_LIBTOOL
 
223
AC_DEFUN([AC_PROG_LIBTOOL],
 
224
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
225
 
 
226
# Save cache, so that ltconfig can load it
 
227
AC_CACHE_SAVE
 
228
 
 
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])
 
237
 
 
238
# Reload cache, that may have been modified by ltconfig
 
239
AC_CACHE_LOAD
 
240
 
 
241
# This can be used to rebuild libtool when needed
 
242
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
 
243
 
 
244
# Always use our own libtool.
 
245
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
246
AC_SUBST(LIBTOOL)dnl
 
247
 
 
248
# Redirect the config.log output again, so that the ltconfig log is not
 
249
# clobbered by the next message.
 
250
exec 5>>./config.log
 
251
])
 
252
 
 
253
AC_DEFUN([AC_LIBTOOL_SETUP],
 
254
[AC_PREREQ(2.13)dnl
 
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
 
265
dnl
 
266
 
 
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"
 
282
 
 
283
# Some flags need to be propagated to the compiler or linker for good
 
284
# libtool support.
 
285
case "$host" in
 
286
*-*-irix6*)
 
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
 
291
    *32-bit*)
 
292
      LD="${LD-ld} -32"
 
293
      ;;
 
294
    *N32*)
 
295
      LD="${LD-ld} -n32"
 
296
      ;;
 
297
    *64-bit*)
 
298
      LD="${LD-ld} -64"
 
299
      ;;
 
300
    esac
 
301
  fi
 
302
  rm -rf conftest*
 
303
  ;;
 
304
 
 
305
*-*-sco3.2v5*)
 
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"
 
314
  fi
 
315
  ;;
 
316
 
 
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)
 
322
  ;;
 
323
])
 
324
esac
 
325
])
 
326
 
 
327
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
 
328
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
 
329
 
 
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])])
 
332
 
 
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
 
336
#   `yes'.
 
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],
 
342
changequote([, ])dnl
 
343
[p=${PACKAGE-default}
 
344
case "$enableval" in
 
345
yes) enable_shared=yes ;;
 
346
no) enable_shared=no ;;
 
347
*)
 
348
  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
 
353
      enable_shared=yes
 
354
    fi
 
355
  done
 
356
  IFS="$ac_save_ifs"
 
357
  ;;
 
358
esac],
 
359
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
 
360
])
 
361
 
 
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)])
 
365
 
 
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
 
369
#   `yes'.
 
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],
 
375
changequote([, ])dnl
 
376
[p=${PACKAGE-default}
 
377
case "$enableval" in
 
378
yes) enable_static=yes ;;
 
379
no) enable_static=no ;;
 
380
*)
 
381
  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
 
386
      enable_static=yes
 
387
    fi
 
388
  done
 
389
  IFS="$ac_save_ifs"
 
390
  ;;
 
391
esac],
 
392
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
 
393
])
 
394
 
 
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)])
 
398
 
 
399
 
 
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
 
403
#   `yes'.
 
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],
 
409
changequote([, ])dnl
 
410
[p=${PACKAGE-default}
 
411
case "$enableval" in
 
412
yes) enable_fast_install=yes ;;
 
413
no) enable_fast_install=no ;;
 
414
*)
 
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
 
421
    fi
 
422
  done
 
423
  IFS="$ac_save_ifs"
 
424
  ;;
 
425
esac],
 
426
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
 
427
])
 
428
 
 
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)])
 
432
 
 
433
# AC_PROG_LD - find the path to the GNU or non-GNU linker
 
434
AC_DEFUN([AC_PROG_LD],
 
435
[AC_ARG_WITH(gnu-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
 
441
ac_prog=ld
 
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`
 
446
  case "$ac_prog" in
 
447
    # Accept absolute paths.
 
448
changequote(,)dnl
 
449
    [\\/]* | [A-Za-z]:[\\/]*)
 
450
      re_direlt='/[^/][^/]*/\.\./'
 
451
changequote([,])dnl
 
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%/%"`
 
456
      done
 
457
      test -z "$LD" && LD="$ac_prog"
 
458
      ;;
 
459
  "")
 
460
    # If it fails, then pretend we aren't using GCC.
 
461
    ac_prog=ld
 
462
    ;;
 
463
  *)
 
464
    # If it is relative, then search for the first ld in PATH.
 
465
    with_gnu_ld=unknown
 
466
    ;;
 
467
  esac
 
468
elif test "$with_gnu_ld" = yes; then
 
469
  AC_MSG_CHECKING([for GNU ld])
 
470
else
 
471
  AC_MSG_CHECKING([for non-GNU ld])
 
472
fi
 
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
 
485
      else
 
486
        test "$with_gnu_ld" != yes && break
 
487
      fi
 
488
    fi
 
489
  done
 
490
  IFS="$ac_save_ifs"
 
491
else
 
492
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
 
493
fi])
 
494
LD="$ac_cv_path_LD"
 
495
if test -n "$LD"; then
 
496
  AC_MSG_RESULT($LD)
 
497
else
 
498
  AC_MSG_RESULT(no)
 
499
fi
 
500
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
501
AC_SUBST(LD)
 
502
AC_PROG_LD_GNU
 
503
])
 
504
 
 
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
 
510
else
 
511
  ac_cv_prog_gnu_ld=no
 
512
fi])
 
513
])
 
514
 
 
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.
 
521
  ac_cv_path_NM="$NM"
 
522
else
 
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"
 
532
        break
 
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"
 
535
        break
 
536
      else
 
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
 
539
      fi
 
540
    fi
 
541
  done
 
542
  IFS="$ac_save_ifs"
 
543
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
 
544
fi])
 
545
NM="$ac_cv_path_NM"
 
546
AC_MSG_RESULT([$NM])
 
547
AC_SUBST(NM)
 
548
])
 
549
 
 
550
# AC_CHECK_LIBM - check for math library
 
551
AC_DEFUN([AC_CHECK_LIBM],
 
552
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
553
LIBM=
 
554
case "$host" in
 
555
*-*-beos* | *-*-cygwin*)
 
556
  # These system don't have libm
 
557
  ;;
 
558
*-ncr-sysv4.3*)
 
559
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
560
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 
561
  ;;
 
562
*)
 
563
  AC_CHECK_LIB(m, main, LIBM="-lm")
 
564
  ;;
 
565
esac
 
566
])
 
567
 
 
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" ;;
 
581
  esac
 
582
  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
 
583
  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
 
584
])
 
585
 
 
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])
 
600
   else
 
601
     enable_ltdl_install=yes
 
602
   fi
 
603
  ])
 
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'])
 
608
  else
 
609
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
610
    LIBLTDL="-lltdl"
 
611
    INCLTDL=
 
612
  fi
 
613
])
 
614
 
 
615
dnl old names
 
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
 
623
 
 
624
dnl This is just to silence aclocal about the macro not being used
 
625
ifelse([AC_DISABLE_FAST_INSTALL])dnl
 
626
 
 
627
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
628
 
 
629
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
630
 
 
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)
 
634
# any later version.
 
635
 
 
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.
 
640
 
 
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
 
644
# 02111-1307, USA.
 
645
 
 
646
AC_PREREQ([2.52])
 
647
 
 
648
# serial 6
 
649
 
 
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 "/".
 
654
 
 
655
# _AM_DIRNAME(PATH)
 
656
# -----------------
 
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,
 
662
                          [.],
 
663
                          patsubst([$1], [^\(/\).*], [\1])),
 
664
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
 
665
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
 
666
])# _AM_DIRNAME
 
667
 
 
668
 
 
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])
 
673
 
 
674
 
 
675
# _AM_STAMP(HEADER)
 
676
# -----------------
 
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])
 
682
 
 
683
 
 
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])"
 
694
$2],
 
695
                  [$3])
 
696
])# _AM_CONFIG_HEADER
 
697
 
 
698
 
 
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])])
 
703
])# AM_CONFIG_HEADER
 
704
 
 
705
# Do all the work for Automake.                            -*- Autoconf -*-
 
706
 
 
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.
 
709
 
 
710
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
711
# Free Software Foundation, Inc.
 
712
 
 
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)
 
716
# any later version.
 
717
 
 
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.
 
722
 
 
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
 
726
# 02111-1307, USA.
 
727
 
 
728
# serial 8
 
729
 
 
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...
 
735
 
 
736
 
 
737
AC_PREREQ([2.52])
 
738
 
 
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
 
742
 
 
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])
 
761
fi
 
762
 
 
763
# Define the identity of the package.
 
764
dnl Distinguish between old-style and new-style calls.
 
765
m4_ifval([$2],
 
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
 
772
 
 
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
 
776
 
 
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)
 
786
AM_PROG_INSTALL_SH
 
787
AM_PROG_INSTALL_STRIP
 
788
# We need awk for the "check" target.  The system "awk" is bad on
 
789
# some platforms.
 
790
AC_REQUIRE([AC_PROG_AWK])dnl
 
791
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
792
 
 
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
 
802
])
 
803
])
 
804
 
 
805
# Copyright 2002  Free Software Foundation, Inc.
 
806
 
 
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)
 
810
# any later version.
 
811
 
 
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.
 
816
 
 
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
 
820
 
 
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"])
 
826
 
 
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])])
 
833
 
 
834
# Helper functions for option handling.                    -*- Autoconf -*-
 
835
 
 
836
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
837
 
 
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)
 
841
# any later version.
 
842
 
 
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.
 
847
 
 
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
 
851
# 02111-1307, USA.
 
852
 
 
853
# serial 2
 
854
 
 
855
# _AM_MANGLE_OPTION(NAME)
 
856
# -----------------------
 
857
AC_DEFUN([_AM_MANGLE_OPTION],
 
858
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
859
 
 
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)])
 
865
 
 
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)])])
 
871
 
 
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])])
 
877
 
 
878
#
 
879
# Check to make sure that the build environment is sane.
 
880
#
 
881
 
 
882
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
883
 
 
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)
 
887
# any later version.
 
888
 
 
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.
 
893
 
 
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
 
897
# 02111-1307, USA.
 
898
 
 
899
# serial 3
 
900
 
 
901
# AM_SANITY_CHECK
 
902
# ---------------
 
903
AC_DEFUN([AM_SANITY_CHECK],
 
904
[AC_MSG_CHECKING([whether build environment is sane])
 
905
# Just in case
 
906
sleep 1
 
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
 
912
# directory).
 
913
if (
 
914
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
915
   if test "$[*]" = "X"; then
 
916
      # -L didn't work.
 
917
      set X `ls -t $srcdir/configure conftest.file`
 
918
   fi
 
919
   rm -f conftest.file
 
920
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
921
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
922
 
 
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])
 
929
   fi
 
930
 
 
931
   test "$[2]" = conftest.file
 
932
   )
 
933
then
 
934
   # Ok.
 
935
   :
 
936
else
 
937
   AC_MSG_ERROR([newly created file is older than distributed files!
 
938
Check your system clock])
 
939
fi
 
940
AC_MSG_RESULT(yes)])
 
941
 
 
942
#  -*- Autoconf -*-
 
943
 
 
944
 
 
945
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
946
 
 
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)
 
950
# any later version.
 
951
 
 
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.
 
956
 
 
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
 
960
# 02111-1307, USA.
 
961
 
 
962
# serial 3
 
963
 
 
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"}
 
969
AC_SUBST($1)])
 
970
 
 
971
 
 
972
# AM_MISSING_HAS_RUN
 
973
# ------------------
 
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 "
 
982
else
 
983
  am_missing_run=
 
984
  AC_MSG_WARN([`missing' script is too old or missing])
 
985
fi
 
986
])
 
987
 
 
988
# AM_AUX_DIR_EXPAND
 
989
 
 
990
# Copyright 2001 Free Software Foundation, Inc.
 
991
 
 
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)
 
995
# any later version.
 
996
 
 
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.
 
1001
 
 
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
 
1005
# 02111-1307, USA.
 
1006
 
 
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/../..'.
 
1010
#
 
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.
 
1018
#
 
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
 
1025
#
 
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.
 
1030
#
 
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.
 
1040
#
 
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.
 
1044
 
 
1045
# Rely on autoconf to set up CDPATH properly.
 
1046
AC_PREREQ([2.50])
 
1047
 
 
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`
 
1051
])
 
1052
 
 
1053
# AM_PROG_INSTALL_SH
 
1054
# ------------------
 
1055
# Define $install_sh.
 
1056
 
 
1057
# Copyright 2001 Free Software Foundation, Inc.
 
1058
 
 
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.
 
1063
 
 
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.
 
1068
 
 
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
 
1072
# 02111-1307, USA.
 
1073
 
 
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)])
 
1078
 
 
1079
# AM_PROG_INSTALL_STRIP
 
1080
 
 
1081
# Copyright 2001 Free Software Foundation, Inc.
 
1082
 
 
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.
 
1087
 
 
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.
 
1092
 
 
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
 
1096
# 02111-1307, USA.
 
1097
 
 
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], :)
 
1114
fi
 
1115
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
1116
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1117
 
 
1118
# serial 4                                              -*- Autoconf -*-
 
1119
 
 
1120
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
1121
 
 
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.
 
1126
 
 
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.
 
1131
 
 
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
 
1135
# 02111-1307, USA.
 
1136
 
 
1137
 
 
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...
 
1143
 
 
1144
 
 
1145
 
 
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.
 
1151
#
 
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
 
1161
 
 
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=])
 
1167
 
 
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
 
1175
  # in D'.
 
1176
  mkdir conftest.dir
 
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
 
1180
  cd conftest.dir
 
1181
 
 
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`
 
1185
  fi
 
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
 
1193
 
 
1194
    case $depmode in
 
1195
    nosideeffect)
 
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
 
1199
        continue
 
1200
      else
 
1201
        break
 
1202
      fi
 
1203
      ;;
 
1204
    none) break ;;
 
1205
    esac
 
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
 
1216
      break
 
1217
    fi
 
1218
  done
 
1219
 
 
1220
  cd ..
 
1221
  rm -rf conftest.dir
 
1222
else
 
1223
  am_cv_$1_dependencies_compiler_type=none
 
1224
fi
 
1225
])
 
1226
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1227
])
 
1228
 
 
1229
 
 
1230
# AM_SET_DEPDIR
 
1231
# -------------
 
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
 
1238
  DEPDIR=.deps
 
1239
else
 
1240
  # MS-DOS does not allow filenames that begin with a dot.
 
1241
  DEPDIR=_deps
 
1242
fi
 
1243
rmdir .deps 2>/dev/null
 
1244
AC_SUBST([DEPDIR])
 
1245
])
 
1246
 
 
1247
 
 
1248
# AM_DEP_TRACK
 
1249
# ------------
 
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"
 
1256
  AMDEPBACKSLASH='\'
 
1257
fi
 
1258
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1259
AC_SUBST([AMDEPBACKSLASH])
 
1260
])
 
1261
 
 
1262
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
1263
 
 
1264
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
1265
 
 
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.
 
1270
 
 
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.
 
1275
 
 
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
 
1279
# 02111-1307, USA.
 
1280
 
 
1281
#serial 2
 
1282
 
 
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")`
 
1297
  else
 
1298
    continue
 
1299
  fi
 
1300
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
1301
  # Extract the definition of DEP_FILES from the Makefile without
 
1302
  # running `make'.
 
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 = .*\\\\$/ {
 
1312
      s/^DEP_FILES = //
 
1313
      :loop
 
1314
        s/\\\\$//
 
1315
        p
 
1316
        n
 
1317
        /\\\\$/ b loop
 
1318
      p
 
1319
    }
 
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"
 
1328
  done
 
1329
done
 
1330
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1331
 
 
1332
 
 
1333
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1334
# -----------------------------
 
1335
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1336
#
 
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"])
 
1344
])
 
1345
 
 
1346
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
 
1347
 
 
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.
 
1352
 
 
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.
 
1357
 
 
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
 
1361
# 02111-1307, USA.
 
1362
 
 
1363
# serial 2
 
1364
 
 
1365
# AM_MAKE_INCLUDE()
 
1366
# -----------------
 
1367
# Check to see how make treats includes.
 
1368
AC_DEFUN([AM_MAKE_INCLUDE],
 
1369
[am_make=${MAKE-make}
 
1370
cat > confinc << 'END'
 
1371
doit:
 
1372
        @echo done
 
1373
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])
 
1376
am__include="#"
 
1377
am__quote=
 
1378
_am_result=none
 
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
 
1387
   am__include=include
 
1388
   am__quote=
 
1389
   _am_result=GNU
 
1390
fi
 
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
 
1396
      am__quote="\""
 
1397
      _am_result=BSD
 
1398
   fi
 
1399
fi
 
1400
AC_SUBST(am__include)
 
1401
AC_SUBST(am__quote)
 
1402
AC_MSG_RESULT($_am_result)
 
1403
rm -f confinc confmf
 
1404
])
 
1405
 
 
1406
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
1407
 
 
1408
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
1409
 
 
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.
 
1414
 
 
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.
 
1419
 
 
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
 
1423
# 02111-1307, USA.
 
1424
 
 
1425
# serial 5
 
1426
 
 
1427
AC_PREREQ(2.52)
 
1428
 
 
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
 
1435
AC_SUBST([$1_TRUE])
 
1436
AC_SUBST([$1_FALSE])
 
1437
if $2; then
 
1438
  $1_TRUE=
 
1439
  $1_FALSE='#'
 
1440
else
 
1441
  $1_TRUE='#'
 
1442
  $1_FALSE=
 
1443
fi
 
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.])
 
1448
fi])])
 
1449
 
 
1450
 
 
1451
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
1452
 
 
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.
 
1457
 
 
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.
 
1462
 
 
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
 
1466
# 02111-1307, USA.
 
1467
 
 
1468
# serial 1
 
1469
 
 
1470
# @defmac AC_PROG_CC_STDC
 
1471
# @maindex PROG_CC_STDC
 
1472
# @ovindex CC
 
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.
 
1477
#
 
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.
 
1483
# @end defmac
 
1484
 
 
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
 
1491
dnl like #elif.
 
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
 
1498
ac_save_CC="$CC"
 
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__"
 
1507
do
 
1508
  CC="$ac_save_CC $ac_arg"
 
1509
  AC_TRY_COMPILE(
 
1510
[#include <stdarg.h>
 
1511
#include <stdio.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)
 
1518
     char **p;
 
1519
     int i;
 
1520
{
 
1521
  return p[i];
 
1522
}
 
1523
static char *f (char * (*g) (char **, int), char **p, ...)
 
1524
{
 
1525
  char *s;
 
1526
  va_list v;
 
1527
  va_start (v,p);
 
1528
  s = g (p, va_arg (v,int));
 
1529
  va_end (v);
 
1530
  return s;
 
1531
}
 
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);
 
1536
int argc;
 
1537
char **argv;
 
1538
], [
 
1539
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
1540
],
 
1541
[am_cv_prog_cc_stdc="$ac_arg"; break])
 
1542
done
 
1543
CC="$ac_save_CC"
 
1544
])
 
1545
if test -z "$am_cv_prog_cc_stdc"; then
 
1546
  AC_MSG_RESULT([none needed])
 
1547
else
 
1548
  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
 
1549
fi
 
1550
case "x$am_cv_prog_cc_stdc" in
 
1551
  x|xno) ;;
 
1552
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
 
1553
esac
 
1554
])
 
1555