1# generated automatically by aclocal 1.7.5 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4# Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_sinclude(arch.m4)dnl 15m4_sinclude(gettext.m4)dnl 16m4_sinclude(lcmessage.m4)dnl 17m4_sinclude(progtest.m4)dnl 18m4_sinclude(socket.m4)dnl 19m4_sinclude(strtod.m4)dnl 20 21# Do all the work for Automake. -*- Autoconf -*- 22 23# This macro actually does too much some checks are only needed if 24# your package does certain things. But this isn't really a big deal. 25 26# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 27# Free Software Foundation, Inc. 28 29# This program is free software; you can redistribute it and/or modify 30# it under the terms of the GNU General Public License as published by 31# the Free Software Foundation; either version 2, or (at your option) 32# any later version. 33 34# This program is distributed in the hope that it will be useful, 35# but WITHOUT ANY WARRANTY; without even the implied warranty of 36# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 37# GNU General Public License for more details. 38 39# You should have received a copy of the GNU General Public License 40# along with this program; if not, write to the Free Software 41# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 42# 02111-1307, USA. 43 44# serial 10 45 46AC_PREREQ([2.54]) 47 48# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 49# the ones we care about. 50m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 51 52# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 53# AM_INIT_AUTOMAKE([OPTIONS]) 54# ----------------------------------------------- 55# The call with PACKAGE and VERSION arguments is the old style 56# call (pre autoconf-2.50), which is being phased out. PACKAGE 57# and VERSION should now be passed to AC_INIT and removed from 58# the call to AM_INIT_AUTOMAKE. 59# We support both call styles for the transition. After 60# the next Automake release, Autoconf can make the AC_INIT 61# arguments mandatory, and then we can depend on a new Autoconf 62# release and drop the old call support. 63AC_DEFUN([AM_INIT_AUTOMAKE], 64[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 65 AC_REQUIRE([AC_PROG_INSTALL])dnl 66# test to see if srcdir already configured 67if test "`cd $srcdir && pwd`" != "`pwd`" && 68 test -f $srcdir/config.status; then 69 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 70fi 71 72# test whether we have cygpath 73if test -z "$CYGPATH_W"; then 74 if (cygpath --version) >/dev/null 2>/dev/null; then 75 CYGPATH_W='cygpath -w' 76 else 77 CYGPATH_W=echo 78 fi 79fi 80AC_SUBST([CYGPATH_W]) 81 82# Define the identity of the package. 83dnl Distinguish between old-style and new-style calls. 84m4_ifval([$2], 85[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 86 AC_SUBST([PACKAGE], [$1])dnl 87 AC_SUBST([VERSION], [$2])], 88[_AM_SET_OPTIONS([$1])dnl 89 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 90 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 91 92_AM_IF_OPTION([no-define],, 93[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 94 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 95 96# Some tools Automake needs. 97AC_REQUIRE([AM_SANITY_CHECK])dnl 98AC_REQUIRE([AC_ARG_PROGRAM])dnl 99AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 100AM_MISSING_PROG(AUTOCONF, autoconf) 101AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 102AM_MISSING_PROG(AUTOHEADER, autoheader) 103AM_MISSING_PROG(MAKEINFO, makeinfo) 104AM_MISSING_PROG(AMTAR, tar) 105AM_PROG_INSTALL_SH 106AM_PROG_INSTALL_STRIP 107# We need awk for the "check" target. The system "awk" is bad on 108# some platforms. 109AC_REQUIRE([AC_PROG_AWK])dnl 110AC_REQUIRE([AC_PROG_MAKE_SET])dnl 111AC_REQUIRE([AM_SET_LEADING_DOT])dnl 112 113_AM_IF_OPTION([no-dependencies],, 114[AC_PROVIDE_IFELSE([AC_PROG_CC], 115 [_AM_DEPENDENCIES(CC)], 116 [define([AC_PROG_CC], 117 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 118AC_PROVIDE_IFELSE([AC_PROG_CXX], 119 [_AM_DEPENDENCIES(CXX)], 120 [define([AC_PROG_CXX], 121 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 122]) 123]) 124 125 126# When config.status generates a header, we must update the stamp-h file. 127# This file resides in the same directory as the config header 128# that is generated. The stamp files are numbered to have different names. 129 130# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 131# loop where config.status creates the headers, so we can generate 132# our stamp files there. 133AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 134[# Compute $1's index in $config_headers. 135_am_stamp_count=1 136for _am_header in $config_headers :; do 137 case $_am_header in 138 $1 | $1:* ) 139 break ;; 140 * ) 141 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 142 esac 143done 144echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 145 146# Copyright 2002 Free Software Foundation, Inc. 147 148# This program is free software; you can redistribute it and/or modify 149# it under the terms of the GNU General Public License as published by 150# the Free Software Foundation; either version 2, or (at your option) 151# any later version. 152 153# This program is distributed in the hope that it will be useful, 154# but WITHOUT ANY WARRANTY; without even the implied warranty of 155# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 156# GNU General Public License for more details. 157 158# You should have received a copy of the GNU General Public License 159# along with this program; if not, write to the Free Software 160# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 161 162# AM_AUTOMAKE_VERSION(VERSION) 163# ---------------------------- 164# Automake X.Y traces this macro to ensure aclocal.m4 has been 165# generated from the m4 files accompanying Automake X.Y. 166AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 167 168# AM_SET_CURRENT_AUTOMAKE_VERSION 169# ------------------------------- 170# Call AM_AUTOMAKE_VERSION so it can be traced. 171# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 172AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 173 [AM_AUTOMAKE_VERSION([1.7.5])]) 174 175# Helper functions for option handling. -*- Autoconf -*- 176 177# Copyright 2001, 2002 Free Software Foundation, Inc. 178 179# This program is free software; you can redistribute it and/or modify 180# it under the terms of the GNU General Public License as published by 181# the Free Software Foundation; either version 2, or (at your option) 182# any later version. 183 184# This program is distributed in the hope that it will be useful, 185# but WITHOUT ANY WARRANTY; without even the implied warranty of 186# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 187# GNU General Public License for more details. 188 189# You should have received a copy of the GNU General Public License 190# along with this program; if not, write to the Free Software 191# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 192# 02111-1307, USA. 193 194# serial 2 195 196# _AM_MANGLE_OPTION(NAME) 197# ----------------------- 198AC_DEFUN([_AM_MANGLE_OPTION], 199[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 200 201# _AM_SET_OPTION(NAME) 202# ------------------------------ 203# Set option NAME. Presently that only means defining a flag for this option. 204AC_DEFUN([_AM_SET_OPTION], 205[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 206 207# _AM_SET_OPTIONS(OPTIONS) 208# ---------------------------------- 209# OPTIONS is a space-separated list of Automake options. 210AC_DEFUN([_AM_SET_OPTIONS], 211[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 212 213# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 214# ------------------------------------------- 215# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 216AC_DEFUN([_AM_IF_OPTION], 217[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 218 219# 220# Check to make sure that the build environment is sane. 221# 222 223# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 224 225# This program is free software; you can redistribute it and/or modify 226# it under the terms of the GNU General Public License as published by 227# the Free Software Foundation; either version 2, or (at your option) 228# any later version. 229 230# This program is distributed in the hope that it will be useful, 231# but WITHOUT ANY WARRANTY; without even the implied warranty of 232# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 233# GNU General Public License for more details. 234 235# You should have received a copy of the GNU General Public License 236# along with this program; if not, write to the Free Software 237# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 238# 02111-1307, USA. 239 240# serial 3 241 242# AM_SANITY_CHECK 243# --------------- 244AC_DEFUN([AM_SANITY_CHECK], 245[AC_MSG_CHECKING([whether build environment is sane]) 246# Just in case 247sleep 1 248echo timestamp > conftest.file 249# Do `set' in a subshell so we don't clobber the current shell's 250# arguments. Must try -L first in case configure is actually a 251# symlink; some systems play weird games with the mod time of symlinks 252# (eg FreeBSD returns the mod time of the symlink's containing 253# directory). 254if ( 255 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 256 if test "$[*]" = "X"; then 257 # -L didn't work. 258 set X `ls -t $srcdir/configure conftest.file` 259 fi 260 rm -f conftest.file 261 if test "$[*]" != "X $srcdir/configure conftest.file" \ 262 && test "$[*]" != "X conftest.file $srcdir/configure"; then 263 264 # If neither matched, then we have a broken ls. This can happen 265 # if, for instance, CONFIG_SHELL is bash and it inherits a 266 # broken ls alias from the environment. This has actually 267 # happened. Such a system could not be considered "sane". 268 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 269alias in your environment]) 270 fi 271 272 test "$[2]" = conftest.file 273 ) 274then 275 # Ok. 276 : 277else 278 AC_MSG_ERROR([newly created file is older than distributed files! 279Check your system clock]) 280fi 281AC_MSG_RESULT(yes)]) 282 283# -*- Autoconf -*- 284 285 286# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 287 288# This program is free software; you can redistribute it and/or modify 289# it under the terms of the GNU General Public License as published by 290# the Free Software Foundation; either version 2, or (at your option) 291# any later version. 292 293# This program is distributed in the hope that it will be useful, 294# but WITHOUT ANY WARRANTY; without even the implied warranty of 295# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 296# GNU General Public License for more details. 297 298# You should have received a copy of the GNU General Public License 299# along with this program; if not, write to the Free Software 300# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 301# 02111-1307, USA. 302 303# serial 3 304 305# AM_MISSING_PROG(NAME, PROGRAM) 306# ------------------------------ 307AC_DEFUN([AM_MISSING_PROG], 308[AC_REQUIRE([AM_MISSING_HAS_RUN]) 309$1=${$1-"${am_missing_run}$2"} 310AC_SUBST($1)]) 311 312 313# AM_MISSING_HAS_RUN 314# ------------------ 315# Define MISSING if not defined so far and test if it supports --run. 316# If it does, set am_missing_run to use it, otherwise, to nothing. 317AC_DEFUN([AM_MISSING_HAS_RUN], 318[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 319test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 320# Use eval to expand $SHELL 321if eval "$MISSING --run true"; then 322 am_missing_run="$MISSING --run " 323else 324 am_missing_run= 325 AC_MSG_WARN([`missing' script is too old or missing]) 326fi 327]) 328 329# AM_AUX_DIR_EXPAND 330 331# Copyright 2001 Free Software Foundation, Inc. 332 333# This program is free software; you can redistribute it and/or modify 334# it under the terms of the GNU General Public License as published by 335# the Free Software Foundation; either version 2, or (at your option) 336# any later version. 337 338# This program is distributed in the hope that it will be useful, 339# but WITHOUT ANY WARRANTY; without even the implied warranty of 340# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 341# GNU General Public License for more details. 342 343# You should have received a copy of the GNU General Public License 344# along with this program; if not, write to the Free Software 345# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 346# 02111-1307, USA. 347 348# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 349# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 350# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 351# 352# Of course, Automake must honor this variable whenever it calls a 353# tool from the auxiliary directory. The problem is that $srcdir (and 354# therefore $ac_aux_dir as well) can be either absolute or relative, 355# depending on how configure is run. This is pretty annoying, since 356# it makes $ac_aux_dir quite unusable in subdirectories: in the top 357# source directory, any form will work fine, but in subdirectories a 358# relative path needs to be adjusted first. 359# 360# $ac_aux_dir/missing 361# fails when called from a subdirectory if $ac_aux_dir is relative 362# $top_srcdir/$ac_aux_dir/missing 363# fails if $ac_aux_dir is absolute, 364# fails when called from a subdirectory in a VPATH build with 365# a relative $ac_aux_dir 366# 367# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 368# are both prefixed by $srcdir. In an in-source build this is usually 369# harmless because $srcdir is `.', but things will broke when you 370# start a VPATH build or use an absolute $srcdir. 371# 372# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 373# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 374# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 375# and then we would define $MISSING as 376# MISSING="\${SHELL} $am_aux_dir/missing" 377# This will work as long as MISSING is not called from configure, because 378# unfortunately $(top_srcdir) has no meaning in configure. 379# However there are other variables, like CC, which are often used in 380# configure, and could therefore not use this "fixed" $ac_aux_dir. 381# 382# Another solution, used here, is to always expand $ac_aux_dir to an 383# absolute PATH. The drawback is that using absolute paths prevent a 384# configured tree to be moved without reconfiguration. 385 386# Rely on autoconf to set up CDPATH properly. 387AC_PREREQ([2.50]) 388 389AC_DEFUN([AM_AUX_DIR_EXPAND], [ 390# expand $ac_aux_dir to an absolute path 391am_aux_dir=`cd $ac_aux_dir && pwd` 392]) 393 394# AM_PROG_INSTALL_SH 395# ------------------ 396# Define $install_sh. 397 398# Copyright 2001 Free Software Foundation, Inc. 399 400# This program is free software; you can redistribute it and/or modify 401# it under the terms of the GNU General Public License as published by 402# the Free Software Foundation; either version 2, or (at your option) 403# any later version. 404 405# This program is distributed in the hope that it will be useful, 406# but WITHOUT ANY WARRANTY; without even the implied warranty of 407# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 408# GNU General Public License for more details. 409 410# You should have received a copy of the GNU General Public License 411# along with this program; if not, write to the Free Software 412# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 413# 02111-1307, USA. 414 415AC_DEFUN([AM_PROG_INSTALL_SH], 416[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 417install_sh=${install_sh-"$am_aux_dir/install-sh"} 418AC_SUBST(install_sh)]) 419 420# AM_PROG_INSTALL_STRIP 421 422# Copyright 2001 Free Software Foundation, Inc. 423 424# This program is free software; you can redistribute it and/or modify 425# it under the terms of the GNU General Public License as published by 426# the Free Software Foundation; either version 2, or (at your option) 427# any later version. 428 429# This program is distributed in the hope that it will be useful, 430# but WITHOUT ANY WARRANTY; without even the implied warranty of 431# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 432# GNU General Public License for more details. 433 434# You should have received a copy of the GNU General Public License 435# along with this program; if not, write to the Free Software 436# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 437# 02111-1307, USA. 438 439# One issue with vendor `install' (even GNU) is that you can't 440# specify the program used to strip binaries. This is especially 441# annoying in cross-compiling environments, where the build's strip 442# is unlikely to handle the host's binaries. 443# Fortunately install-sh will honor a STRIPPROG variable, so we 444# always use install-sh in `make install-strip', and initialize 445# STRIPPROG with the value of the STRIP variable (set by the user). 446AC_DEFUN([AM_PROG_INSTALL_STRIP], 447[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 448# Installed binaries are usually stripped using `strip' when the user 449# run `make install-strip'. However `strip' might not be the right 450# tool to use in cross-compilation environments, therefore Automake 451# will honor the `STRIP' environment variable to overrule this program. 452dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 453if test "$cross_compiling" != no; then 454 AC_CHECK_TOOL([STRIP], [strip], :) 455fi 456INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 457AC_SUBST([INSTALL_STRIP_PROGRAM])]) 458 459# -*- Autoconf -*- 460# Copyright (C) 2003 Free Software Foundation, Inc. 461 462# This program is free software; you can redistribute it and/or modify 463# it under the terms of the GNU General Public License as published by 464# the Free Software Foundation; either version 2, or (at your option) 465# any later version. 466 467# This program is distributed in the hope that it will be useful, 468# but WITHOUT ANY WARRANTY; without even the implied warranty of 469# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 470# GNU General Public License for more details. 471 472# You should have received a copy of the GNU General Public License 473# along with this program; if not, write to the Free Software 474# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 475# 02111-1307, USA. 476 477# serial 1 478 479# Check whether the underlying file-system supports filenames 480# with a leading dot. For instance MS-DOS doesn't. 481AC_DEFUN([AM_SET_LEADING_DOT], 482[rm -rf .tst 2>/dev/null 483mkdir .tst 2>/dev/null 484if test -d .tst; then 485 am__leading_dot=. 486else 487 am__leading_dot=_ 488fi 489rmdir .tst 2>/dev/null 490AC_SUBST([am__leading_dot])]) 491 492# serial 5 -*- Autoconf -*- 493 494# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 495 496# This program is free software; you can redistribute it and/or modify 497# it under the terms of the GNU General Public License as published by 498# the Free Software Foundation; either version 2, or (at your option) 499# any later version. 500 501# This program is distributed in the hope that it will be useful, 502# but WITHOUT ANY WARRANTY; without even the implied warranty of 503# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 504# GNU General Public License for more details. 505 506# You should have received a copy of the GNU General Public License 507# along with this program; if not, write to the Free Software 508# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 509# 02111-1307, USA. 510 511 512# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 513# written in clear, in which case automake, when reading aclocal.m4, 514# will think it sees a *use*, and therefore will trigger all it's 515# C support machinery. Also note that it means that autoscan, seeing 516# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 517 518 519 520# _AM_DEPENDENCIES(NAME) 521# ---------------------- 522# See how the compiler implements dependency checking. 523# NAME is "CC", "CXX", "GCJ", or "OBJC". 524# We try a few techniques and use that to set a single cache variable. 525# 526# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 527# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 528# dependency, and given that the user is not expected to run this macro, 529# just rely on AC_PROG_CC. 530AC_DEFUN([_AM_DEPENDENCIES], 531[AC_REQUIRE([AM_SET_DEPDIR])dnl 532AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 533AC_REQUIRE([AM_MAKE_INCLUDE])dnl 534AC_REQUIRE([AM_DEP_TRACK])dnl 535 536ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 537 [$1], CXX, [depcc="$CXX" am_compiler_list=], 538 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 539 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 540 [depcc="$$1" am_compiler_list=]) 541 542AC_CACHE_CHECK([dependency style of $depcc], 543 [am_cv_$1_dependencies_compiler_type], 544[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 545 # We make a subdir and do the tests there. Otherwise we can end up 546 # making bogus files that we don't know about and never remove. For 547 # instance it was reported that on HP-UX the gcc test will end up 548 # making a dummy file named `D' -- because `-MD' means `put the output 549 # in D'. 550 mkdir conftest.dir 551 # Copy depcomp to subdir because otherwise we won't find it if we're 552 # using a relative directory. 553 cp "$am_depcomp" conftest.dir 554 cd conftest.dir 555 556 am_cv_$1_dependencies_compiler_type=none 557 if test "$am_compiler_list" = ""; then 558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 559 fi 560 for depmode in $am_compiler_list; do 561 # We need to recreate these files for each test, as the compiler may 562 # overwrite some of them when testing with obscure command lines. 563 # This happens at least with the AIX C compiler. 564 echo '#include "conftest.h"' > conftest.c 565 echo 'int i;' > conftest.h 566 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf 567 568 case $depmode in 569 nosideeffect) 570 # after this tag, mechanisms are not by side-effect, so they'll 571 # only be used when explicitly requested 572 if test "x$enable_dependency_tracking" = xyes; then 573 continue 574 else 575 break 576 fi 577 ;; 578 none) break ;; 579 esac 580 # We check with `-c' and `-o' for the sake of the "dashmstdout" 581 # mode. It turns out that the SunPro C++ compiler does not properly 582 # handle `-M -o', and we need to detect this. 583 if depmode=$depmode \ 584 source=conftest.c object=conftest.o \ 585 depfile=conftest.Po tmpdepfile=conftest.TPo \ 586 $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ 587 >/dev/null 2>conftest.err && 588 grep conftest.h conftest.Po > /dev/null 2>&1 && 589 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 590 # icc doesn't choke on unknown options, it will just issue warnings 591 # (even with -Werror). So we grep stderr for any message 592 # that says an option was ignored. 593 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 594 am_cv_$1_dependencies_compiler_type=$depmode 595 break 596 fi 597 fi 598 done 599 600 cd .. 601 rm -rf conftest.dir 602else 603 am_cv_$1_dependencies_compiler_type=none 604fi 605]) 606AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 607AM_CONDITIONAL([am__fastdep$1], [ 608 test "x$enable_dependency_tracking" != xno \ 609 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 610]) 611 612 613# AM_SET_DEPDIR 614# ------------- 615# Choose a directory name for dependency files. 616# This macro is AC_REQUIREd in _AM_DEPENDENCIES 617AC_DEFUN([AM_SET_DEPDIR], 618[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 619AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 620]) 621 622 623# AM_DEP_TRACK 624# ------------ 625AC_DEFUN([AM_DEP_TRACK], 626[AC_ARG_ENABLE(dependency-tracking, 627[ --disable-dependency-tracking Speeds up one-time builds 628 --enable-dependency-tracking Do not reject slow dependency extractors]) 629if test "x$enable_dependency_tracking" != xno; then 630 am_depcomp="$ac_aux_dir/depcomp" 631 AMDEPBACKSLASH='\' 632fi 633AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 634AC_SUBST([AMDEPBACKSLASH]) 635]) 636 637# Generate code to set up dependency tracking. -*- Autoconf -*- 638 639# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 640 641# This program is free software; you can redistribute it and/or modify 642# it under the terms of the GNU General Public License as published by 643# the Free Software Foundation; either version 2, or (at your option) 644# any later version. 645 646# This program is distributed in the hope that it will be useful, 647# but WITHOUT ANY WARRANTY; without even the implied warranty of 648# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 649# GNU General Public License for more details. 650 651# You should have received a copy of the GNU General Public License 652# along with this program; if not, write to the Free Software 653# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 654# 02111-1307, USA. 655 656#serial 2 657 658# _AM_OUTPUT_DEPENDENCY_COMMANDS 659# ------------------------------ 660AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 661[for mf in $CONFIG_FILES; do 662 # Strip MF so we end up with the name of the file. 663 mf=`echo "$mf" | sed -e 's/:.*$//'` 664 # Check whether this is an Automake generated Makefile or not. 665 # We used to match only the files named `Makefile.in', but 666 # some people rename them; so instead we look at the file content. 667 # Grep'ing the first line is not enough: some people post-process 668 # each Makefile.in and add a new line on top of each file to say so. 669 # So let's grep whole file. 670 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 671 dirpart=`AS_DIRNAME("$mf")` 672 else 673 continue 674 fi 675 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 676 # Extract the definition of DEP_FILES from the Makefile without 677 # running `make'. 678 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 679 test -z "$DEPDIR" && continue 680 # When using ansi2knr, U may be empty or an underscore; expand it 681 U=`sed -n -e '/^U = / s///p' < "$mf"` 682 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 683 # We invoke sed twice because it is the simplest approach to 684 # changing $(DEPDIR) to its actual value in the expansion. 685 for file in `sed -n -e ' 686 /^DEP_FILES = .*\\\\$/ { 687 s/^DEP_FILES = // 688 :loop 689 s/\\\\$// 690 p 691 n 692 /\\\\$/ b loop 693 p 694 } 695 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 696 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 697 # Make sure the directory exists. 698 test -f "$dirpart/$file" && continue 699 fdir=`AS_DIRNAME(["$file"])` 700 AS_MKDIR_P([$dirpart/$fdir]) 701 # echo "creating $dirpart/$file" 702 echo '# dummy' > "$dirpart/$file" 703 done 704done 705])# _AM_OUTPUT_DEPENDENCY_COMMANDS 706 707 708# AM_OUTPUT_DEPENDENCY_COMMANDS 709# ----------------------------- 710# This macro should only be invoked once -- use via AC_REQUIRE. 711# 712# This code is only required when automatic dependency tracking 713# is enabled. FIXME. This creates each `.P' file that we will 714# need in order to bootstrap the dependency handling code. 715AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 716[AC_CONFIG_COMMANDS([depfiles], 717 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 718 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 719]) 720 721# Check to see how 'make' treats includes. -*- Autoconf -*- 722 723# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 724 725# This program is free software; you can redistribute it and/or modify 726# it under the terms of the GNU General Public License as published by 727# the Free Software Foundation; either version 2, or (at your option) 728# any later version. 729 730# This program is distributed in the hope that it will be useful, 731# but WITHOUT ANY WARRANTY; without even the implied warranty of 732# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 733# GNU General Public License for more details. 734 735# You should have received a copy of the GNU General Public License 736# along with this program; if not, write to the Free Software 737# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 738# 02111-1307, USA. 739 740# serial 2 741 742# AM_MAKE_INCLUDE() 743# ----------------- 744# Check to see how make treats includes. 745AC_DEFUN([AM_MAKE_INCLUDE], 746[am_make=${MAKE-make} 747cat > confinc << 'END' 748am__doit: 749 @echo done 750.PHONY: am__doit 751END 752# If we don't find an include directive, just comment out the code. 753AC_MSG_CHECKING([for style of include used by $am_make]) 754am__include="#" 755am__quote= 756_am_result=none 757# First try GNU make style include. 758echo "include confinc" > confmf 759# We grep out `Entering directory' and `Leaving directory' 760# messages which can occur if `w' ends up in MAKEFLAGS. 761# In particular we don't look at `^make:' because GNU make might 762# be invoked under some other name (usually "gmake"), in which 763# case it prints its new name instead of `make'. 764if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 765 am__include=include 766 am__quote= 767 _am_result=GNU 768fi 769# Now try BSD make style include. 770if test "$am__include" = "#"; then 771 echo '.include "confinc"' > confmf 772 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 773 am__include=.include 774 am__quote="\"" 775 _am_result=BSD 776 fi 777fi 778AC_SUBST([am__include]) 779AC_SUBST([am__quote]) 780AC_MSG_RESULT([$_am_result]) 781rm -f confinc confmf 782]) 783 784# AM_CONDITIONAL -*- Autoconf -*- 785 786# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 787 788# This program is free software; you can redistribute it and/or modify 789# it under the terms of the GNU General Public License as published by 790# the Free Software Foundation; either version 2, or (at your option) 791# any later version. 792 793# This program is distributed in the hope that it will be useful, 794# but WITHOUT ANY WARRANTY; without even the implied warranty of 795# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 796# GNU General Public License for more details. 797 798# You should have received a copy of the GNU General Public License 799# along with this program; if not, write to the Free Software 800# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 801# 02111-1307, USA. 802 803# serial 5 804 805AC_PREREQ(2.52) 806 807# AM_CONDITIONAL(NAME, SHELL-CONDITION) 808# ------------------------------------- 809# Define a conditional. 810AC_DEFUN([AM_CONDITIONAL], 811[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 812 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 813AC_SUBST([$1_TRUE]) 814AC_SUBST([$1_FALSE]) 815if $2; then 816 $1_TRUE= 817 $1_FALSE='#' 818else 819 $1_TRUE='#' 820 $1_FALSE= 821fi 822AC_CONFIG_COMMANDS_PRE( 823[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 824 AC_MSG_ERROR([conditional "$1" was never defined. 825Usually this means the macro was only invoked conditionally.]) 826fi])]) 827 828# isc-posix.m4 serial 2 (gettext-0.11.2) 829dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 830dnl This file is free software, distributed under the terms of the GNU 831dnl General Public License. As a special exception to the GNU General 832dnl Public License, this file may be distributed as part of a program 833dnl that contains a configuration script generated by Autoconf, under 834dnl the same distribution terms as the rest of that program. 835 836# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. 837 838# This test replaces the one in autoconf. 839# Currently this macro should have the same name as the autoconf macro 840# because gettext's gettext.m4 (distributed in the automake package) 841# still uses it. Otherwise, the use in gettext.m4 makes autoheader 842# give these diagnostics: 843# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX 844# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX 845 846undefine([AC_ISC_POSIX]) 847 848AC_DEFUN([AC_ISC_POSIX], 849 [ 850 dnl This test replaces the obsolescent AC_ISC_POSIX kludge. 851 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) 852 ] 853) 854 855dnl 856dnl arch.m4 --- autoconf input file for gawk 857dnl 858dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. 859dnl 860dnl This file is part of GAWK, the GNU implementation of the 861dnl AWK Progamming Language. 862dnl 863dnl GAWK is free software; you can redistribute it and/or modify 864dnl it under the terms of the GNU General Public License as published by 865dnl the Free Software Foundation; either version 2 of the License, or 866dnl (at your option) any later version. 867dnl 868dnl GAWK is distributed in the hope that it will be useful, 869dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 870dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 871dnl GNU General Public License for more details. 872dnl 873dnl You should have received a copy of the GNU General Public License 874dnl along with this program; if not, write to the Free Software 875dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 876dnl 877 878dnl Check for AIX and add _XOPEN_SOURCE_EXTENDED 879AC_DEFUN(GAWK_AC_AIX_TWEAK, [ 880AC_MSG_CHECKING([for AIX compilation hacks]) 881AC_CACHE_VAL(gawk_cv_aix_hack, [ 882if test -d /lpp 883then 884 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" 885 gawk_cv_aix_hack=yes 886else 887 gawk_cv_aix_hack=no 888fi 889])dnl 890AC_MSG_RESULT([${gawk_cv_aix_hack}]) 891])dnl 892 893dnl Check for Alpha Linux systems 894AC_DEFUN(GAWK_AC_LINUX_ALPHA, [ 895AC_MSG_CHECKING([for Linux/Alpha compilation hacks]) 896AC_CACHE_VAL(gawk_cv_linux_alpha_hack, [ 897if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" 898then 899 # this isn't necessarily always true, 900 # the vendor's compiler is also often found 901 if test "$GCC" = yes 902 then 903 CFLAGS="$CFLAGS -mieee" 904 gawk_cv_linux_alpha_hack=yes 905 else 906 gawk_cv_linux_alpha_hack=no 907 fi 908else 909 gawk_cv_linux_alpha_hack=no 910fi 911])dnl 912AC_MSG_RESULT([${gawk_cv_linux_alpha_hack}]) 913])dnl 914 915 916# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 917 918# This program is free software; you can redistribute it and/or modify 919# it under the terms of the GNU General Public License as published by 920# the Free Software Foundation; either version 2, or (at your option) 921# any later version. 922 923# This program is distributed in the hope that it will be useful, 924# but WITHOUT ANY WARRANTY; without even the implied warranty of 925# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 926# GNU General Public License for more details. 927 928# You should have received a copy of the GNU General Public License 929# along with this program; if not, write to the Free Software 930# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 931# 02111-1307, USA. 932 933# serial 2 934 935# @defmac AC_PROG_CC_STDC 936# @maindex PROG_CC_STDC 937# @ovindex CC 938# If the C compiler in not in ANSI C mode by default, try to add an option 939# to output variable @code{CC} to make it so. This macro tries various 940# options that select ANSI C on some system or another. It considers the 941# compiler to be in ANSI C mode if it handles function prototypes correctly. 942# 943# If you use this macro, you should check after calling it whether the C 944# compiler has been set to accept ANSI C; if not, the shell variable 945# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source 946# code in ANSI C, you can make an un-ANSIfied copy of it by using the 947# program @code{ansi2knr}, which comes with Ghostscript. 948# @end defmac 949 950AC_DEFUN([AM_PROG_CC_STDC], 951[AC_REQUIRE([AC_PROG_CC]) 952AC_BEFORE([$0], [AC_C_INLINE]) 953AC_BEFORE([$0], [AC_C_CONST]) 954dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require 955dnl a magic option to avoid problems with ANSI preprocessor commands 956dnl like #elif. 957dnl FIXME: can't do this because then AC_AIX won't work due to a 958dnl circular dependency. 959dnl AC_BEFORE([$0], [AC_PROG_CPP]) 960AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C]) 961AC_CACHE_VAL(am_cv_prog_cc_stdc, 962[am_cv_prog_cc_stdc=no 963ac_save_CC="$CC" 964# Don't try gcc -ansi; that turns off useful extensions and 965# breaks some systems' header files. 966# AIX -qlanglvl=ansi 967# Ultrix and OSF/1 -std1 968# HP-UX 10.20 and later -Ae 969# HP-UX older versions -Aa -D_HPUX_SOURCE 970# SVR4 -Xc -D__EXTENSIONS__ 971for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 972do 973 CC="$ac_save_CC $ac_arg" 974 AC_TRY_COMPILE( 975[#include <stdarg.h> 976#include <stdio.h> 977#include <sys/types.h> 978#include <sys/stat.h> 979/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 980struct buf { int x; }; 981FILE * (*rcsopen) (struct buf *, struct stat *, int); 982static char *e (p, i) 983 char **p; 984 int i; 985{ 986 return p[i]; 987} 988static char *f (char * (*g) (char **, int), char **p, ...) 989{ 990 char *s; 991 va_list v; 992 va_start (v,p); 993 s = g (p, va_arg (v,int)); 994 va_end (v); 995 return s; 996} 997int test (int i, double x); 998struct s1 {int (*f) (int a);}; 999struct s2 {int (*f) (double a);}; 1000int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 1001int argc; 1002char **argv; 1003], [ 1004return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 1005], 1006[am_cv_prog_cc_stdc="$ac_arg"; break]) 1007done 1008CC="$ac_save_CC" 1009]) 1010if test -z "$am_cv_prog_cc_stdc"; then 1011 AC_MSG_RESULT([none needed]) 1012else 1013 AC_MSG_RESULT([$am_cv_prog_cc_stdc]) 1014fi 1015case "x$am_cv_prog_cc_stdc" in 1016 x|xno) ;; 1017 *) CC="$CC $am_cv_prog_cc_stdc" ;; 1018esac 1019]) 1020 1021AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC]) 1022 1023 1024# Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 1025 1026# This program is free software; you can redistribute it and/or modify 1027# it under the terms of the GNU General Public License as published by 1028# the Free Software Foundation; either version 2, or (at your option) 1029# any later version. 1030 1031# This program is distributed in the hope that it will be useful, 1032# but WITHOUT ANY WARRANTY; without even the implied warranty of 1033# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1034# GNU General Public License for more details. 1035 1036# You should have received a copy of the GNU General Public License 1037# along with this program; if not, write to the Free Software 1038# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1039# 02111-1307, USA. 1040 1041# serial 2 1042 1043AC_DEFUN([AM_C_PROTOTYPES], 1044[AC_REQUIRE([AM_PROG_CC_STDC]) 1045AC_REQUIRE([AC_PROG_CPP]) 1046AC_MSG_CHECKING([for function prototypes]) 1047if test "$am_cv_prog_cc_stdc" != no; then 1048 AC_MSG_RESULT(yes) 1049 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes]) 1050 U= ANSI2KNR= 1051else 1052 AC_MSG_RESULT(no) 1053 U=_ ANSI2KNR=./ansi2knr 1054fi 1055# Ensure some checks needed by ansi2knr itself. 1056AC_HEADER_STDC 1057AC_CHECK_HEADERS(string.h) 1058AC_SUBST(U)dnl 1059AC_SUBST(ANSI2KNR)dnl 1060]) 1061 1062AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) 1063 1064# gettext.m4 serial 20 (gettext-0.12) 1065dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. 1066dnl This file is free software, distributed under the terms of the GNU 1067dnl General Public License. As a special exception to the GNU General 1068dnl Public License, this file may be distributed as part of a program 1069dnl that contains a configuration script generated by Autoconf, under 1070dnl the same distribution terms as the rest of that program. 1071dnl 1072dnl This file can can be used in projects which are not available under 1073dnl the GNU General Public License or the GNU Library General Public 1074dnl License but which still want to provide support for the GNU gettext 1075dnl functionality. 1076dnl Please note that the actual code of the GNU gettext library is covered 1077dnl by the GNU Library General Public License, and the rest of the GNU 1078dnl gettext package package is covered by the GNU General Public License. 1079dnl They are *not* in the public domain. 1080 1081dnl Authors: 1082dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 1083dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 1084 1085dnl Macro to add for using GNU gettext. 1086 1087dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 1088dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 1089dnl default (if it is not specified or empty) is 'no-libtool'. 1090dnl INTLSYMBOL should be 'external' for packages with no intl directory, 1091dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. 1092dnl If INTLSYMBOL is 'use-libtool', then a libtool library 1093dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 1094dnl depending on --{enable,disable}-{shared,static} and on the presence of 1095dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 1096dnl $(top_builddir)/intl/libintl.a will be created. 1097dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 1098dnl implementations (in libc or libintl) without the ngettext() function 1099dnl will be ignored. If NEEDSYMBOL is specified and is 1100dnl 'need-formatstring-macros', then GNU gettext implementations that don't 1101dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 1102dnl INTLDIR is used to find the intl libraries. If empty, 1103dnl the value `$(top_builddir)/intl/' is used. 1104dnl 1105dnl The result of the configuration is one of three cases: 1106dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 1107dnl and used. 1108dnl Catalog format: GNU --> install in $(datadir) 1109dnl Catalog extension: .mo after installation, .gmo in source tree 1110dnl 2) GNU gettext has been found in the system's C library. 1111dnl Catalog format: GNU --> install in $(datadir) 1112dnl Catalog extension: .mo after installation, .gmo in source tree 1113dnl 3) No internationalization, always use English msgid. 1114dnl Catalog format: none 1115dnl Catalog extension: none 1116dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 1117dnl The use of .gmo is historical (it was needed to avoid overwriting the 1118dnl GNU format catalogs when building on a platform with an X/Open gettext), 1119dnl but we keep it in order not to force irrelevant filename changes on the 1120dnl maintainers. 1121dnl 1122AC_DEFUN([AM_GNU_GETTEXT], 1123[ 1124 dnl Argument checking. 1125 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 1126 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 1127])])])])]) 1128 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 1129 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 1130])])])]) 1131 define(gt_included_intl, ifelse([$1], [external], [no], [yes])) 1132 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) 1133 1134 AC_REQUIRE([AM_PO_SUBDIRS])dnl 1135 ifelse(gt_included_intl, yes, [ 1136 AC_REQUIRE([AM_INTL_SUBDIR])dnl 1137 ]) 1138 1139 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 1140 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1141 AC_REQUIRE([AC_LIB_RPATH]) 1142 1143 dnl Sometimes libintl requires libiconv, so first search for libiconv. 1144 dnl Ideally we would do this search only after the 1145 dnl if test "$USE_NLS" = "yes"; then 1146 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then 1147 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 1148 dnl the configure script would need to contain the same shell code 1149 dnl again, outside any 'if'. There are two solutions: 1150 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 1151 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 1152 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 1153 dnl documented, we avoid it. 1154 ifelse(gt_included_intl, yes, , [ 1155 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 1156 ]) 1157 1158 dnl Set USE_NLS. 1159 AM_NLS 1160 1161 ifelse(gt_included_intl, yes, [ 1162 BUILD_INCLUDED_LIBINTL=no 1163 USE_INCLUDED_LIBINTL=no 1164 ]) 1165 LIBINTL= 1166 LTLIBINTL= 1167 POSUB= 1168 1169 dnl If we use NLS figure out what method 1170 if test "$USE_NLS" = "yes"; then 1171 gt_use_preinstalled_gnugettext=no 1172 ifelse(gt_included_intl, yes, [ 1173 AC_MSG_CHECKING([whether included gettext is requested]) 1174 AC_ARG_WITH(included-gettext, 1175 [ --with-included-gettext use the GNU gettext library included here], 1176 nls_cv_force_use_gnu_gettext=$withval, 1177 nls_cv_force_use_gnu_gettext=no) 1178 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 1179 1180 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 1181 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 1182 ]) 1183 dnl User does not insist on using GNU NLS library. Figure out what 1184 dnl to use. If GNU gettext is available we use this. Else we have 1185 dnl to fall back to GNU NLS library. 1186 1187 dnl Add a version number to the cache macros. 1188 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) 1189 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) 1190 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) 1191 1192 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 1193 [AC_TRY_LINK([#include <libintl.h> 1194]ifelse([$2], [need-formatstring-macros], 1195[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 1196#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 1197#endif 1198changequote(,)dnl 1199typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 1200changequote([,])dnl 1201], [])[extern int _nl_msg_cat_cntr; 1202extern int *_nl_domain_bindings;], 1203 [bindtextdomain ("", ""); 1204return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], 1205 gt_cv_func_gnugettext_libc=yes, 1206 gt_cv_func_gnugettext_libc=no)]) 1207 1208 if test "$gt_cv_func_gnugettext_libc" != "yes"; then 1209 dnl Sometimes libintl requires libiconv, so first search for libiconv. 1210 ifelse(gt_included_intl, yes, , [ 1211 AM_ICONV_LINK 1212 ]) 1213 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 1214 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 1215 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 1216 dnl even if libiconv doesn't exist. 1217 AC_LIB_LINKFLAGS_BODY([intl]) 1218 AC_CACHE_CHECK([for GNU gettext in libintl], 1219 gt_cv_func_gnugettext_libintl, 1220 [gt_save_CPPFLAGS="$CPPFLAGS" 1221 CPPFLAGS="$CPPFLAGS $INCINTL" 1222 gt_save_LIBS="$LIBS" 1223 LIBS="$LIBS $LIBINTL" 1224 dnl Now see whether libintl exists and does not depend on libiconv. 1225 AC_TRY_LINK([#include <libintl.h> 1226]ifelse([$2], [need-formatstring-macros], 1227[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 1228#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 1229#endif 1230changequote(,)dnl 1231typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 1232changequote([,])dnl 1233], [])[extern int _nl_msg_cat_cntr; 1234extern 1235#ifdef __cplusplus 1236"C" 1237#endif 1238const char *_nl_expand_alias ();], 1239 [bindtextdomain ("", ""); 1240return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 1241 gt_cv_func_gnugettext_libintl=yes, 1242 gt_cv_func_gnugettext_libintl=no) 1243 dnl Now see whether libintl exists and depends on libiconv. 1244 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then 1245 LIBS="$LIBS $LIBICONV" 1246 AC_TRY_LINK([#include <libintl.h> 1247]ifelse([$2], [need-formatstring-macros], 1248[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 1249#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 1250#endif 1251changequote(,)dnl 1252typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 1253changequote([,])dnl 1254], [])[extern int _nl_msg_cat_cntr; 1255extern 1256#ifdef __cplusplus 1257"C" 1258#endif 1259const char *_nl_expand_alias ();], 1260 [bindtextdomain ("", ""); 1261return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 1262 [LIBINTL="$LIBINTL $LIBICONV" 1263 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 1264 gt_cv_func_gnugettext_libintl=yes 1265 ]) 1266 fi 1267 CPPFLAGS="$gt_save_CPPFLAGS" 1268 LIBS="$gt_save_LIBS"]) 1269 fi 1270 1271 dnl If an already present or preinstalled GNU gettext() is found, 1272 dnl use it. But if this macro is used in GNU gettext, and GNU 1273 dnl gettext is already preinstalled in libintl, we update this 1274 dnl libintl. (Cf. the install rule in intl/Makefile.in.) 1275 if test "$gt_cv_func_gnugettext_libc" = "yes" \ 1276 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 1277 && test "$PACKAGE" != gettext-runtime \ 1278 && test "$PACKAGE" != gettext-tools; }; then 1279 gt_use_preinstalled_gnugettext=yes 1280 else 1281 dnl Reset the values set by searching for libintl. 1282 LIBINTL= 1283 LTLIBINTL= 1284 INCINTL= 1285 fi 1286 1287 ifelse(gt_included_intl, yes, [ 1288 if test "$gt_use_preinstalled_gnugettext" != "yes"; then 1289 dnl GNU gettext is not found in the C library. 1290 dnl Fall back on included GNU gettext library. 1291 nls_cv_use_gnu_gettext=yes 1292 fi 1293 fi 1294 1295 if test "$nls_cv_use_gnu_gettext" = "yes"; then 1296 dnl Mark actions used to generate GNU NLS library. 1297 BUILD_INCLUDED_LIBINTL=yes 1298 USE_INCLUDED_LIBINTL=yes 1299 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" 1300 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" 1301 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 1302 fi 1303 1304 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 1305 || test "$nls_cv_use_gnu_gettext" = "yes"; then 1306 dnl Mark actions to use GNU gettext tools. 1307 CATOBJEXT=.gmo 1308 fi 1309 ]) 1310 1311 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 1312 || test "$nls_cv_use_gnu_gettext" = "yes"; then 1313 AC_DEFINE(ENABLE_NLS, 1, 1314 [Define to 1 if translation of program messages to the user's native language 1315 is requested.]) 1316 else 1317 USE_NLS=no 1318 fi 1319 fi 1320 1321 AC_MSG_CHECKING([whether to use NLS]) 1322 AC_MSG_RESULT([$USE_NLS]) 1323 if test "$USE_NLS" = "yes"; then 1324 AC_MSG_CHECKING([where the gettext function comes from]) 1325 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 1326 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 1327 gt_source="external libintl" 1328 else 1329 gt_source="libc" 1330 fi 1331 else 1332 gt_source="included intl directory" 1333 fi 1334 AC_MSG_RESULT([$gt_source]) 1335 fi 1336 1337 if test "$USE_NLS" = "yes"; then 1338 1339 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 1340 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 1341 AC_MSG_CHECKING([how to link with libintl]) 1342 AC_MSG_RESULT([$LIBINTL]) 1343 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 1344 fi 1345 1346 dnl For backward compatibility. Some packages may be using this. 1347 AC_DEFINE(HAVE_GETTEXT, 1, 1348 [Define if the GNU gettext() function is already present or preinstalled.]) 1349 AC_DEFINE(HAVE_DCGETTEXT, 1, 1350 [Define if the GNU dcgettext() function is already present or preinstalled.]) 1351 fi 1352 1353 dnl We need to process the po/ directory. 1354 POSUB=po 1355 fi 1356 1357 ifelse(gt_included_intl, yes, [ 1358 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 1359 dnl to 'yes' because some of the testsuite requires it. 1360 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 1361 BUILD_INCLUDED_LIBINTL=yes 1362 fi 1363 1364 dnl Make all variables we use known to autoconf. 1365 AC_SUBST(BUILD_INCLUDED_LIBINTL) 1366 AC_SUBST(USE_INCLUDED_LIBINTL) 1367 AC_SUBST(CATOBJEXT) 1368 1369 dnl For backward compatibility. Some configure.ins may be using this. 1370 nls_cv_header_intl= 1371 nls_cv_header_libgt= 1372 1373 dnl For backward compatibility. Some Makefiles may be using this. 1374 DATADIRNAME=share 1375 AC_SUBST(DATADIRNAME) 1376 1377 dnl For backward compatibility. Some Makefiles may be using this. 1378 INSTOBJEXT=.mo 1379 AC_SUBST(INSTOBJEXT) 1380 1381 dnl For backward compatibility. Some Makefiles may be using this. 1382 GENCAT=gencat 1383 AC_SUBST(GENCAT) 1384 1385 dnl For backward compatibility. Some Makefiles may be using this. 1386 if test "$USE_INCLUDED_LIBINTL" = yes; then 1387 INTLOBJS="\$(GETTOBJS)" 1388 fi 1389 AC_SUBST(INTLOBJS) 1390 1391 dnl Enable libtool support if the surrounding package wishes it. 1392 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 1393 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 1394 ]) 1395 1396 dnl For backward compatibility. Some Makefiles may be using this. 1397 INTLLIBS="$LIBINTL" 1398 AC_SUBST(INTLLIBS) 1399 1400 dnl Make all documented variables known to autoconf. 1401 AC_SUBST(LIBINTL) 1402 AC_SUBST(LTLIBINTL) 1403 AC_SUBST(POSUB) 1404]) 1405 1406 1407dnl Checks for all prerequisites of the intl subdirectory, 1408dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, 1409dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. 1410AC_DEFUN([AM_INTL_SUBDIR], 1411[ 1412 AC_REQUIRE([AC_PROG_INSTALL])dnl 1413 AC_REQUIRE([AM_MKINSTALLDIRS])dnl 1414 AC_REQUIRE([AC_PROG_CC])dnl 1415 AC_REQUIRE([AC_CANONICAL_HOST])dnl 1416 AC_REQUIRE([AC_PROG_RANLIB])dnl 1417 AC_REQUIRE([AC_ISC_POSIX])dnl 1418 AC_REQUIRE([AC_HEADER_STDC])dnl 1419 AC_REQUIRE([AC_C_CONST])dnl 1420 AC_REQUIRE([AC_C_INLINE])dnl 1421 AC_REQUIRE([AC_TYPE_OFF_T])dnl 1422 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 1423 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 1424 AC_REQUIRE([AC_FUNC_MMAP])dnl 1425 AC_REQUIRE([jm_GLIBC21])dnl 1426 AC_REQUIRE([gt_INTDIV0])dnl 1427 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl 1428 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl 1429 AC_REQUIRE([gt_INTTYPES_PRI])dnl 1430 1431 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 1432stdlib.h string.h unistd.h sys/param.h]) 1433 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ 1434geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ 1435strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ 1436__fsetlocking]) 1437 1438 AM_ICONV 1439 AM_LANGINFO_CODESET 1440 if test $ac_cv_header_locale_h = yes; then 1441 AM_LC_MESSAGES 1442 fi 1443 1444 dnl intl/plural.c is generated from intl/plural.y. It requires bison, 1445 dnl because plural.y uses bison specific features. It requires at least 1446 dnl bison-1.26 because earlier versions generate a plural.c that doesn't 1447 dnl compile. 1448 dnl bison is only needed for the maintainer (who touches plural.y). But in 1449 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 1450 dnl the rule in general Makefile. Now, some people carelessly touch the 1451 dnl files or have a broken "make" program, hence the plural.c rule will 1452 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 1453 dnl present or too old. 1454 AC_CHECK_PROGS([INTLBISON], [bison]) 1455 if test -z "$INTLBISON"; then 1456 ac_verc_fail=yes 1457 else 1458 dnl Found it, now check the version. 1459 AC_MSG_CHECKING([version of bison]) 1460changequote(<<,>>)dnl 1461 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` 1462 case $ac_prog_version in 1463 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1464 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 1465changequote([,])dnl 1466 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 1467 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 1468 esac 1469 AC_MSG_RESULT([$ac_prog_version]) 1470 fi 1471 if test $ac_verc_fail = yes; then 1472 INTLBISON=: 1473 fi 1474]) 1475 1476 1477dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 1478AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 1479 1480# po.m4 serial 1 (gettext-0.12) 1481dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. 1482dnl This file is free software, distributed under the terms of the GNU 1483dnl General Public License. As a special exception to the GNU General 1484dnl Public License, this file may be distributed as part of a program 1485dnl that contains a configuration script generated by Autoconf, under 1486dnl the same distribution terms as the rest of that program. 1487dnl 1488dnl This file can can be used in projects which are not available under 1489dnl the GNU General Public License or the GNU Library General Public 1490dnl License but which still want to provide support for the GNU gettext 1491dnl functionality. 1492dnl Please note that the actual code of the GNU gettext library is covered 1493dnl by the GNU Library General Public License, and the rest of the GNU 1494dnl gettext package package is covered by the GNU General Public License. 1495dnl They are *not* in the public domain. 1496 1497dnl Authors: 1498dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 1499dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 1500 1501dnl Checks for all prerequisites of the po subdirectory. 1502AC_DEFUN([AM_PO_SUBDIRS], 1503[ 1504 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1505 AC_REQUIRE([AC_PROG_INSTALL])dnl 1506 AC_REQUIRE([AM_MKINSTALLDIRS])dnl 1507 AC_REQUIRE([AM_NLS])dnl 1508 1509 dnl Perform the following tests also if --disable-nls has been given, 1510 dnl because they are needed for "make dist" to work. 1511 1512 dnl Search for GNU msgfmt in the PATH. 1513 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. 1514 dnl The second test excludes FreeBSD msgfmt. 1515 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 1516 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && 1517 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 1518 :) 1519 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 1520 1521 dnl Search for GNU xgettext 0.12 or newer in the PATH. 1522 dnl The first test excludes Solaris xgettext and early GNU xgettext versions. 1523 dnl The second test excludes FreeBSD xgettext. 1524 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 1525 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && 1526 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 1527 :) 1528 dnl Remove leftover from FreeBSD xgettext call. 1529 rm -f messages.po 1530 1531 dnl Search for GNU msgmerge 0.11 or newer in the PATH. 1532 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 1533 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) 1534 1535 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 1536 dnl Test whether we really found GNU msgfmt. 1537 if test "$GMSGFMT" != ":"; then 1538 dnl If it is no GNU msgfmt we define it as : so that the 1539 dnl Makefiles still can work. 1540 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && 1541 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 1542 : ; 1543 else 1544 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` 1545 AC_MSG_RESULT( 1546 [found $GMSGFMT program is not GNU msgfmt; ignore it]) 1547 GMSGFMT=":" 1548 fi 1549 fi 1550 1551 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 1552 dnl Test whether we really found GNU xgettext. 1553 if test "$XGETTEXT" != ":"; then 1554 dnl If it is no GNU xgettext we define it as : so that the 1555 dnl Makefiles still can work. 1556 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && 1557 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 1558 : ; 1559 else 1560 AC_MSG_RESULT( 1561 [found xgettext program is not GNU xgettext; ignore it]) 1562 XGETTEXT=":" 1563 fi 1564 dnl Remove leftover from FreeBSD xgettext call. 1565 rm -f messages.po 1566 fi 1567 1568 AC_OUTPUT_COMMANDS([ 1569 for ac_file in $CONFIG_FILES; do 1570 # Support "outfile[:infile[:infile...]]" 1571 case "$ac_file" in 1572 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 1573 esac 1574 # PO directories have a Makefile.in generated from Makefile.in.in. 1575 case "$ac_file" in */Makefile.in) 1576 # Adjust a relative srcdir. 1577 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 1578 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 1579 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 1580 # In autoconf-2.13 it is called $ac_given_srcdir. 1581 # In autoconf-2.50 it is called $srcdir. 1582 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 1583 case "$ac_given_srcdir" in 1584 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 1585 /*) top_srcdir="$ac_given_srcdir" ;; 1586 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 1587 esac 1588 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 1589 rm -f "$ac_dir/POTFILES" 1590 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 1591 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 1592 POMAKEFILEDEPS="POTFILES.in" 1593 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend 1594 # on $ac_dir but don't depend on user-specified configuration 1595 # parameters. 1596 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 1597 # The LINGUAS file contains the set of available languages. 1598 if test -n "$OBSOLETE_ALL_LINGUAS"; then 1599 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 1600 fi 1601 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` 1602 # Hide the ALL_LINGUAS assigment from automake. 1603 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 1604 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 1605 else 1606 # The set of available languages was given in configure.in. 1607 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 1608 fi 1609 case "$ac_given_srcdir" in 1610 .) srcdirpre= ;; 1611 *) srcdirpre='$(srcdir)/' ;; 1612 esac 1613 POFILES= 1614 GMOFILES= 1615 UPDATEPOFILES= 1616 DUMMYPOFILES= 1617 for lang in $ALL_LINGUAS; do 1618 POFILES="$POFILES $srcdirpre$lang.po" 1619 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 1620 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 1621 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 1622 done 1623 # CATALOGS depends on both $ac_dir and the user's LINGUAS 1624 # environment variable. 1625 INST_LINGUAS= 1626 if test -n "$ALL_LINGUAS"; then 1627 for presentlang in $ALL_LINGUAS; do 1628 useit=no 1629 if test "%UNSET%" != "$LINGUAS"; then 1630 desiredlanguages="$LINGUAS" 1631 else 1632 desiredlanguages="$ALL_LINGUAS" 1633 fi 1634 for desiredlang in $desiredlanguages; do 1635 # Use the presentlang catalog if desiredlang is 1636 # a. equal to presentlang, or 1637 # b. a variant of presentlang (because in this case, 1638 # presentlang can be used as a fallback for messages 1639 # which are not translated in the desiredlang catalog). 1640 case "$desiredlang" in 1641 "$presentlang"*) useit=yes;; 1642 esac 1643 done 1644 if test $useit = yes; then 1645 INST_LINGUAS="$INST_LINGUAS $presentlang" 1646 fi 1647 done 1648 fi 1649 CATALOGS= 1650 if test -n "$INST_LINGUAS"; then 1651 for lang in $INST_LINGUAS; do 1652 CATALOGS="$CATALOGS $lang.gmo" 1653 done 1654 fi 1655 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 1656 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 1657 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 1658 if test -f "$f"; then 1659 case "$f" in 1660 *.orig | *.bak | *~) ;; 1661 *) cat "$f" >> "$ac_dir/Makefile" ;; 1662 esac 1663 fi 1664 done 1665 fi 1666 ;; 1667 esac 1668 done], 1669 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 1670 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it 1671 # from automake. 1672 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' 1673 # Capture the value of LINGUAS because we need it to compute CATALOGS. 1674 LINGUAS="${LINGUAS-%UNSET%}" 1675 ]) 1676]) 1677 1678# nls.m4 serial 1 (gettext-0.12) 1679dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. 1680dnl This file is free software, distributed under the terms of the GNU 1681dnl General Public License. As a special exception to the GNU General 1682dnl Public License, this file may be distributed as part of a program 1683dnl that contains a configuration script generated by Autoconf, under 1684dnl the same distribution terms as the rest of that program. 1685dnl 1686dnl This file can can be used in projects which are not available under 1687dnl the GNU General Public License or the GNU Library General Public 1688dnl License but which still want to provide support for the GNU gettext 1689dnl functionality. 1690dnl Please note that the actual code of the GNU gettext library is covered 1691dnl by the GNU Library General Public License, and the rest of the GNU 1692dnl gettext package package is covered by the GNU General Public License. 1693dnl They are *not* in the public domain. 1694 1695dnl Authors: 1696dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 1697dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 1698 1699AC_DEFUN([AM_NLS], 1700[ 1701 AC_MSG_CHECKING([whether NLS is requested]) 1702 dnl Default is enabled NLS 1703 AC_ARG_ENABLE(nls, 1704 [ --disable-nls do not use Native Language Support], 1705 USE_NLS=$enableval, USE_NLS=yes) 1706 AC_MSG_RESULT($USE_NLS) 1707 AC_SUBST(USE_NLS) 1708]) 1709 1710AC_DEFUN([AM_MKINSTALLDIRS], 1711[ 1712 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 1713 dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 1714 dnl Try to locate it. 1715 MKINSTALLDIRS= 1716 if test -n "$ac_aux_dir"; then 1717 case "$ac_aux_dir" in 1718 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; 1719 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; 1720 esac 1721 fi 1722 if test -z "$MKINSTALLDIRS"; then 1723 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 1724 fi 1725 AC_SUBST(MKINSTALLDIRS) 1726]) 1727 1728# progtest.m4 serial 3 (gettext-0.12) 1729dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 1730dnl This file is free software, distributed under the terms of the GNU 1731dnl General Public License. As a special exception to the GNU General 1732dnl Public License, this file may be distributed as part of a program 1733dnl that contains a configuration script generated by Autoconf, under 1734dnl the same distribution terms as the rest of that program. 1735dnl 1736dnl This file can can be used in projects which are not available under 1737dnl the GNU General Public License or the GNU Library General Public 1738dnl License but which still want to provide support for the GNU gettext 1739dnl functionality. 1740dnl Please note that the actual code of the GNU gettext library is covered 1741dnl by the GNU Library General Public License, and the rest of the GNU 1742dnl gettext package package is covered by the GNU General Public License. 1743dnl They are *not* in the public domain. 1744 1745dnl Authors: 1746dnl Ulrich Drepper <drepper@cygnus.com>, 1996. 1747 1748# Search path for a program which passes the given test. 1749 1750dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 1751dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 1752AC_DEFUN([AM_PATH_PROG_WITH_TEST], 1753[ 1754# Prepare PATH_SEPARATOR. 1755# The user is always right. 1756if test "${PATH_SEPARATOR+set}" != set; then 1757 echo "#! /bin/sh" >conf$$.sh 1758 echo "exit 0" >>conf$$.sh 1759 chmod +x conf$$.sh 1760 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 1761 PATH_SEPARATOR=';' 1762 else 1763 PATH_SEPARATOR=: 1764 fi 1765 rm -f conf$$.sh 1766fi 1767 1768# Find out how to test for executable files. Don't use a zero-byte file, 1769# as systems may use methods other than mode bits to determine executability. 1770cat >conf$$.file <<_ASEOF 1771#! /bin/sh 1772exit 0 1773_ASEOF 1774chmod +x conf$$.file 1775if test -x conf$$.file >/dev/null 2>&1; then 1776 ac_executable_p="test -x" 1777else 1778 ac_executable_p="test -f" 1779fi 1780rm -f conf$$.file 1781 1782# Extract the first word of "$2", so it can be a program name with args. 1783set dummy $2; ac_word=[$]2 1784AC_MSG_CHECKING([for $ac_word]) 1785AC_CACHE_VAL(ac_cv_path_$1, 1786[case "[$]$1" in 1787 [[\\/]]* | ?:[[\\/]]*) 1788 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 1789 ;; 1790 *) 1791 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 1792 for ac_dir in ifelse([$5], , $PATH, [$5]); do 1793 IFS="$ac_save_IFS" 1794 test -z "$ac_dir" && ac_dir=. 1795 for ac_exec_ext in '' $ac_executable_extensions; do 1796 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 1797 if [$3]; then 1798 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 1799 break 2 1800 fi 1801 fi 1802 done 1803 done 1804 IFS="$ac_save_IFS" 1805dnl If no 4th arg is given, leave the cache variable unset, 1806dnl so AC_PATH_PROGS will keep looking. 1807ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 1808])dnl 1809 ;; 1810esac])dnl 1811$1="$ac_cv_path_$1" 1812if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 1813 AC_MSG_RESULT([$]$1) 1814else 1815 AC_MSG_RESULT(no) 1816fi 1817AC_SUBST($1)dnl 1818]) 1819 1820# lib-prefix.m4 serial 2 (gettext-0.12) 1821dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 1822dnl This file is free software, distributed under the terms of the GNU 1823dnl General Public License. As a special exception to the GNU General 1824dnl Public License, this file may be distributed as part of a program 1825dnl that contains a configuration script generated by Autoconf, under 1826dnl the same distribution terms as the rest of that program. 1827 1828dnl From Bruno Haible. 1829 1830dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 1831dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 1832dnl require excessive bracketing. 1833ifdef([AC_HELP_STRING], 1834[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 1835[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 1836 1837dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 1838dnl to access previously installed libraries. The basic assumption is that 1839dnl a user will want packages to use other packages he previously installed 1840dnl with the same --prefix option. 1841dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 1842dnl libraries, but is otherwise very convenient. 1843AC_DEFUN([AC_LIB_PREFIX], 1844[ 1845 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 1846 AC_REQUIRE([AC_PROG_CC]) 1847 AC_REQUIRE([AC_CANONICAL_HOST]) 1848 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1849 dnl By default, look in $includedir and $libdir. 1850 use_additional=yes 1851 AC_LIB_WITH_FINAL_PREFIX([ 1852 eval additional_includedir=\"$includedir\" 1853 eval additional_libdir=\"$libdir\" 1854 ]) 1855 AC_LIB_ARG_WITH([lib-prefix], 1856[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 1857 --without-lib-prefix don't search for libraries in includedir and libdir], 1858[ 1859 if test "X$withval" = "Xno"; then 1860 use_additional=no 1861 else 1862 if test "X$withval" = "X"; then 1863 AC_LIB_WITH_FINAL_PREFIX([ 1864 eval additional_includedir=\"$includedir\" 1865 eval additional_libdir=\"$libdir\" 1866 ]) 1867 else 1868 additional_includedir="$withval/include" 1869 additional_libdir="$withval/lib" 1870 fi 1871 fi 1872]) 1873 if test $use_additional = yes; then 1874 dnl Potentially add $additional_includedir to $CPPFLAGS. 1875 dnl But don't add it 1876 dnl 1. if it's the standard /usr/include, 1877 dnl 2. if it's already present in $CPPFLAGS, 1878 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 1879 dnl 4. if it doesn't exist as a directory. 1880 if test "X$additional_includedir" != "X/usr/include"; then 1881 haveit= 1882 for x in $CPPFLAGS; do 1883 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1884 if test "X$x" = "X-I$additional_includedir"; then 1885 haveit=yes 1886 break 1887 fi 1888 done 1889 if test -z "$haveit"; then 1890 if test "X$additional_includedir" = "X/usr/local/include"; then 1891 if test -n "$GCC"; then 1892 case $host_os in 1893 linux*) haveit=yes;; 1894 esac 1895 fi 1896 fi 1897 if test -z "$haveit"; then 1898 if test -d "$additional_includedir"; then 1899 dnl Really add $additional_includedir to $CPPFLAGS. 1900 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 1901 fi 1902 fi 1903 fi 1904 fi 1905 dnl Potentially add $additional_libdir to $LDFLAGS. 1906 dnl But don't add it 1907 dnl 1. if it's the standard /usr/lib, 1908 dnl 2. if it's already present in $LDFLAGS, 1909 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 1910 dnl 4. if it doesn't exist as a directory. 1911 if test "X$additional_libdir" != "X/usr/lib"; then 1912 haveit= 1913 for x in $LDFLAGS; do 1914 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1915 if test "X$x" = "X-L$additional_libdir"; then 1916 haveit=yes 1917 break 1918 fi 1919 done 1920 if test -z "$haveit"; then 1921 if test "X$additional_libdir" = "X/usr/local/lib"; then 1922 if test -n "$GCC"; then 1923 case $host_os in 1924 linux*) haveit=yes;; 1925 esac 1926 fi 1927 fi 1928 if test -z "$haveit"; then 1929 if test -d "$additional_libdir"; then 1930 dnl Really add $additional_libdir to $LDFLAGS. 1931 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 1932 fi 1933 fi 1934 fi 1935 fi 1936 fi 1937]) 1938 1939dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 1940dnl acl_final_exec_prefix, containing the values to which $prefix and 1941dnl $exec_prefix will expand at the end of the configure script. 1942AC_DEFUN([AC_LIB_PREPARE_PREFIX], 1943[ 1944 dnl Unfortunately, prefix and exec_prefix get only finally determined 1945 dnl at the end of configure. 1946 if test "X$prefix" = "XNONE"; then 1947 acl_final_prefix="$ac_default_prefix" 1948 else 1949 acl_final_prefix="$prefix" 1950 fi 1951 if test "X$exec_prefix" = "XNONE"; then 1952 acl_final_exec_prefix='${prefix}' 1953 else 1954 acl_final_exec_prefix="$exec_prefix" 1955 fi 1956 acl_save_prefix="$prefix" 1957 prefix="$acl_final_prefix" 1958 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 1959 prefix="$acl_save_prefix" 1960]) 1961 1962dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 1963dnl variables prefix and exec_prefix bound to the values they will have 1964dnl at the end of the configure script. 1965AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 1966[ 1967 acl_save_prefix="$prefix" 1968 prefix="$acl_final_prefix" 1969 acl_save_exec_prefix="$exec_prefix" 1970 exec_prefix="$acl_final_exec_prefix" 1971 $1 1972 exec_prefix="$acl_save_exec_prefix" 1973 prefix="$acl_save_prefix" 1974]) 1975 1976# lib-link.m4 serial 4 (gettext-0.12) 1977dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 1978dnl This file is free software, distributed under the terms of the GNU 1979dnl General Public License. As a special exception to the GNU General 1980dnl Public License, this file may be distributed as part of a program 1981dnl that contains a configuration script generated by Autoconf, under 1982dnl the same distribution terms as the rest of that program. 1983 1984dnl From Bruno Haible. 1985 1986dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 1987dnl the libraries corresponding to explicit and implicit dependencies. 1988dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 1989dnl augments the CPPFLAGS variable. 1990AC_DEFUN([AC_LIB_LINKFLAGS], 1991[ 1992 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1993 AC_REQUIRE([AC_LIB_RPATH]) 1994 define([Name],[translit([$1],[./-], [___])]) 1995 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 1996 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 1997 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 1998 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 1999 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 2000 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 2001 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 2002 ]) 2003 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 2004 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 2005 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 2006 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 2007 AC_SUBST([LIB]NAME) 2008 AC_SUBST([LTLIB]NAME) 2009 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 2010 dnl results of this search when this library appears as a dependency. 2011 HAVE_LIB[]NAME=yes 2012 undefine([Name]) 2013 undefine([NAME]) 2014]) 2015 2016dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 2017dnl searches for libname and the libraries corresponding to explicit and 2018dnl implicit dependencies, together with the specified include files and 2019dnl the ability to compile and link the specified testcode. If found, it 2020dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 2021dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 2022dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 2023dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 2024AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 2025[ 2026 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 2027 AC_REQUIRE([AC_LIB_RPATH]) 2028 define([Name],[translit([$1],[./-], [___])]) 2029 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 2030 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 2031 2032 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 2033 dnl accordingly. 2034 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 2035 2036 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 2037 dnl because if the user has installed lib[]Name and not disabled its use 2038 dnl via --without-lib[]Name-prefix, he wants to use it. 2039 ac_save_CPPFLAGS="$CPPFLAGS" 2040 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 2041 2042 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 2043 ac_save_LIBS="$LIBS" 2044 LIBS="$LIBS $LIB[]NAME" 2045 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 2046 LIBS="$ac_save_LIBS" 2047 ]) 2048 if test "$ac_cv_lib[]Name" = yes; then 2049 HAVE_LIB[]NAME=yes 2050 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 2051 AC_MSG_CHECKING([how to link with lib[]$1]) 2052 AC_MSG_RESULT([$LIB[]NAME]) 2053 else 2054 HAVE_LIB[]NAME=no 2055 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 2056 dnl $INC[]NAME either. 2057 CPPFLAGS="$ac_save_CPPFLAGS" 2058 LIB[]NAME= 2059 LTLIB[]NAME= 2060 fi 2061 AC_SUBST([HAVE_LIB]NAME) 2062 AC_SUBST([LIB]NAME) 2063 AC_SUBST([LTLIB]NAME) 2064 undefine([Name]) 2065 undefine([NAME]) 2066]) 2067 2068dnl Determine the platform dependent parameters needed to use rpath: 2069dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 2070dnl hardcode_direct, hardcode_minus_L. 2071AC_DEFUN([AC_LIB_RPATH], 2072[ 2073 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 2074 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 2075 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 2076 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 2077 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 2078 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 2079 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 2080 . ./conftest.sh 2081 rm -f ./conftest.sh 2082 acl_cv_rpath=done 2083 ]) 2084 wl="$acl_cv_wl" 2085 libext="$acl_cv_libext" 2086 shlibext="$acl_cv_shlibext" 2087 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 2088 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 2089 hardcode_direct="$acl_cv_hardcode_direct" 2090 hardcode_minus_L="$acl_cv_hardcode_minus_L" 2091 dnl Determine whether the user wants rpath handling at all. 2092 AC_ARG_ENABLE(rpath, 2093 [ --disable-rpath do not hardcode runtime library paths], 2094 :, enable_rpath=yes) 2095]) 2096 2097dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 2098dnl the libraries corresponding to explicit and implicit dependencies. 2099dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 2100AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 2101[ 2102 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 2103 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 2104 dnl By default, look in $includedir and $libdir. 2105 use_additional=yes 2106 AC_LIB_WITH_FINAL_PREFIX([ 2107 eval additional_includedir=\"$includedir\" 2108 eval additional_libdir=\"$libdir\" 2109 ]) 2110 AC_LIB_ARG_WITH([lib$1-prefix], 2111[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 2112 --without-lib$1-prefix don't search for lib$1 in includedir and libdir], 2113[ 2114 if test "X$withval" = "Xno"; then 2115 use_additional=no 2116 else 2117 if test "X$withval" = "X"; then 2118 AC_LIB_WITH_FINAL_PREFIX([ 2119 eval additional_includedir=\"$includedir\" 2120 eval additional_libdir=\"$libdir\" 2121 ]) 2122 else 2123 additional_includedir="$withval/include" 2124 additional_libdir="$withval/lib" 2125 fi 2126 fi 2127]) 2128 dnl Search the library and its dependencies in $additional_libdir and 2129 dnl $LDFLAGS. Using breadth-first-seach. 2130 LIB[]NAME= 2131 LTLIB[]NAME= 2132 INC[]NAME= 2133 rpathdirs= 2134 ltrpathdirs= 2135 names_already_handled= 2136 names_next_round='$1 $2' 2137 while test -n "$names_next_round"; do 2138 names_this_round="$names_next_round" 2139 names_next_round= 2140 for name in $names_this_round; do 2141 already_handled= 2142 for n in $names_already_handled; do 2143 if test "$n" = "$name"; then 2144 already_handled=yes 2145 break 2146 fi 2147 done 2148 if test -z "$already_handled"; then 2149 names_already_handled="$names_already_handled $name" 2150 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 2151 dnl or AC_LIB_HAVE_LINKFLAGS call. 2152 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 2153 eval value=\"\$HAVE_LIB$uppername\" 2154 if test -n "$value"; then 2155 if test "$value" = yes; then 2156 eval value=\"\$LIB$uppername\" 2157 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 2158 eval value=\"\$LTLIB$uppername\" 2159 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 2160 else 2161 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 2162 dnl that this library doesn't exist. So just drop it. 2163 : 2164 fi 2165 else 2166 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 2167 dnl and the already constructed $LIBNAME/$LTLIBNAME. 2168 found_dir= 2169 found_la= 2170 found_so= 2171 found_a= 2172 if test $use_additional = yes; then 2173 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then 2174 found_dir="$additional_libdir" 2175 found_so="$additional_libdir/lib$name.$shlibext" 2176 if test -f "$additional_libdir/lib$name.la"; then 2177 found_la="$additional_libdir/lib$name.la" 2178 fi 2179 else 2180 if test -f "$additional_libdir/lib$name.$libext"; then 2181 found_dir="$additional_libdir" 2182 found_a="$additional_libdir/lib$name.$libext" 2183 if test -f "$additional_libdir/lib$name.la"; then 2184 found_la="$additional_libdir/lib$name.la" 2185 fi 2186 fi 2187 fi 2188 fi 2189 if test "X$found_dir" = "X"; then 2190 for x in $LDFLAGS $LTLIB[]NAME; do 2191 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2192 case "$x" in 2193 -L*) 2194 dir=`echo "X$x" | sed -e 's/^X-L//'` 2195 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then 2196 found_dir="$dir" 2197 found_so="$dir/lib$name.$shlibext" 2198 if test -f "$dir/lib$name.la"; then 2199 found_la="$dir/lib$name.la" 2200 fi 2201 else 2202 if test -f "$dir/lib$name.$libext"; then 2203 found_dir="$dir" 2204 found_a="$dir/lib$name.$libext" 2205 if test -f "$dir/lib$name.la"; then 2206 found_la="$dir/lib$name.la" 2207 fi 2208 fi 2209 fi 2210 ;; 2211 esac 2212 if test "X$found_dir" != "X"; then 2213 break 2214 fi 2215 done 2216 fi 2217 if test "X$found_dir" != "X"; then 2218 dnl Found the library. 2219 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 2220 if test "X$found_so" != "X"; then 2221 dnl Linking with a shared library. We attempt to hardcode its 2222 dnl directory into the executable's runpath, unless it's the 2223 dnl standard /usr/lib. 2224 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 2225 dnl No hardcoding is needed. 2226 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 2227 else 2228 dnl Use an explicit option to hardcode DIR into the resulting 2229 dnl binary. 2230 dnl Potentially add DIR to ltrpathdirs. 2231 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 2232 haveit= 2233 for x in $ltrpathdirs; do 2234 if test "X$x" = "X$found_dir"; then 2235 haveit=yes 2236 break 2237 fi 2238 done 2239 if test -z "$haveit"; then 2240 ltrpathdirs="$ltrpathdirs $found_dir" 2241 fi 2242 dnl The hardcoding into $LIBNAME is system dependent. 2243 if test "$hardcode_direct" = yes; then 2244 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 2245 dnl resulting binary. 2246 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 2247 else 2248 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 2249 dnl Use an explicit option to hardcode DIR into the resulting 2250 dnl binary. 2251 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 2252 dnl Potentially add DIR to rpathdirs. 2253 dnl The rpathdirs will be appended to $LIBNAME at the end. 2254 haveit= 2255 for x in $rpathdirs; do 2256 if test "X$x" = "X$found_dir"; then 2257 haveit=yes 2258 break 2259 fi 2260 done 2261 if test -z "$haveit"; then 2262 rpathdirs="$rpathdirs $found_dir" 2263 fi 2264 else 2265 dnl Rely on "-L$found_dir". 2266 dnl But don't add it if it's already contained in the LDFLAGS 2267 dnl or the already constructed $LIBNAME 2268 haveit= 2269 for x in $LDFLAGS $LIB[]NAME; do 2270 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2271 if test "X$x" = "X-L$found_dir"; then 2272 haveit=yes 2273 break 2274 fi 2275 done 2276 if test -z "$haveit"; then 2277 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 2278 fi 2279 if test "$hardcode_minus_L" != no; then 2280 dnl FIXME: Not sure whether we should use 2281 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 2282 dnl here. 2283 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 2284 else 2285 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 2286 dnl here, because this doesn't fit in flags passed to the 2287 dnl compiler. So give up. No hardcoding. This affects only 2288 dnl very old systems. 2289 dnl FIXME: Not sure whether we should use 2290 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 2291 dnl here. 2292 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 2293 fi 2294 fi 2295 fi 2296 fi 2297 else 2298 if test "X$found_a" != "X"; then 2299 dnl Linking with a static library. 2300 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 2301 else 2302 dnl We shouldn't come here, but anyway it's good to have a 2303 dnl fallback. 2304 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 2305 fi 2306 fi 2307 dnl Assume the include files are nearby. 2308 additional_includedir= 2309 case "$found_dir" in 2310 */lib | */lib/) 2311 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 2312 additional_includedir="$basedir/include" 2313 ;; 2314 esac 2315 if test "X$additional_includedir" != "X"; then 2316 dnl Potentially add $additional_includedir to $INCNAME. 2317 dnl But don't add it 2318 dnl 1. if it's the standard /usr/include, 2319 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 2320 dnl 3. if it's already present in $CPPFLAGS or the already 2321 dnl constructed $INCNAME, 2322 dnl 4. if it doesn't exist as a directory. 2323 if test "X$additional_includedir" != "X/usr/include"; then 2324 haveit= 2325 if test "X$additional_includedir" = "X/usr/local/include"; then 2326 if test -n "$GCC"; then 2327 case $host_os in 2328 linux*) haveit=yes;; 2329 esac 2330 fi 2331 fi 2332 if test -z "$haveit"; then 2333 for x in $CPPFLAGS $INC[]NAME; do 2334 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2335 if test "X$x" = "X-I$additional_includedir"; then 2336 haveit=yes 2337 break 2338 fi 2339 done 2340 if test -z "$haveit"; then 2341 if test -d "$additional_includedir"; then 2342 dnl Really add $additional_includedir to $INCNAME. 2343 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 2344 fi 2345 fi 2346 fi 2347 fi 2348 fi 2349 dnl Look for dependencies. 2350 if test -n "$found_la"; then 2351 dnl Read the .la file. It defines the variables 2352 dnl dlname, library_names, old_library, dependency_libs, current, 2353 dnl age, revision, installed, dlopen, dlpreopen, libdir. 2354 save_libdir="$libdir" 2355 case "$found_la" in 2356 */* | *\\*) . "$found_la" ;; 2357 *) . "./$found_la" ;; 2358 esac 2359 libdir="$save_libdir" 2360 dnl We use only dependency_libs. 2361 for dep in $dependency_libs; do 2362 case "$dep" in 2363 -L*) 2364 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 2365 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 2366 dnl But don't add it 2367 dnl 1. if it's the standard /usr/lib, 2368 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 2369 dnl 3. if it's already present in $LDFLAGS or the already 2370 dnl constructed $LIBNAME, 2371 dnl 4. if it doesn't exist as a directory. 2372 if test "X$additional_libdir" != "X/usr/lib"; then 2373 haveit= 2374 if test "X$additional_libdir" = "X/usr/local/lib"; then 2375 if test -n "$GCC"; then 2376 case $host_os in 2377 linux*) haveit=yes;; 2378 esac 2379 fi 2380 fi 2381 if test -z "$haveit"; then 2382 haveit= 2383 for x in $LDFLAGS $LIB[]NAME; do 2384 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2385 if test "X$x" = "X-L$additional_libdir"; then 2386 haveit=yes 2387 break 2388 fi 2389 done 2390 if test -z "$haveit"; then 2391 if test -d "$additional_libdir"; then 2392 dnl Really add $additional_libdir to $LIBNAME. 2393 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 2394 fi 2395 fi 2396 haveit= 2397 for x in $LDFLAGS $LTLIB[]NAME; do 2398 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2399 if test "X$x" = "X-L$additional_libdir"; then 2400 haveit=yes 2401 break 2402 fi 2403 done 2404 if test -z "$haveit"; then 2405 if test -d "$additional_libdir"; then 2406 dnl Really add $additional_libdir to $LTLIBNAME. 2407 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 2408 fi 2409 fi 2410 fi 2411 fi 2412 ;; 2413 -R*) 2414 dir=`echo "X$dep" | sed -e 's/^X-R//'` 2415 if test "$enable_rpath" != no; then 2416 dnl Potentially add DIR to rpathdirs. 2417 dnl The rpathdirs will be appended to $LIBNAME at the end. 2418 haveit= 2419 for x in $rpathdirs; do 2420 if test "X$x" = "X$dir"; then 2421 haveit=yes 2422 break 2423 fi 2424 done 2425 if test -z "$haveit"; then 2426 rpathdirs="$rpathdirs $dir" 2427 fi 2428 dnl Potentially add DIR to ltrpathdirs. 2429 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 2430 haveit= 2431 for x in $ltrpathdirs; do 2432 if test "X$x" = "X$dir"; then 2433 haveit=yes 2434 break 2435 fi 2436 done 2437 if test -z "$haveit"; then 2438 ltrpathdirs="$ltrpathdirs $dir" 2439 fi 2440 fi 2441 ;; 2442 -l*) 2443 dnl Handle this in the next round. 2444 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 2445 ;; 2446 *.la) 2447 dnl Handle this in the next round. Throw away the .la's 2448 dnl directory; it is already contained in a preceding -L 2449 dnl option. 2450 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 2451 ;; 2452 *) 2453 dnl Most likely an immediate library name. 2454 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 2455 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 2456 ;; 2457 esac 2458 done 2459 fi 2460 else 2461 dnl Didn't find the library; assume it is in the system directories 2462 dnl known to the linker and runtime loader. (All the system 2463 dnl directories known to the linker should also be known to the 2464 dnl runtime loader, otherwise the system is severely misconfigured.) 2465 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 2466 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 2467 fi 2468 fi 2469 fi 2470 done 2471 done 2472 if test "X$rpathdirs" != "X"; then 2473 if test -n "$hardcode_libdir_separator"; then 2474 dnl Weird platform: only the last -rpath option counts, the user must 2475 dnl pass all path elements in one option. We can arrange that for a 2476 dnl single library, but not when more than one $LIBNAMEs are used. 2477 alldirs= 2478 for found_dir in $rpathdirs; do 2479 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 2480 done 2481 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 2482 acl_save_libdir="$libdir" 2483 libdir="$alldirs" 2484 eval flag=\"$hardcode_libdir_flag_spec\" 2485 libdir="$acl_save_libdir" 2486 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 2487 else 2488 dnl The -rpath options are cumulative. 2489 for found_dir in $rpathdirs; do 2490 acl_save_libdir="$libdir" 2491 libdir="$found_dir" 2492 eval flag=\"$hardcode_libdir_flag_spec\" 2493 libdir="$acl_save_libdir" 2494 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 2495 done 2496 fi 2497 fi 2498 if test "X$ltrpathdirs" != "X"; then 2499 dnl When using libtool, the option that works for both libraries and 2500 dnl executables is -R. The -R options are cumulative. 2501 for found_dir in $ltrpathdirs; do 2502 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 2503 done 2504 fi 2505]) 2506 2507dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 2508dnl unless already present in VAR. 2509dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 2510dnl contains two or three consecutive elements that belong together. 2511AC_DEFUN([AC_LIB_APPENDTOVAR], 2512[ 2513 for element in [$2]; do 2514 haveit= 2515 for x in $[$1]; do 2516 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 2517 if test "X$x" = "X$element"; then 2518 haveit=yes 2519 break 2520 fi 2521 done 2522 if test -z "$haveit"; then 2523 [$1]="${[$1]}${[$1]:+ }$element" 2524 fi 2525 done 2526]) 2527 2528# lib-ld.m4 serial 2 (gettext-0.12) 2529dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 2530dnl This file is free software, distributed under the terms of the GNU 2531dnl General Public License. As a special exception to the GNU General 2532dnl Public License, this file may be distributed as part of a program 2533dnl that contains a configuration script generated by Autoconf, under 2534dnl the same distribution terms as the rest of that program. 2535 2536dnl Subroutines of libtool.m4, 2537dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 2538dnl with libtool.m4. 2539 2540dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 2541AC_DEFUN([AC_LIB_PROG_LD_GNU], 2542[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 2543[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 2544if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 2545 acl_cv_prog_gnu_ld=yes 2546else 2547 acl_cv_prog_gnu_ld=no 2548fi]) 2549with_gnu_ld=$acl_cv_prog_gnu_ld 2550]) 2551 2552dnl From libtool-1.4. Sets the variable LD. 2553AC_DEFUN([AC_LIB_PROG_LD], 2554[AC_ARG_WITH(gnu-ld, 2555[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 2556test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 2557AC_REQUIRE([AC_PROG_CC])dnl 2558AC_REQUIRE([AC_CANONICAL_HOST])dnl 2559# Prepare PATH_SEPARATOR. 2560# The user is always right. 2561if test "${PATH_SEPARATOR+set}" != set; then 2562 echo "#! /bin/sh" >conf$$.sh 2563 echo "exit 0" >>conf$$.sh 2564 chmod +x conf$$.sh 2565 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 2566 PATH_SEPARATOR=';' 2567 else 2568 PATH_SEPARATOR=: 2569 fi 2570 rm -f conf$$.sh 2571fi 2572ac_prog=ld 2573if test "$GCC" = yes; then 2574 # Check if gcc -print-prog-name=ld gives a path. 2575 AC_MSG_CHECKING([for ld used by GCC]) 2576 case $host in 2577 *-*-mingw*) 2578 # gcc leaves a trailing carriage return which upsets mingw 2579 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2580 *) 2581 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2582 esac 2583 case $ac_prog in 2584 # Accept absolute paths. 2585 [[\\/]* | [A-Za-z]:[\\/]*)] 2586 [re_direlt='/[^/][^/]*/\.\./'] 2587 # Canonicalize the path of ld 2588 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 2589 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2590 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 2591 done 2592 test -z "$LD" && LD="$ac_prog" 2593 ;; 2594 "") 2595 # If it fails, then pretend we aren't using GCC. 2596 ac_prog=ld 2597 ;; 2598 *) 2599 # If it is relative, then search for the first ld in PATH. 2600 with_gnu_ld=unknown 2601 ;; 2602 esac 2603elif test "$with_gnu_ld" = yes; then 2604 AC_MSG_CHECKING([for GNU ld]) 2605else 2606 AC_MSG_CHECKING([for non-GNU ld]) 2607fi 2608AC_CACHE_VAL(acl_cv_path_LD, 2609[if test -z "$LD"; then 2610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 2611 for ac_dir in $PATH; do 2612 test -z "$ac_dir" && ac_dir=. 2613 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2614 acl_cv_path_LD="$ac_dir/$ac_prog" 2615 # Check to see if the program is GNU ld. I'd rather use --version, 2616 # but apparently some GNU ld's only accept -v. 2617 # Break only if it was the GNU/non-GNU ld that we prefer. 2618 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 2619 test "$with_gnu_ld" != no && break 2620 else 2621 test "$with_gnu_ld" != yes && break 2622 fi 2623 fi 2624 done 2625 IFS="$ac_save_ifs" 2626else 2627 acl_cv_path_LD="$LD" # Let the user override the test with a path. 2628fi]) 2629LD="$acl_cv_path_LD" 2630if test -n "$LD"; then 2631 AC_MSG_RESULT($LD) 2632else 2633 AC_MSG_RESULT(no) 2634fi 2635test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2636AC_LIB_PROG_LD_GNU 2637]) 2638 2639# iconv.m4 serial AM4 (gettext-0.11.3) 2640dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2641dnl This file is free software, distributed under the terms of the GNU 2642dnl General Public License. As a special exception to the GNU General 2643dnl Public License, this file may be distributed as part of a program 2644dnl that contains a configuration script generated by Autoconf, under 2645dnl the same distribution terms as the rest of that program. 2646 2647dnl From Bruno Haible. 2648 2649AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 2650[ 2651 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 2652 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 2653 AC_REQUIRE([AC_LIB_RPATH]) 2654 2655 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 2656 dnl accordingly. 2657 AC_LIB_LINKFLAGS_BODY([iconv]) 2658]) 2659 2660AC_DEFUN([AM_ICONV_LINK], 2661[ 2662 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 2663 dnl those with the standalone portable GNU libiconv installed). 2664 2665 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 2666 dnl accordingly. 2667 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 2668 2669 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 2670 dnl because if the user has installed libiconv and not disabled its use 2671 dnl via --without-libiconv-prefix, he wants to use it. The first 2672 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 2673 am_save_CPPFLAGS="$CPPFLAGS" 2674 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 2675 2676 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 2677 am_cv_func_iconv="no, consider installing GNU libiconv" 2678 am_cv_lib_iconv=no 2679 AC_TRY_LINK([#include <stdlib.h> 2680#include <iconv.h>], 2681 [iconv_t cd = iconv_open("",""); 2682 iconv(cd,NULL,NULL,NULL,NULL); 2683 iconv_close(cd);], 2684 am_cv_func_iconv=yes) 2685 if test "$am_cv_func_iconv" != yes; then 2686 am_save_LIBS="$LIBS" 2687 LIBS="$LIBS $LIBICONV" 2688 AC_TRY_LINK([#include <stdlib.h> 2689#include <iconv.h>], 2690 [iconv_t cd = iconv_open("",""); 2691 iconv(cd,NULL,NULL,NULL,NULL); 2692 iconv_close(cd);], 2693 am_cv_lib_iconv=yes 2694 am_cv_func_iconv=yes) 2695 LIBS="$am_save_LIBS" 2696 fi 2697 ]) 2698 if test "$am_cv_func_iconv" = yes; then 2699 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 2700 fi 2701 if test "$am_cv_lib_iconv" = yes; then 2702 AC_MSG_CHECKING([how to link with libiconv]) 2703 AC_MSG_RESULT([$LIBICONV]) 2704 else 2705 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 2706 dnl either. 2707 CPPFLAGS="$am_save_CPPFLAGS" 2708 LIBICONV= 2709 LTLIBICONV= 2710 fi 2711 AC_SUBST(LIBICONV) 2712 AC_SUBST(LTLIBICONV) 2713]) 2714 2715AC_DEFUN([AM_ICONV], 2716[ 2717 AM_ICONV_LINK 2718 if test "$am_cv_func_iconv" = yes; then 2719 AC_MSG_CHECKING([for iconv declaration]) 2720 AC_CACHE_VAL(am_cv_proto_iconv, [ 2721 AC_TRY_COMPILE([ 2722#include <stdlib.h> 2723#include <iconv.h> 2724extern 2725#ifdef __cplusplus 2726"C" 2727#endif 2728#if defined(__STDC__) || defined(__cplusplus) 2729size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 2730#else 2731size_t iconv(); 2732#endif 2733], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 2734 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 2735 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 2736 AC_MSG_RESULT([$]{ac_t:- 2737 }[$]am_cv_proto_iconv) 2738 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 2739 [Define as const if the declaration of iconv() needs const.]) 2740 fi 2741]) 2742 2743# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) 2744dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2745dnl This file is free software, distributed under the terms of the GNU 2746dnl General Public License. As a special exception to the GNU General 2747dnl Public License, this file may be distributed as part of a program 2748dnl that contains a configuration script generated by Autoconf, under 2749dnl the same distribution terms as the rest of that program. 2750 2751# Test for the GNU C Library, version 2.1 or newer. 2752# From Bruno Haible. 2753 2754AC_DEFUN([jm_GLIBC21], 2755 [ 2756 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 2757 ac_cv_gnu_library_2_1, 2758 [AC_EGREP_CPP([Lucky GNU user], 2759 [ 2760#include <features.h> 2761#ifdef __GNU_LIBRARY__ 2762 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 2763 Lucky GNU user 2764 #endif 2765#endif 2766 ], 2767 ac_cv_gnu_library_2_1=yes, 2768 ac_cv_gnu_library_2_1=no) 2769 ] 2770 ) 2771 AC_SUBST(GLIBC21) 2772 GLIBC21="$ac_cv_gnu_library_2_1" 2773 ] 2774) 2775 2776# intdiv0.m4 serial 1 (gettext-0.11.3) 2777dnl Copyright (C) 2002 Free Software Foundation, Inc. 2778dnl This file is free software, distributed under the terms of the GNU 2779dnl General Public License. As a special exception to the GNU General 2780dnl Public License, this file may be distributed as part of a program 2781dnl that contains a configuration script generated by Autoconf, under 2782dnl the same distribution terms as the rest of that program. 2783 2784dnl From Bruno Haible. 2785 2786AC_DEFUN([gt_INTDIV0], 2787[ 2788 AC_REQUIRE([AC_PROG_CC])dnl 2789 AC_REQUIRE([AC_CANONICAL_HOST])dnl 2790 2791 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 2792 gt_cv_int_divbyzero_sigfpe, 2793 [ 2794 AC_TRY_RUN([ 2795#include <stdlib.h> 2796#include <signal.h> 2797 2798static void 2799#ifdef __cplusplus 2800sigfpe_handler (int sig) 2801#else 2802sigfpe_handler (sig) int sig; 2803#endif 2804{ 2805 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 2806 exit (sig != SIGFPE); 2807} 2808 2809int x = 1; 2810int y = 0; 2811int z; 2812int nan; 2813 2814int main () 2815{ 2816 signal (SIGFPE, sigfpe_handler); 2817/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ 2818#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) 2819 signal (SIGTRAP, sigfpe_handler); 2820#endif 2821/* Linux/SPARC yields signal SIGILL. */ 2822#if defined (__sparc__) && defined (__linux__) 2823 signal (SIGILL, sigfpe_handler); 2824#endif 2825 2826 z = x / y; 2827 nan = y / y; 2828 exit (1); 2829} 2830], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 2831 [ 2832 # Guess based on the CPU. 2833 case "$host_cpu" in 2834 alpha* | i[34567]86 | m68k | s390*) 2835 gt_cv_int_divbyzero_sigfpe="guessing yes";; 2836 *) 2837 gt_cv_int_divbyzero_sigfpe="guessing no";; 2838 esac 2839 ]) 2840 ]) 2841 case "$gt_cv_int_divbyzero_sigfpe" in 2842 *yes) value=1;; 2843 *) value=0;; 2844 esac 2845 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, 2846 [Define if integer division by zero raises signal SIGFPE.]) 2847]) 2848 2849#serial 6 2850 2851dnl From Paul Eggert. 2852 2853AC_PREREQ(2.52) 2854 2855# Define intmax_t to long or long long if <inttypes.h> doesn't define. 2856 2857AC_DEFUN([jm_AC_TYPE_INTMAX_T], 2858[ 2859 AC_REQUIRE([jm_AC_TYPE_LONG_LONG]) 2860 AC_CHECK_TYPE(intmax_t, , 2861 [test $ac_cv_type_long_long = yes \ 2862 && ac_type='long long' \ 2863 || ac_type='long' 2864 AC_DEFINE_UNQUOTED(intmax_t, $ac_type, 2865 [Define to widest signed type if <inttypes.h> doesn't define.])]) 2866]) 2867 2868# Define uintmax_t to unsigned long or unsigned long long 2869# if <inttypes.h> doesn't define. 2870 2871AC_DEFUN([jm_AC_TYPE_UINTMAX_T], 2872[ 2873 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) 2874 AC_CHECK_TYPE(uintmax_t, , 2875 [test $ac_cv_type_unsigned_long_long = yes \ 2876 && ac_type='unsigned long long' \ 2877 || ac_type='unsigned long' 2878 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 2879 [Define to widest unsigned type if <inttypes.h> doesn't define.])]) 2880]) 2881 2882#serial 2 2883 2884dnl From Paul Eggert. 2885 2886# Define HAVE_LONG_LONG if 'long long' works. 2887 2888AC_DEFUN([jm_AC_TYPE_LONG_LONG], 2889[ 2890 AC_CACHE_CHECK([for long long], ac_cv_type_long_long, 2891 [AC_TRY_LINK([long long ll = 1; int i = 63;], 2892 [long long llmax = (long long) -1; 2893 return ll << i | ll >> i | llmax / ll | llmax % ll;], 2894 ac_cv_type_long_long=yes, 2895 ac_cv_type_long_long=no)]) 2896 if test $ac_cv_type_long_long = yes; then 2897 AC_DEFINE(HAVE_LONG_LONG, 1, 2898 [Define if you have the long long type.]) 2899 fi 2900]) 2901 2902# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. 2903 2904AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], 2905[ 2906 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, 2907 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], 2908 [unsigned long long ullmax = (unsigned long long) -1; 2909 return ull << i | ull >> i | ullmax / ull | ullmax % ull;], 2910 ac_cv_type_unsigned_long_long=yes, 2911 ac_cv_type_unsigned_long_long=no)]) 2912 if test $ac_cv_type_unsigned_long_long = yes; then 2913 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 2914 [Define if you have the unsigned long long type.]) 2915 fi 2916]) 2917 2918# inttypes.m4 serial 1 (gettext-0.11.4) 2919dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2920dnl This file is free software, distributed under the terms of the GNU 2921dnl General Public License. As a special exception to the GNU General 2922dnl Public License, this file may be distributed as part of a program 2923dnl that contains a configuration script generated by Autoconf, under 2924dnl the same distribution terms as the rest of that program. 2925 2926dnl From Paul Eggert. 2927 2928# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with 2929# <sys/types.h>. 2930 2931AC_DEFUN([gt_HEADER_INTTYPES_H], 2932[ 2933 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, 2934 [ 2935 AC_TRY_COMPILE( 2936 [#include <sys/types.h> 2937#include <inttypes.h>], 2938 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) 2939 ]) 2940 if test $gt_cv_header_inttypes_h = yes; then 2941 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, 2942 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) 2943 fi 2944]) 2945 2946# inttypes-pri.m4 serial 1 (gettext-0.11.4) 2947dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2948dnl This file is free software, distributed under the terms of the GNU 2949dnl General Public License. As a special exception to the GNU General 2950dnl Public License, this file may be distributed as part of a program 2951dnl that contains a configuration script generated by Autoconf, under 2952dnl the same distribution terms as the rest of that program. 2953 2954dnl From Bruno Haible. 2955 2956# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* 2957# macros to non-string values. This is the case on AIX 4.3.3. 2958 2959AC_DEFUN([gt_INTTYPES_PRI], 2960[ 2961 AC_REQUIRE([gt_HEADER_INTTYPES_H]) 2962 if test $gt_cv_header_inttypes_h = yes; then 2963 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 2964 gt_cv_inttypes_pri_broken, 2965 [ 2966 AC_TRY_COMPILE([#include <inttypes.h> 2967#ifdef PRId32 2968char *p = PRId32; 2969#endif 2970], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) 2971 ]) 2972 fi 2973 if test "$gt_cv_inttypes_pri_broken" = yes; then 2974 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, 2975 [Define if <inttypes.h> exists and defines unusable PRI* macros.]) 2976 fi 2977]) 2978 2979# codeset.m4 serial AM1 (gettext-0.10.40) 2980dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2981dnl This file is free software, distributed under the terms of the GNU 2982dnl General Public License. As a special exception to the GNU General 2983dnl Public License, this file may be distributed as part of a program 2984dnl that contains a configuration script generated by Autoconf, under 2985dnl the same distribution terms as the rest of that program. 2986 2987dnl From Bruno Haible. 2988 2989AC_DEFUN([AM_LANGINFO_CODESET], 2990[ 2991 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 2992 [AC_TRY_LINK([#include <langinfo.h>], 2993 [char* cs = nl_langinfo(CODESET);], 2994 am_cv_langinfo_codeset=yes, 2995 am_cv_langinfo_codeset=no) 2996 ]) 2997 if test $am_cv_langinfo_codeset = yes; then 2998 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 2999 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) 3000 fi 3001]) 3002 3003# lcmessage.m4 serial 3 (gettext-0.11.3) 3004dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 3005dnl This file is free software, distributed under the terms of the GNU 3006dnl General Public License. As a special exception to the GNU General 3007dnl Public License, this file may be distributed as part of a program 3008dnl that contains a configuration script generated by Autoconf, under 3009dnl the same distribution terms as the rest of that program. 3010dnl 3011dnl This file can can be used in projects which are not available under 3012dnl the GNU General Public License or the GNU Library General Public 3013dnl License but which still want to provide support for the GNU gettext 3014dnl functionality. 3015dnl Please note that the actual code of the GNU gettext library is covered 3016dnl by the GNU Library General Public License, and the rest of the GNU 3017dnl gettext package package is covered by the GNU General Public License. 3018dnl They are *not* in the public domain. 3019 3020dnl Authors: 3021dnl Ulrich Drepper <drepper@cygnus.com>, 1995. 3022 3023# Check whether LC_MESSAGES is available in <locale.h>. 3024 3025AC_DEFUN([AM_LC_MESSAGES], 3026[ 3027 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 3028 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 3029 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 3030 if test $am_cv_val_LC_MESSAGES = yes; then 3031 AC_DEFINE(HAVE_LC_MESSAGES, 1, 3032 [Define if your <locale.h> file defines LC_MESSAGES.]) 3033 fi 3034]) 3035 3036dnl 3037dnl strtod.m4 --- autoconf input file for gawk 3038dnl 3039dnl Copyright (C) 2001, 2002 the Free Software Foundation, Inc. 3040dnl 3041dnl This file is part of GAWK, the GNU implementation of the 3042dnl AWK Progamming Language. 3043dnl 3044dnl GAWK is free software; you can redistribute it and/or modify 3045dnl it under the terms of the GNU General Public License as published by 3046dnl the Free Software Foundation; either version 2 of the License, or 3047dnl (at your option) any later version. 3048dnl 3049dnl GAWK is distributed in the hope that it will be useful, 3050dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 3051dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3052dnl GNU General Public License for more details. 3053dnl 3054dnl You should have received a copy of the GNU General Public License 3055dnl along with this program; if not, write to the Free Software 3056dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 3057 3058dnl Check for strtod with C89 semantics 3059 3060AC_DEFUN(GAWK_AC_FUNC_STRTOD_C89, 3061[ 3062AC_CHECK_HEADERS(stdlib.h) 3063AC_CHECK_FUNCS(strtod) 3064AC_CACHE_CHECK([for strtod with C89 semantics], gawk_ac_cv_func_strtod_c89, 3065[AC_TRY_RUN( 3066[/* Test program from Arnold Robbins (arnold@skeeve.com) */ 3067#if HAVE_STDLIB_H 3068#include <stdlib.h> 3069#else 3070extern double strtod(); 3071#endif 3072 3073int 3074main () 3075{ 3076#if ! HAVE_STRTOD 3077 exit(1); 3078#else 3079 double d; 3080 char *str = "0x345a"; 3081 3082 d = strtod(str, 0); 3083 if (d == 0) 3084 exit (0); 3085 else 3086 exit (1); 3087#endif 3088}], 3089gawk_ac_cv_func_strtod_c89=yes, gawk_ac_cv_func_strtod_c89=no, 3090gawk_ac_cv_func_strtod_c89=no)]) 3091if test $gawk_ac_cv_func_strtod_c89 = no; then 3092 AC_DEFINE(STRTOD_NOT_C89, 1, [strtod doesn't have C89 semantics]) 3093fi 3094])# GAWK_FUNC_STRTOD_C89 3095 3096dnl 3097dnl socket.m4 --- autoconf input file for gawk 3098dnl 3099dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. 3100dnl 3101dnl This file is part of GAWK, the GNU implementation of the 3102dnl AWK Progamming Language. 3103dnl 3104dnl GAWK is free software; you can redistribute it and/or modify 3105dnl it under the terms of the GNU General Public License as published by 3106dnl the Free Software Foundation; either version 2 of the License, or 3107dnl (at your option) any later version. 3108dnl 3109dnl GAWK is distributed in the hope that it will be useful, 3110dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 3111dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3112dnl GNU General Public License for more details. 3113dnl 3114dnl You should have received a copy of the GNU General Public License 3115dnl along with this program; if not, write to the Free Software 3116dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 3117dnl 3118 3119dnl Find the socket libraries 3120dnl largely stolen from AC_PATH_XTRA 3121AC_DEFUN(GAWK_AC_LIB_SOCKETS, [ 3122gawk_have_sockets=no 3123# Check for system-dependent location of socket libraries 3124 3125SOCKET_LIBS= 3126if test "$ISC" = yes; then 3127 SOCKET_LIBS="-lnsl_s -linet" 3128else 3129 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X 3130 # libraries were built with DECnet support. And karl@cs.umb.edu says 3131 # the Alpha needs dnet_stub (dnet does not exist). 3132 # 3133 # ADR: Is this needed just for sockets??? 3134# AC_CHECK_LIB(dnet, dnet_ntoa, [SOCKET_LIBS="$SOCKET_LIBS -ldnet"]) 3135# if test $ac_cv_lib_dnet_ntoa = no; then 3136# AC_CHECK_LIB(dnet_stub, dnet_ntoa, 3137# [SOCKET_LIBS="$SOCKET_LIBS -ldnet_stub"]) 3138# fi 3139 3140 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 3141 # to get the SysV transport functions. 3142 # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4) 3143 # needs -lnsl. 3144 # The nsl library prevents programs from opening the X display 3145 # on Irix 5.2, according to dickey@clark.net. 3146 AC_CHECK_FUNC(gethostbyname) 3147 if test $ac_cv_func_gethostbyname = no; then 3148 AC_CHECK_LIB(nsl, gethostbyname, SOCKET_LIBS="$SOCKET_LIBS -lnsl") 3149 fi 3150 3151 # lieder@skyler.mavd.honeywell.com says without -lsocket, 3152 # socket/setsockopt and other routines are undefined under SCO ODT 3153 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 3154 # on later versions), says simon@lia.di.epfl.ch: it contains 3155 # gethostby* variants that don't use the nameserver (or something). 3156 # -lsocket must be given before -lnsl if both are needed. 3157 # We assume that if connect needs -lnsl, so does gethostbyname. 3158 AC_CHECK_FUNC(connect) 3159 if test $ac_cv_func_connect = no; then 3160 AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket $SOCKET_LIBS" 3161 gawk_have_sockets=yes, , 3162 $SOCKET_LIBS) 3163 else 3164 gawk_have_sockets=yes 3165 fi 3166fi 3167 3168if test "${gawk_have_sockets}" = "yes" 3169then 3170 AC_MSG_CHECKING([where to find the socket library calls]) 3171 case "${SOCKET_LIBS}" in 3172 ?*) gawk_lib_loc="${SOCKET_LIBS}" ;; 3173 *) gawk_lib_loc="the standard library" ;; 3174 esac 3175 AC_MSG_RESULT([${gawk_lib_loc}]) 3176 3177 AC_DEFINE(HAVE_SOCKETS, 1, [we have sockets on this system]) 3178fi 3179AC_SUBST(SOCKET_LIBS)dnl 3180])dnl 3181 3182