1# generated automatically by aclocal 1.9.2 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 4# Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14dnl Available from the GNU Autoconf Macro Archive at: 15dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html 16dnl 17AC_DEFUN([ACX_PTHREAD], [ 18AC_REQUIRE([AC_CANONICAL_HOST]) 19AC_LANG_SAVE 20AC_LANG_C 21acx_pthread_ok=no 22 23# We used to check for pthread.h first, but this fails if pthread.h 24# requires special compiler flags (e.g. on True64 or Sequent). 25# It gets checked for in the link test anyway. 26 27# First of all, check if the user has set any of the PTHREAD_LIBS, 28# etcetera environment variables, and if threads linking works using 29# them: 30if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then 31 save_CFLAGS="$CFLAGS" 32 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 33 save_LIBS="$LIBS" 34 LIBS="$PTHREAD_LIBS $LIBS" 35 AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) 36 AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) 37 AC_MSG_RESULT($acx_pthread_ok) 38 if test x"$acx_pthread_ok" = xno; then 39 PTHREAD_LIBS="" 40 PTHREAD_CFLAGS="" 41 fi 42 LIBS="$save_LIBS" 43 CFLAGS="$save_CFLAGS" 44fi 45 46# We must check for the threads library under a number of different 47# names; the ordering is very important because some systems 48# (e.g. DEC) have both -lpthread and -lpthreads, where one of the 49# libraries is broken (non-POSIX). 50 51# Create a list of thread flags to try. Items starting with a "-" are 52# C compiler flags, and other items are library names, except for "none" 53# which indicates that we try without any flags at all. 54 55acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" 56 57# The ordering *is* (sometimes) important. Some notes on the 58# individual items follow: 59 60# pthreads: AIX (must check this before -lpthread) 61# none: in case threads are in libc; should be tried before -Kthread and 62# other compiler flags to prevent continual compiler warnings 63# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 64# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 65# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) 66# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) 67# -pthreads: Solaris/gcc 68# -mthreads: Mingw32/gcc, Lynx/gcc 69# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it 70# doesn't hurt to check since this sometimes defines pthreads too; 71# also defines -D_REENTRANT) 72# pthread: Linux, etcetera 73# --thread-safe: KAI C++ 74 75case "${host_cpu}-${host_os}" in 76 *solaris*) 77 78 # On Solaris (at least, for some versions), libc contains stubbed 79 # (non-functional) versions of the pthreads routines, so link-based 80 # tests will erroneously succeed. (We need to link with -pthread or 81 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather 82 # a function called by this macro, so we could check for that, but 83 # who knows whether they'll stub that too in a future libc.) So, 84 # we'll just look for -pthreads and -lpthread first: 85 86 acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" 87 ;; 88esac 89 90if test x"$acx_pthread_ok" = xno; then 91for flag in $acx_pthread_flags; do 92 93 case $flag in 94 none) 95 AC_MSG_CHECKING([whether pthreads work without any flags]) 96 ;; 97 98 -*) 99 AC_MSG_CHECKING([whether pthreads work with $flag]) 100 PTHREAD_CFLAGS="$flag" 101 ;; 102 103 *) 104 AC_MSG_CHECKING([for the pthreads library -l$flag]) 105 PTHREAD_LIBS="-l$flag" 106 ;; 107 esac 108 109 save_LIBS="$LIBS" 110 save_CFLAGS="$CFLAGS" 111 LIBS="$PTHREAD_LIBS $LIBS" 112 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 113 114 # Check for various functions. We must include pthread.h, 115 # since some functions may be macros. (On the Sequent, we 116 # need a special flag -Kthread to make this header compile.) 117 # We check for pthread_join because it is in -lpthread on IRIX 118 # while pthread_create is in libc. We check for pthread_attr_init 119 # due to DEC craziness with -lpthreads. We check for 120 # pthread_cleanup_push because it is one of the few pthread 121 # functions on Solaris that doesn't have a non-functional libc stub. 122 # We try pthread_create on general principles. 123 AC_TRY_LINK([#include <pthread.h>], 124 [pthread_t th; pthread_join(th, 0); 125 pthread_attr_init(0); pthread_cleanup_push(0, 0); 126 pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], 127 [acx_pthread_ok=yes]) 128 129 LIBS="$save_LIBS" 130 CFLAGS="$save_CFLAGS" 131 132 AC_MSG_RESULT($acx_pthread_ok) 133 if test "x$acx_pthread_ok" = xyes; then 134 break; 135 fi 136 137 PTHREAD_LIBS="" 138 PTHREAD_CFLAGS="" 139done 140fi 141 142# Various other checks: 143if test "x$acx_pthread_ok" = xyes; then 144 save_LIBS="$LIBS" 145 LIBS="$PTHREAD_LIBS $LIBS" 146 save_CFLAGS="$CFLAGS" 147 CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 148 149 # Detect AIX lossage: threads are created detached by default 150 # and the JOINABLE attribute has a nonstandard name (UNDETACHED). 151 AC_MSG_CHECKING([for joinable pthread attribute]) 152 AC_TRY_LINK([#include <pthread.h>], 153 [int attr=PTHREAD_CREATE_JOINABLE;], 154 ok=PTHREAD_CREATE_JOINABLE, ok=unknown) 155 if test x"$ok" = xunknown; then 156 AC_TRY_LINK([#include <pthread.h>], 157 [int attr=PTHREAD_CREATE_UNDETACHED;], 158 ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) 159 fi 160 if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then 161 AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, 162 [Define to the necessary symbol if this constant 163 uses a non-standard name on your system.]) 164 fi 165 AC_MSG_RESULT(${ok}) 166 if test x"$ok" = xunknown; then 167 AC_MSG_WARN([we do not know how to create joinable pthreads]) 168 fi 169 170 AC_MSG_CHECKING([if more special flags are required for pthreads]) 171 flag=no 172 case "${host_cpu}-${host_os}" in 173 *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; 174 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; 175 esac 176 AC_MSG_RESULT(${flag}) 177 if test "x$flag" != xno; then 178 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" 179 fi 180 181 LIBS="$save_LIBS" 182 CFLAGS="$save_CFLAGS" 183 184 # More AIX lossage: must compile with cc_r 185 AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) 186else 187 PTHREAD_CC="$CC" 188fi 189 190AC_SUBST(PTHREAD_LIBS) 191AC_SUBST(PTHREAD_CFLAGS) 192AC_SUBST(PTHREAD_CC) 193 194# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: 195if test x"$acx_pthread_ok" = xyes; then 196 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) 197 : 198else 199 acx_pthread_ok=no 200 $2 201fi 202AC_LANG_RESTORE 203])dnl ACX_PTHREAD 204 205dnl Available from the GNU Autoconf Macro Archive at: 206dnl http://www.gnu.org/software/ac-archive/htmldoc/etr_socket_nsl.html 207dnl 208AC_DEFUN([ETR_SOCKET_NSL], 209[ 210AC_CACHE_CHECK(for libraries containing socket functions, 211ac_cv_socket_libs, [ 212 oCFLAGS=$CFLAGS 213 214 AC_TRY_LINK([ 215 #include <sys/types.h> 216 #include <sys/socket.h> 217 #include <netinet/in.h> 218 #include <arpa/inet.h> 219 ], 220 [ 221 struct in_addr add; 222 int sd = socket(AF_INET, SOCK_STREAM, 0); 223 inet_ntoa(add); 224 ], 225 ac_cv_socket_libs=-lc, ac_cv_socket_libs=no) 226 227 if test x"$ac_cv_socket_libs" = "xno" 228 then 229 CFLAGS="$oCFLAGS -lsocket" 230 AC_TRY_LINK([ 231 #include <sys/types.h> 232 #include <sys/socket.h> 233 #include <netinet/in.h> 234 #include <arpa/inet.h> 235 ], 236 [ 237 struct in_addr add; 238 int sd = socket(AF_INET, SOCK_STREAM, 0); 239 inet_ntoa(add); 240 ], 241 ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no) 242 fi 243 244 if test x"$ac_cv_socket_libs" = "xno" 245 then 246 CFLAGS="$oCFLAGS -lsocket -lnsl" 247 AC_TRY_LINK([ 248 #include <sys/types.h> 249 #include <sys/socket.h> 250 #include <netinet/in.h> 251 #include <arpa/inet.h> 252 ], 253 [ 254 struct in_addr add; 255 int sd = socket(AF_INET, SOCK_STREAM, 0); 256 inet_ntoa(add); 257 ], 258 ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no) 259 fi 260 261 CFLAGS=$oCFLAGS 262]) 263 264 if test x"$ac_cv_socket_libs" = "xno" 265 then 266 AC_MSG_ERROR([Cannot find socket libraries]) 267 elif test x"$ac_cv_socket_libs" = "x-lc" 268 then 269 ETR_SOCKET_LIBS="" 270 else 271 ETR_SOCKET_LIBS="$ac_cv_socket_libs" 272 fi 273 274 AC_SUBST(ETR_SOCKET_LIBS) 275]) dnl ETR_SOCKET_NSL 276 277 278dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 279dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 280dnl also defines GSTUFF_PKG_ERRORS on error 281AC_DEFUN(PKG_CHECK_MODULES, [ 282 succeeded=no 283 284 if test -z "$PKG_CONFIG"; then 285 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 286 fi 287 288 if test "$PKG_CONFIG" = "no" ; then 289 echo "*** The pkg-config script could not be found. Make sure it is" 290 echo "*** in your path, or set the PKG_CONFIG environment variable" 291 echo "*** to the full path to pkg-config." 292 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." 293 else 294 PKG_CONFIG_MIN_VERSION=0.9.0 295 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 296 AC_MSG_CHECKING(for $2) 297 298 if $PKG_CONFIG --exists "$2" ; then 299 AC_MSG_RESULT(yes) 300 succeeded=yes 301 302 AC_MSG_CHECKING($1_CFLAGS) 303 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 304 AC_MSG_RESULT($$1_CFLAGS) 305 306 AC_MSG_CHECKING($1_LIBS) 307 $1_LIBS=`$PKG_CONFIG --libs "$2"` 308 AC_MSG_RESULT($$1_LIBS) 309 else 310 $1_CFLAGS="" 311 $1_LIBS="" 312 ## If we have a custom action on failure, don't print errors, but 313 ## do set a variable so people can do so. 314 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 315 ifelse([$4], ,echo $$1_PKG_ERRORS,) 316 fi 317 318 AC_SUBST($1_CFLAGS) 319 AC_SUBST($1_LIBS) 320 else 321 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 322 echo "*** See http://www.freedesktop.org/software/pkgconfig" 323 fi 324 fi 325 326 if test $succeeded = yes; then 327 ifelse([$3], , :, [$3]) 328 else 329 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) 330 fi 331]) 332 333 334 335dnl @synopsis TYPE_SOCKLEN_T 336dnl 337dnl Check whether sys/socket.h defines type socklen_t. Please note 338dnl that some systems require sys/types.h to be included before 339dnl sys/socket.h can be compiled. 340dnl 341dnl @version $Id: type_socklen_t.m4,v 1.1.1.1 2001/07/26 00:46:30 guidod Exp $ 342dnl @author Lars Brinkhoff <lars@nocrew.org> 343dnl 344AC_DEFUN([TYPE_SOCKLEN_T], 345[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, 346[ 347 AC_TRY_COMPILE( 348 [#include <sys/types.h> 349 #include <sys/socket.h>], 350 [socklen_t len = 42; return 0;], 351 ac_cv_type_socklen_t=yes, 352 ac_cv_type_socklen_t=no) 353]) 354 if test $ac_cv_type_socklen_t != yes; then 355 AC_DEFINE([socklen_t], [int], [Define socklen_t type]) 356 fi 357]) 358 359# -*- Autoconf -*- 360# Copyright (C) 2002, 2003 Free Software Foundation, Inc. 361# Generated from amversion.in; do not edit by hand. 362 363# This program is free software; you can redistribute it and/or modify 364# it under the terms of the GNU General Public License as published by 365# the Free Software Foundation; either version 2, or (at your option) 366# any later version. 367 368# This program is distributed in the hope that it will be useful, 369# but WITHOUT ANY WARRANTY; without even the implied warranty of 370# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 371# GNU General Public License for more details. 372 373# You should have received a copy of the GNU General Public License 374# along with this program; if not, write to the Free Software 375# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 376 377# AM_AUTOMAKE_VERSION(VERSION) 378# ---------------------------- 379# Automake X.Y traces this macro to ensure aclocal.m4 has been 380# generated from the m4 files accompanying Automake X.Y. 381AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 382 383# AM_SET_CURRENT_AUTOMAKE_VERSION 384# ------------------------------- 385# Call AM_AUTOMAKE_VERSION so it can be traced. 386# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 387AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 388 [AM_AUTOMAKE_VERSION([1.9.2])]) 389 390# AM_AUX_DIR_EXPAND 391 392# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 393 394# This program is free software; you can redistribute it and/or modify 395# it under the terms of the GNU General Public License as published by 396# the Free Software Foundation; either version 2, or (at your option) 397# any later version. 398 399# This program is distributed in the hope that it will be useful, 400# but WITHOUT ANY WARRANTY; without even the implied warranty of 401# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 402# GNU General Public License for more details. 403 404# You should have received a copy of the GNU General Public License 405# along with this program; if not, write to the Free Software 406# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 407# 02111-1307, USA. 408 409# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 410# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 411# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 412# 413# Of course, Automake must honor this variable whenever it calls a 414# tool from the auxiliary directory. The problem is that $srcdir (and 415# therefore $ac_aux_dir as well) can be either absolute or relative, 416# depending on how configure is run. This is pretty annoying, since 417# it makes $ac_aux_dir quite unusable in subdirectories: in the top 418# source directory, any form will work fine, but in subdirectories a 419# relative path needs to be adjusted first. 420# 421# $ac_aux_dir/missing 422# fails when called from a subdirectory if $ac_aux_dir is relative 423# $top_srcdir/$ac_aux_dir/missing 424# fails if $ac_aux_dir is absolute, 425# fails when called from a subdirectory in a VPATH build with 426# a relative $ac_aux_dir 427# 428# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 429# are both prefixed by $srcdir. In an in-source build this is usually 430# harmless because $srcdir is `.', but things will broke when you 431# start a VPATH build or use an absolute $srcdir. 432# 433# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 434# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 435# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 436# and then we would define $MISSING as 437# MISSING="\${SHELL} $am_aux_dir/missing" 438# This will work as long as MISSING is not called from configure, because 439# unfortunately $(top_srcdir) has no meaning in configure. 440# However there are other variables, like CC, which are often used in 441# configure, and could therefore not use this "fixed" $ac_aux_dir. 442# 443# Another solution, used here, is to always expand $ac_aux_dir to an 444# absolute PATH. The drawback is that using absolute paths prevent a 445# configured tree to be moved without reconfiguration. 446 447AC_DEFUN([AM_AUX_DIR_EXPAND], 448[dnl Rely on autoconf to set up CDPATH properly. 449AC_PREREQ([2.50])dnl 450# expand $ac_aux_dir to an absolute path 451am_aux_dir=`cd $ac_aux_dir && pwd` 452]) 453 454 455# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 456# Free Software Foundation, Inc. 457 458# This program is free software; you can redistribute it and/or modify 459# it under the terms of the GNU General Public License as published by 460# the Free Software Foundation; either version 2, or (at your option) 461# any later version. 462 463# This program is distributed in the hope that it will be useful, 464# but WITHOUT ANY WARRANTY; without even the implied warranty of 465# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 466# GNU General Public License for more details. 467 468# You should have received a copy of the GNU General Public License 469# along with this program; if not, write to the Free Software 470# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 471# 02111-1307, USA. 472 473# serial 3 474 475# This was merged into AC_PROG_CC in Autoconf. 476 477AU_DEFUN([AM_PROG_CC_STDC], 478[AC_PROG_CC 479AC_DIAGNOSE([obsolete], [$0: 480 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon 481 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when 482 you adjust the code. You can also remove the above call to 483 AC_PROG_CC if you already called it elsewhere.]) 484am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc 485]) 486AU_DEFUN([fp_PROG_CC_STDC]) 487 488# AM_CONDITIONAL -*- Autoconf -*- 489 490# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. 491 492# This program is free software; you can redistribute it and/or modify 493# it under the terms of the GNU General Public License as published by 494# the Free Software Foundation; either version 2, or (at your option) 495# any later version. 496 497# This program is distributed in the hope that it will be useful, 498# but WITHOUT ANY WARRANTY; without even the implied warranty of 499# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 500# GNU General Public License for more details. 501 502# You should have received a copy of the GNU General Public License 503# along with this program; if not, write to the Free Software 504# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 505# 02111-1307, USA. 506 507# serial 6 508 509# AM_CONDITIONAL(NAME, SHELL-CONDITION) 510# ------------------------------------- 511# Define a conditional. 512AC_DEFUN([AM_CONDITIONAL], 513[AC_PREREQ(2.52)dnl 514 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 515 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 516AC_SUBST([$1_TRUE]) 517AC_SUBST([$1_FALSE]) 518if $2; then 519 $1_TRUE= 520 $1_FALSE='#' 521else 522 $1_TRUE='#' 523 $1_FALSE= 524fi 525AC_CONFIG_COMMANDS_PRE( 526[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 527 AC_MSG_ERROR([[conditional "$1" was never defined. 528Usually this means the macro was only invoked conditionally.]]) 529fi])]) 530 531# serial 7 -*- Autoconf -*- 532 533# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 534# Free Software Foundation, Inc. 535 536# This program is free software; you can redistribute it and/or modify 537# it under the terms of the GNU General Public License as published by 538# the Free Software Foundation; either version 2, or (at your option) 539# any later version. 540 541# This program is distributed in the hope that it will be useful, 542# but WITHOUT ANY WARRANTY; without even the implied warranty of 543# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 544# GNU General Public License for more details. 545 546# You should have received a copy of the GNU General Public License 547# along with this program; if not, write to the Free Software 548# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 549# 02111-1307, USA. 550 551 552# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 553# written in clear, in which case automake, when reading aclocal.m4, 554# will think it sees a *use*, and therefore will trigger all it's 555# C support machinery. Also note that it means that autoscan, seeing 556# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 557 558 559 560# _AM_DEPENDENCIES(NAME) 561# ---------------------- 562# See how the compiler implements dependency checking. 563# NAME is "CC", "CXX", "GCJ", or "OBJC". 564# We try a few techniques and use that to set a single cache variable. 565# 566# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 567# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 568# dependency, and given that the user is not expected to run this macro, 569# just rely on AC_PROG_CC. 570AC_DEFUN([_AM_DEPENDENCIES], 571[AC_REQUIRE([AM_SET_DEPDIR])dnl 572AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 573AC_REQUIRE([AM_MAKE_INCLUDE])dnl 574AC_REQUIRE([AM_DEP_TRACK])dnl 575 576ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 577 [$1], CXX, [depcc="$CXX" am_compiler_list=], 578 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 579 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 580 [depcc="$$1" am_compiler_list=]) 581 582AC_CACHE_CHECK([dependency style of $depcc], 583 [am_cv_$1_dependencies_compiler_type], 584[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 585 # We make a subdir and do the tests there. Otherwise we can end up 586 # making bogus files that we don't know about and never remove. For 587 # instance it was reported that on HP-UX the gcc test will end up 588 # making a dummy file named `D' -- because `-MD' means `put the output 589 # in D'. 590 mkdir conftest.dir 591 # Copy depcomp to subdir because otherwise we won't find it if we're 592 # using a relative directory. 593 cp "$am_depcomp" conftest.dir 594 cd conftest.dir 595 # We will build objects and dependencies in a subdirectory because 596 # it helps to detect inapplicable dependency modes. For instance 597 # both Tru64's cc and ICC support -MD to output dependencies as a 598 # side effect of compilation, but ICC will put the dependencies in 599 # the current directory while Tru64 will put them in the object 600 # directory. 601 mkdir sub 602 603 am_cv_$1_dependencies_compiler_type=none 604 if test "$am_compiler_list" = ""; then 605 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 606 fi 607 for depmode in $am_compiler_list; do 608 # Setup a source with many dependencies, because some compilers 609 # like to wrap large dependency lists on column 80 (with \), and 610 # we should not choose a depcomp mode which is confused by this. 611 # 612 # We need to recreate these files for each test, as the compiler may 613 # overwrite some of them when testing with obscure command lines. 614 # This happens at least with the AIX C compiler. 615 : > sub/conftest.c 616 for i in 1 2 3 4 5 6; do 617 echo '#include "conftst'$i'.h"' >> sub/conftest.c 618 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 619 # Solaris 8's {/usr,}/bin/sh. 620 touch sub/conftst$i.h 621 done 622 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 623 624 case $depmode in 625 nosideeffect) 626 # after this tag, mechanisms are not by side-effect, so they'll 627 # only be used when explicitly requested 628 if test "x$enable_dependency_tracking" = xyes; then 629 continue 630 else 631 break 632 fi 633 ;; 634 none) break ;; 635 esac 636 # We check with `-c' and `-o' for the sake of the "dashmstdout" 637 # mode. It turns out that the SunPro C++ compiler does not properly 638 # handle `-M -o', and we need to detect this. 639 if depmode=$depmode \ 640 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 641 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 642 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 643 >/dev/null 2>conftest.err && 644 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 645 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 646 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 647 # icc doesn't choke on unknown options, it will just issue warnings 648 # or remarks (even with -Werror). So we grep stderr for any message 649 # that says an option was ignored or not supported. 650 # When given -MP, icc 7.0 and 7.1 complain thusly: 651 # icc: Command line warning: ignoring option '-M'; no argument required 652 # The diagnosis changed in icc 8.0: 653 # icc: Command line remark: option '-MP' not supported 654 if (grep 'ignoring option' conftest.err || 655 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 656 am_cv_$1_dependencies_compiler_type=$depmode 657 break 658 fi 659 fi 660 done 661 662 cd .. 663 rm -rf conftest.dir 664else 665 am_cv_$1_dependencies_compiler_type=none 666fi 667]) 668AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 669AM_CONDITIONAL([am__fastdep$1], [ 670 test "x$enable_dependency_tracking" != xno \ 671 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 672]) 673 674 675# AM_SET_DEPDIR 676# ------------- 677# Choose a directory name for dependency files. 678# This macro is AC_REQUIREd in _AM_DEPENDENCIES 679AC_DEFUN([AM_SET_DEPDIR], 680[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 681AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 682]) 683 684 685# AM_DEP_TRACK 686# ------------ 687AC_DEFUN([AM_DEP_TRACK], 688[AC_ARG_ENABLE(dependency-tracking, 689[ --disable-dependency-tracking speeds up one-time build 690 --enable-dependency-tracking do not reject slow dependency extractors]) 691if test "x$enable_dependency_tracking" != xno; then 692 am_depcomp="$ac_aux_dir/depcomp" 693 AMDEPBACKSLASH='\' 694fi 695AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 696AC_SUBST([AMDEPBACKSLASH]) 697]) 698 699# Generate code to set up dependency tracking. -*- Autoconf -*- 700 701# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 702# Free Software Foundation, Inc. 703 704# This program is free software; you can redistribute it and/or modify 705# it under the terms of the GNU General Public License as published by 706# the Free Software Foundation; either version 2, or (at your option) 707# any later version. 708 709# This program is distributed in the hope that it will be useful, 710# but WITHOUT ANY WARRANTY; without even the implied warranty of 711# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 712# GNU General Public License for more details. 713 714# You should have received a copy of the GNU General Public License 715# along with this program; if not, write to the Free Software 716# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 717# 02111-1307, USA. 718 719#serial 2 720 721# _AM_OUTPUT_DEPENDENCY_COMMANDS 722# ------------------------------ 723AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 724[for mf in $CONFIG_FILES; do 725 # Strip MF so we end up with the name of the file. 726 mf=`echo "$mf" | sed -e 's/:.*$//'` 727 # Check whether this is an Automake generated Makefile or not. 728 # We used to match only the files named `Makefile.in', but 729 # some people rename them; so instead we look at the file content. 730 # Grep'ing the first line is not enough: some people post-process 731 # each Makefile.in and add a new line on top of each file to say so. 732 # So let's grep whole file. 733 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 734 dirpart=`AS_DIRNAME("$mf")` 735 else 736 continue 737 fi 738 # Extract the definition of DEPDIR, am__include, and am__quote 739 # from the Makefile without running `make'. 740 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 741 test -z "$DEPDIR" && continue 742 am__include=`sed -n 's/^am__include = //p' < "$mf"` 743 test -z "am__include" && continue 744 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 745 # When using ansi2knr, U may be empty or an underscore; expand it 746 U=`sed -n 's/^U = //p' < "$mf"` 747 # Find all dependency output files, they are included files with 748 # $(DEPDIR) in their names. We invoke sed twice because it is the 749 # simplest approach to changing $(DEPDIR) to its actual value in the 750 # expansion. 751 for file in `sed -n " 752 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 753 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 754 # Make sure the directory exists. 755 test -f "$dirpart/$file" && continue 756 fdir=`AS_DIRNAME(["$file"])` 757 AS_MKDIR_P([$dirpart/$fdir]) 758 # echo "creating $dirpart/$file" 759 echo '# dummy' > "$dirpart/$file" 760 done 761done 762])# _AM_OUTPUT_DEPENDENCY_COMMANDS 763 764 765# AM_OUTPUT_DEPENDENCY_COMMANDS 766# ----------------------------- 767# This macro should only be invoked once -- use via AC_REQUIRE. 768# 769# This code is only required when automatic dependency tracking 770# is enabled. FIXME. This creates each `.P' file that we will 771# need in order to bootstrap the dependency handling code. 772AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 773[AC_CONFIG_COMMANDS([depfiles], 774 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 775 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 776]) 777 778# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 779 780# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 781 782# This program is free software; you can redistribute it and/or modify 783# it under the terms of the GNU General Public License as published by 784# the Free Software Foundation; either version 2, or (at your option) 785# any later version. 786 787# This program is distributed in the hope that it will be useful, 788# but WITHOUT ANY WARRANTY; without even the implied warranty of 789# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 790# GNU General Public License for more details. 791 792# You should have received a copy of the GNU General Public License 793# along with this program; if not, write to the Free Software 794# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 795# 02111-1307, USA. 796 797# serial 7 798 799# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 800AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 801 802# Do all the work for Automake. -*- Autoconf -*- 803 804# This macro actually does too much some checks are only needed if 805# your package does certain things. But this isn't really a big deal. 806 807# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 808# Free Software Foundation, Inc. 809 810# This program is free software; you can redistribute it and/or modify 811# it under the terms of the GNU General Public License as published by 812# the Free Software Foundation; either version 2, or (at your option) 813# any later version. 814 815# This program is distributed in the hope that it will be useful, 816# but WITHOUT ANY WARRANTY; without even the implied warranty of 817# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 818# GNU General Public License for more details. 819 820# You should have received a copy of the GNU General Public License 821# along with this program; if not, write to the Free Software 822# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 823# 02111-1307, USA. 824 825# serial 11 826 827# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 828# AM_INIT_AUTOMAKE([OPTIONS]) 829# ----------------------------------------------- 830# The call with PACKAGE and VERSION arguments is the old style 831# call (pre autoconf-2.50), which is being phased out. PACKAGE 832# and VERSION should now be passed to AC_INIT and removed from 833# the call to AM_INIT_AUTOMAKE. 834# We support both call styles for the transition. After 835# the next Automake release, Autoconf can make the AC_INIT 836# arguments mandatory, and then we can depend on a new Autoconf 837# release and drop the old call support. 838AC_DEFUN([AM_INIT_AUTOMAKE], 839[AC_PREREQ([2.58])dnl 840dnl Autoconf wants to disallow AM_ names. We explicitly allow 841dnl the ones we care about. 842m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 843AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 844AC_REQUIRE([AC_PROG_INSTALL])dnl 845# test to see if srcdir already configured 846if test "`cd $srcdir && pwd`" != "`pwd`" && 847 test -f $srcdir/config.status; then 848 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 849fi 850 851# test whether we have cygpath 852if test -z "$CYGPATH_W"; then 853 if (cygpath --version) >/dev/null 2>/dev/null; then 854 CYGPATH_W='cygpath -w' 855 else 856 CYGPATH_W=echo 857 fi 858fi 859AC_SUBST([CYGPATH_W]) 860 861# Define the identity of the package. 862dnl Distinguish between old-style and new-style calls. 863m4_ifval([$2], 864[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 865 AC_SUBST([PACKAGE], [$1])dnl 866 AC_SUBST([VERSION], [$2])], 867[_AM_SET_OPTIONS([$1])dnl 868 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 869 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 870 871_AM_IF_OPTION([no-define],, 872[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 873 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 874 875# Some tools Automake needs. 876AC_REQUIRE([AM_SANITY_CHECK])dnl 877AC_REQUIRE([AC_ARG_PROGRAM])dnl 878AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 879AM_MISSING_PROG(AUTOCONF, autoconf) 880AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 881AM_MISSING_PROG(AUTOHEADER, autoheader) 882AM_MISSING_PROG(MAKEINFO, makeinfo) 883AM_PROG_INSTALL_SH 884AM_PROG_INSTALL_STRIP 885AC_REQUIRE([AM_PROG_MKDIR_P])dnl 886# We need awk for the "check" target. The system "awk" is bad on 887# some platforms. 888AC_REQUIRE([AC_PROG_AWK])dnl 889AC_REQUIRE([AC_PROG_MAKE_SET])dnl 890AC_REQUIRE([AM_SET_LEADING_DOT])dnl 891_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 892 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 893 [_AM_PROG_TAR([v7])])]) 894_AM_IF_OPTION([no-dependencies],, 895[AC_PROVIDE_IFELSE([AC_PROG_CC], 896 [_AM_DEPENDENCIES(CC)], 897 [define([AC_PROG_CC], 898 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 899AC_PROVIDE_IFELSE([AC_PROG_CXX], 900 [_AM_DEPENDENCIES(CXX)], 901 [define([AC_PROG_CXX], 902 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 903]) 904]) 905 906 907# When config.status generates a header, we must update the stamp-h file. 908# This file resides in the same directory as the config header 909# that is generated. The stamp files are numbered to have different names. 910 911# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 912# loop where config.status creates the headers, so we can generate 913# our stamp files there. 914AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 915[# Compute $1's index in $config_headers. 916_am_stamp_count=1 917for _am_header in $config_headers :; do 918 case $_am_header in 919 $1 | $1:* ) 920 break ;; 921 * ) 922 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 923 esac 924done 925echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 926 927# AM_PROG_INSTALL_SH 928# ------------------ 929# Define $install_sh. 930 931# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 932 933# This program is free software; you can redistribute it and/or modify 934# it under the terms of the GNU General Public License as published by 935# the Free Software Foundation; either version 2, or (at your option) 936# any later version. 937 938# This program is distributed in the hope that it will be useful, 939# but WITHOUT ANY WARRANTY; without even the implied warranty of 940# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 941# GNU General Public License for more details. 942 943# You should have received a copy of the GNU General Public License 944# along with this program; if not, write to the Free Software 945# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 946# 02111-1307, USA. 947 948AC_DEFUN([AM_PROG_INSTALL_SH], 949[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 950install_sh=${install_sh-"$am_aux_dir/install-sh"} 951AC_SUBST(install_sh)]) 952 953# -*- Autoconf -*- 954# Copyright (C) 2003 Free Software Foundation, Inc. 955 956# This program is free software; you can redistribute it and/or modify 957# it under the terms of the GNU General Public License as published by 958# the Free Software Foundation; either version 2, or (at your option) 959# any later version. 960 961# This program is distributed in the hope that it will be useful, 962# but WITHOUT ANY WARRANTY; without even the implied warranty of 963# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 964# GNU General Public License for more details. 965 966# You should have received a copy of the GNU General Public License 967# along with this program; if not, write to the Free Software 968# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 969# 02111-1307, USA. 970 971# serial 1 972 973# Check whether the underlying file-system supports filenames 974# with a leading dot. For instance MS-DOS doesn't. 975AC_DEFUN([AM_SET_LEADING_DOT], 976[rm -rf .tst 2>/dev/null 977mkdir .tst 2>/dev/null 978if test -d .tst; then 979 am__leading_dot=. 980else 981 am__leading_dot=_ 982fi 983rmdir .tst 2>/dev/null 984AC_SUBST([am__leading_dot])]) 985 986# Add --enable-maintainer-mode option to configure. 987# From Jim Meyering 988 989# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 990# 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# serial 3 1008 1009AC_DEFUN([AM_MAINTAINER_MODE], 1010[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1011 dnl maintainer-mode is disabled by default 1012 AC_ARG_ENABLE(maintainer-mode, 1013[ --enable-maintainer-mode enable make rules and dependencies not useful 1014 (and sometimes confusing) to the casual installer], 1015 USE_MAINTAINER_MODE=$enableval, 1016 USE_MAINTAINER_MODE=no) 1017 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1018 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 1019 MAINT=$MAINTAINER_MODE_TRUE 1020 AC_SUBST(MAINT)dnl 1021] 1022) 1023 1024AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1025 1026# Check to see how 'make' treats includes. -*- Autoconf -*- 1027 1028# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 1029 1030# This program is free software; you can redistribute it and/or modify 1031# it under the terms of the GNU General Public License as published by 1032# the Free Software Foundation; either version 2, or (at your option) 1033# any later version. 1034 1035# This program is distributed in the hope that it will be useful, 1036# but WITHOUT ANY WARRANTY; without even the implied warranty of 1037# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1038# GNU General Public License for more details. 1039 1040# You should have received a copy of the GNU General Public License 1041# along with this program; if not, write to the Free Software 1042# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1043# 02111-1307, USA. 1044 1045# serial 2 1046 1047# AM_MAKE_INCLUDE() 1048# ----------------- 1049# Check to see how make treats includes. 1050AC_DEFUN([AM_MAKE_INCLUDE], 1051[am_make=${MAKE-make} 1052cat > confinc << 'END' 1053am__doit: 1054 @echo done 1055.PHONY: am__doit 1056END 1057# If we don't find an include directive, just comment out the code. 1058AC_MSG_CHECKING([for style of include used by $am_make]) 1059am__include="#" 1060am__quote= 1061_am_result=none 1062# First try GNU make style include. 1063echo "include confinc" > confmf 1064# We grep out `Entering directory' and `Leaving directory' 1065# messages which can occur if `w' ends up in MAKEFLAGS. 1066# In particular we don't look at `^make:' because GNU make might 1067# be invoked under some other name (usually "gmake"), in which 1068# case it prints its new name instead of `make'. 1069if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 1070 am__include=include 1071 am__quote= 1072 _am_result=GNU 1073fi 1074# Now try BSD make style include. 1075if test "$am__include" = "#"; then 1076 echo '.include "confinc"' > confmf 1077 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 1078 am__include=.include 1079 am__quote="\"" 1080 _am_result=BSD 1081 fi 1082fi 1083AC_SUBST([am__include]) 1084AC_SUBST([am__quote]) 1085AC_MSG_RESULT([$_am_result]) 1086rm -f confinc confmf 1087]) 1088 1089# -*- Autoconf -*- 1090 1091 1092# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. 1093 1094# This program is free software; you can redistribute it and/or modify 1095# it under the terms of the GNU General Public License as published by 1096# the Free Software Foundation; either version 2, or (at your option) 1097# any later version. 1098 1099# This program is distributed in the hope that it will be useful, 1100# but WITHOUT ANY WARRANTY; without even the implied warranty of 1101# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1102# GNU General Public License for more details. 1103 1104# You should have received a copy of the GNU General Public License 1105# along with this program; if not, write to the Free Software 1106# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1107# 02111-1307, USA. 1108 1109# serial 3 1110 1111# AM_MISSING_PROG(NAME, PROGRAM) 1112# ------------------------------ 1113AC_DEFUN([AM_MISSING_PROG], 1114[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1115$1=${$1-"${am_missing_run}$2"} 1116AC_SUBST($1)]) 1117 1118 1119# AM_MISSING_HAS_RUN 1120# ------------------ 1121# Define MISSING if not defined so far and test if it supports --run. 1122# If it does, set am_missing_run to use it, otherwise, to nothing. 1123AC_DEFUN([AM_MISSING_HAS_RUN], 1124[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1125test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 1126# Use eval to expand $SHELL 1127if eval "$MISSING --run true"; then 1128 am_missing_run="$MISSING --run " 1129else 1130 am_missing_run= 1131 AC_MSG_WARN([`missing' script is too old or missing]) 1132fi 1133]) 1134 1135# AM_PROG_MKDIR_P 1136# --------------- 1137# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 1138 1139# Copyright (C) 2003, 2004 Free Software Foundation, Inc. 1140 1141# This program is free software; you can redistribute it and/or modify 1142# it under the terms of the GNU General Public License as published by 1143# the Free Software Foundation; either version 2, or (at your option) 1144# any later version. 1145 1146# This program is distributed in the hope that it will be useful, 1147# but WITHOUT ANY WARRANTY; without even the implied warranty of 1148# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1149# GNU General Public License for more details. 1150 1151# You should have received a copy of the GNU General Public License 1152# along with this program; if not, write to the Free Software 1153# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1154# 02111-1307, USA. 1155 1156# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 1157# created by `make install' are always world readable, even if the 1158# installer happens to have an overly restrictive umask (e.g. 077). 1159# This was a mistake. There are at least two reasons why we must not 1160# use `-m 0755': 1161# - it causes special bits like SGID to be ignored, 1162# - it may be too restrictive (some setups expect 775 directories). 1163# 1164# Do not use -m 0755 and let people choose whatever they expect by 1165# setting umask. 1166# 1167# We cannot accept any implementation of `mkdir' that recognizes `-p'. 1168# Some implementations (such as Solaris 8's) are not thread-safe: if a 1169# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 1170# concurrently, both version can detect that a/ is missing, but only 1171# one can create it and the other will error out. Consequently we 1172# restrict ourselves to GNU make (using the --version option ensures 1173# this.) 1174AC_DEFUN([AM_PROG_MKDIR_P], 1175[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 1176 # We used to keeping the `.' as first argument, in order to 1177 # allow $(mkdir_p) to be used without argument. As in 1178 # $(mkdir_p) $(somedir) 1179 # where $(somedir) is conditionally defined. However this is wrong 1180 # for two reasons: 1181 # 1. if the package is installed by a user who cannot write `.' 1182 # make install will fail, 1183 # 2. the above comment should most certainly read 1184 # $(mkdir_p) $(DESTDIR)$(somedir) 1185 # so it does not work when $(somedir) is undefined and 1186 # $(DESTDIR) is not. 1187 # To support the latter case, we have to write 1188 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 1189 # so the `.' trick is pointless. 1190 mkdir_p='mkdir -p --' 1191else 1192 # On NextStep and OpenStep, the `mkdir' command does not 1193 # recognize any option. It will interpret all options as 1194 # directories to create, and then abort because `.' already 1195 # exists. 1196 for d in ./-p ./--version; 1197 do 1198 test -d $d && rmdir $d 1199 done 1200 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 1201 if test -f "$ac_aux_dir/mkinstalldirs"; then 1202 mkdir_p='$(mkinstalldirs)' 1203 else 1204 mkdir_p='$(install_sh) -d' 1205 fi 1206fi 1207AC_SUBST([mkdir_p])]) 1208 1209# Helper functions for option handling. -*- Autoconf -*- 1210 1211# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 1212 1213# This program is free software; you can redistribute it and/or modify 1214# it under the terms of the GNU General Public License as published by 1215# the Free Software Foundation; either version 2, or (at your option) 1216# any later version. 1217 1218# This program is distributed in the hope that it will be useful, 1219# but WITHOUT ANY WARRANTY; without even the implied warranty of 1220# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1221# GNU General Public License for more details. 1222 1223# You should have received a copy of the GNU General Public License 1224# along with this program; if not, write to the Free Software 1225# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1226# 02111-1307, USA. 1227 1228# serial 2 1229 1230# _AM_MANGLE_OPTION(NAME) 1231# ----------------------- 1232AC_DEFUN([_AM_MANGLE_OPTION], 1233[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1234 1235# _AM_SET_OPTION(NAME) 1236# ------------------------------ 1237# Set option NAME. Presently that only means defining a flag for this option. 1238AC_DEFUN([_AM_SET_OPTION], 1239[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1240 1241# _AM_SET_OPTIONS(OPTIONS) 1242# ---------------------------------- 1243# OPTIONS is a space-separated list of Automake options. 1244AC_DEFUN([_AM_SET_OPTIONS], 1245[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1246 1247# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1248# ------------------------------------------- 1249# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1250AC_DEFUN([_AM_IF_OPTION], 1251[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1252 1253# 1254# Check to make sure that the build environment is sane. 1255# 1256 1257# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 1258 1259# This program is free software; you can redistribute it and/or modify 1260# it under the terms of the GNU General Public License as published by 1261# the Free Software Foundation; either version 2, or (at your option) 1262# any later version. 1263 1264# This program is distributed in the hope that it will be useful, 1265# but WITHOUT ANY WARRANTY; without even the implied warranty of 1266# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1267# GNU General Public License for more details. 1268 1269# You should have received a copy of the GNU General Public License 1270# along with this program; if not, write to the Free Software 1271# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1272# 02111-1307, USA. 1273 1274# serial 3 1275 1276# AM_SANITY_CHECK 1277# --------------- 1278AC_DEFUN([AM_SANITY_CHECK], 1279[AC_MSG_CHECKING([whether build environment is sane]) 1280# Just in case 1281sleep 1 1282echo timestamp > conftest.file 1283# Do `set' in a subshell so we don't clobber the current shell's 1284# arguments. Must try -L first in case configure is actually a 1285# symlink; some systems play weird games with the mod time of symlinks 1286# (eg FreeBSD returns the mod time of the symlink's containing 1287# directory). 1288if ( 1289 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 1290 if test "$[*]" = "X"; then 1291 # -L didn't work. 1292 set X `ls -t $srcdir/configure conftest.file` 1293 fi 1294 rm -f conftest.file 1295 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1296 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1297 1298 # If neither matched, then we have a broken ls. This can happen 1299 # if, for instance, CONFIG_SHELL is bash and it inherits a 1300 # broken ls alias from the environment. This has actually 1301 # happened. Such a system could not be considered "sane". 1302 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1303alias in your environment]) 1304 fi 1305 1306 test "$[2]" = conftest.file 1307 ) 1308then 1309 # Ok. 1310 : 1311else 1312 AC_MSG_ERROR([newly created file is older than distributed files! 1313Check your system clock]) 1314fi 1315AC_MSG_RESULT(yes)]) 1316 1317# AM_PROG_INSTALL_STRIP 1318 1319# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 1320 1321# This program is free software; you can redistribute it and/or modify 1322# it under the terms of the GNU General Public License as published by 1323# the Free Software Foundation; either version 2, or (at your option) 1324# any later version. 1325 1326# This program is distributed in the hope that it will be useful, 1327# but WITHOUT ANY WARRANTY; without even the implied warranty of 1328# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1329# GNU General Public License for more details. 1330 1331# You should have received a copy of the GNU General Public License 1332# along with this program; if not, write to the Free Software 1333# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1334# 02111-1307, USA. 1335 1336# One issue with vendor `install' (even GNU) is that you can't 1337# specify the program used to strip binaries. This is especially 1338# annoying in cross-compiling environments, where the build's strip 1339# is unlikely to handle the host's binaries. 1340# Fortunately install-sh will honor a STRIPPROG variable, so we 1341# always use install-sh in `make install-strip', and initialize 1342# STRIPPROG with the value of the STRIP variable (set by the user). 1343AC_DEFUN([AM_PROG_INSTALL_STRIP], 1344[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1345# Installed binaries are usually stripped using `strip' when the user 1346# run `make install-strip'. However `strip' might not be the right 1347# tool to use in cross-compilation environments, therefore Automake 1348# will honor the `STRIP' environment variable to overrule this program. 1349dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1350if test "$cross_compiling" != no; then 1351 AC_CHECK_TOOL([STRIP], [strip], :) 1352fi 1353INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 1354AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1355 1356# Check how to create a tarball. -*- Autoconf -*- 1357 1358# Copyright (C) 2004 Free Software Foundation, Inc. 1359 1360# This program is free software; you can redistribute it and/or modify 1361# it under the terms of the GNU General Public License as published by 1362# the Free Software Foundation; either version 2, or (at your option) 1363# any later version. 1364 1365# This program is distributed in the hope that it will be useful, 1366# but WITHOUT ANY WARRANTY; without even the implied warranty of 1367# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1368# GNU General Public License for more details. 1369 1370# You should have received a copy of the GNU General Public License 1371# along with this program; if not, write to the Free Software 1372# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1373# 02111-1307, USA. 1374 1375# serial 1 1376 1377 1378# _AM_PROG_TAR(FORMAT) 1379# -------------------- 1380# Check how to create a tarball in format FORMAT. 1381# FORMAT should be one of `v7', `ustar', or `pax'. 1382# 1383# Substitute a variable $(am__tar) that is a command 1384# writing to stdout a FORMAT-tarball containing the directory 1385# $tardir. 1386# tardir=directory && $(am__tar) > result.tar 1387# 1388# Substitute a variable $(am__untar) that extract such 1389# a tarball read from stdin. 1390# $(am__untar) < result.tar 1391AC_DEFUN([_AM_PROG_TAR], 1392[# Always define AMTAR for backward compatibility. 1393AM_MISSING_PROG([AMTAR], [tar]) 1394m4_if([$1], [v7], 1395 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1396 [m4_case([$1], [ustar],, [pax],, 1397 [m4_fatal([Unknown tar format])]) 1398AC_MSG_CHECKING([how to create a $1 tar archive]) 1399# Loop over all known methods to create a tar archive until one works. 1400_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1401_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1402# Do not fold the above two line into one, because Tru64 sh and 1403# Solaris sh will not grok spaces in the rhs of `-'. 1404for _am_tool in $_am_tools 1405do 1406 case $_am_tool in 1407 gnutar) 1408 for _am_tar in tar gnutar gtar; 1409 do 1410 AM_RUN_LOG([$_am_tar --version]) && break 1411 done 1412 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1413 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1414 am__untar="$_am_tar -xf -" 1415 ;; 1416 plaintar) 1417 # Must skip GNU tar: if it does not support --format= it doesn't create 1418 # ustar tarball either. 1419 (tar --version) >/dev/null 2>&1 && continue 1420 am__tar='tar chf - "$$tardir"' 1421 am__tar_='tar chf - "$tardir"' 1422 am__untar='tar xf -' 1423 ;; 1424 pax) 1425 am__tar='pax -L -x $1 -w "$$tardir"' 1426 am__tar_='pax -L -x $1 -w "$tardir"' 1427 am__untar='pax -r' 1428 ;; 1429 cpio) 1430 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1431 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1432 am__untar='cpio -i -H $1 -d' 1433 ;; 1434 none) 1435 am__tar=false 1436 am__tar_=false 1437 am__untar=false 1438 ;; 1439 esac 1440 1441 # If the value was cached, stop now. We just wanted to have am__tar 1442 # and am__untar set. 1443 test -n "${am_cv_prog_tar_$1}" && break 1444 1445 # tar/untar a dummy directory, and stop if the command works 1446 rm -rf conftest.dir 1447 mkdir conftest.dir 1448 echo GrepMe > conftest.dir/file 1449 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1450 rm -rf conftest.dir 1451 if test -s conftest.tar; then 1452 AM_RUN_LOG([$am__untar <conftest.tar]) 1453 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1454 fi 1455done 1456rm -rf conftest.dir 1457 1458AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1459AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1460AC_SUBST([am__tar]) 1461AC_SUBST([am__untar]) 1462]) # _AM_PROG_TAR 1463 1464