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