1# aclocal.m4t generated automatically by aclocal 1.6.3 -*- Autoconf -*- 2 3# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 4# Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14dnl $Id: acinclude.m4,v 1.15 1998/05/23 14:54:53 joda Exp $ 15dnl 16dnl Only put things that for some reason can't live in the `cf' 17dnl directory in this file. 18dnl 19 20dnl $xId: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $ 21dnl 22define(upcase,`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl 23 24 25dnl $Id: misc.m4,v 1.5 2002/05/24 15:35:32 joda Exp $ 26dnl 27AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl 28AC_DEFUN([rk_LIBOBJ],[AC_LIBOBJ([$1])])dnl 29AC_DEFUN([rk_CONFIG_HEADER],[AH_TOP([#ifndef RCSID 30#define RCSID(msg) \ 31static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } 32#endif 33 34/* Maximum values on all known systems */ 35#define MaxHostNameLen (64+4) 36#define MaxPathLen (1024+4) 37 38])]) 39# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 40 41# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 42 43# This program is free software; you can redistribute it and/or modify 44# it under the terms of the GNU General Public License as published by 45# the Free Software Foundation; either version 2, or (at your option) 46# any later version. 47 48# This program is distributed in the hope that it will be useful, 49# but WITHOUT ANY WARRANTY; without even the implied warranty of 50# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51# GNU General Public License for more details. 52 53# You should have received a copy of the GNU General Public License 54# along with this program; if not, write to the Free Software 55# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 56# 02111-1307, USA. 57 58AC_PREREQ([2.52]) 59 60# serial 6 61 62# When config.status generates a header, we must update the stamp-h file. 63# This file resides in the same directory as the config header 64# that is generated. We must strip everything past the first ":", 65# and everything past the last "/". 66 67# _AM_DIRNAME(PATH) 68# ----------------- 69# Like AS_DIRNAME, only do it during macro expansion 70AC_DEFUN([_AM_DIRNAME], 71 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, 72 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, 73 m4_if(regexp([$1], [^/.*]), -1, 74 [.], 75 patsubst([$1], [^\(/\).*], [\1])), 76 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), 77 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl 78])# _AM_DIRNAME 79 80 81# The stamp files are numbered to have different names. 82# We could number them on a directory basis, but that's additional 83# complications, let's have a unique counter. 84m4_define([_AM_STAMP_Count], [0]) 85 86 87# _AM_STAMP(HEADER) 88# ----------------- 89# The name of the stamp file for HEADER. 90AC_DEFUN([_AM_STAMP], 91[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl 92AS_ESCAPE(_AM_DIRNAME(patsubst([$1], 93 [:.*])))/stamp-h[]_AM_STAMP_Count]) 94 95 96# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS) 97# ------------------------------------------------------------ 98# We used to try to get a real timestamp in stamp-h. But the fear is that 99# that will cause unnecessary cvs conflicts. 100AC_DEFUN([_AM_CONFIG_HEADER], 101[# Add the stamp file to the list of files AC keeps track of, 102# along with our hook. 103AC_CONFIG_HEADERS([$1], 104 [# update the timestamp 105echo 'timestamp for $1' >"_AM_STAMP([$1])" 106$2], 107 [$3]) 108])# _AM_CONFIG_HEADER 109 110 111# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS) 112# -------------------------------------------------------------- 113AC_DEFUN([AM_CONFIG_HEADER], 114[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])]) 115])# AM_CONFIG_HEADER 116 117# Do all the work for Automake. -*- Autoconf -*- 118 119# This macro actually does too much some checks are only needed if 120# your package does certain things. But this isn't really a big deal. 121 122# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 123# Free Software Foundation, Inc. 124 125# This program is free software; you can redistribute it and/or modify 126# it under the terms of the GNU General Public License as published by 127# the Free Software Foundation; either version 2, or (at your option) 128# any later version. 129 130# This program is distributed in the hope that it will be useful, 131# but WITHOUT ANY WARRANTY; without even the implied warranty of 132# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 133# GNU General Public License for more details. 134 135# You should have received a copy of the GNU General Public License 136# along with this program; if not, write to the Free Software 137# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 138# 02111-1307, USA. 139 140# serial 8 141 142# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 143# written in clear, in which case automake, when reading aclocal.m4, 144# will think it sees a *use*, and therefore will trigger all it's 145# C support machinery. Also note that it means that autoscan, seeing 146# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 147 148 149AC_PREREQ([2.52]) 150 151# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 152# the ones we care about. 153m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 154 155# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 156# AM_INIT_AUTOMAKE([OPTIONS]) 157# ----------------------------------------------- 158# The call with PACKAGE and VERSION arguments is the old style 159# call (pre autoconf-2.50), which is being phased out. PACKAGE 160# and VERSION should now be passed to AC_INIT and removed from 161# the call to AM_INIT_AUTOMAKE. 162# We support both call styles for the transition. After 163# the next Automake release, Autoconf can make the AC_INIT 164# arguments mandatory, and then we can depend on a new Autoconf 165# release and drop the old call support. 166AC_DEFUN([AM_INIT_AUTOMAKE], 167[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 168 AC_REQUIRE([AC_PROG_INSTALL])dnl 169# test to see if srcdir already configured 170if test "`cd $srcdir && pwd`" != "`pwd`" && 171 test -f $srcdir/config.status; then 172 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 173fi 174 175# Define the identity of the package. 176dnl Distinguish between old-style and new-style calls. 177m4_ifval([$2], 178[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 179 AC_SUBST([PACKAGE], [$1])dnl 180 AC_SUBST([VERSION], [$2])], 181[_AM_SET_OPTIONS([$1])dnl 182 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl 183 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl 184 185_AM_IF_OPTION([no-define],, 186[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 187 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 188 189# Some tools Automake needs. 190AC_REQUIRE([AM_SANITY_CHECK])dnl 191AC_REQUIRE([AC_ARG_PROGRAM])dnl 192AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 193AM_MISSING_PROG(AUTOCONF, autoconf) 194AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 195AM_MISSING_PROG(AUTOHEADER, autoheader) 196AM_MISSING_PROG(MAKEINFO, makeinfo) 197AM_MISSING_PROG(AMTAR, tar) 198AM_PROG_INSTALL_SH 199AM_PROG_INSTALL_STRIP 200# We need awk for the "check" target. The system "awk" is bad on 201# some platforms. 202AC_REQUIRE([AC_PROG_AWK])dnl 203AC_REQUIRE([AC_PROG_MAKE_SET])dnl 204 205_AM_IF_OPTION([no-dependencies],, 206[AC_PROVIDE_IFELSE([AC_PROG_][CC], 207 [_AM_DEPENDENCIES(CC)], 208 [define([AC_PROG_][CC], 209 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl 210AC_PROVIDE_IFELSE([AC_PROG_][CXX], 211 [_AM_DEPENDENCIES(CXX)], 212 [define([AC_PROG_][CXX], 213 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl 214]) 215]) 216 217# Copyright 2002 Free Software Foundation, Inc. 218 219# This program is free software; you can redistribute it and/or modify 220# it under the terms of the GNU General Public License as published by 221# the Free Software Foundation; either version 2, or (at your option) 222# any later version. 223 224# This program is distributed in the hope that it will be useful, 225# but WITHOUT ANY WARRANTY; without even the implied warranty of 226# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 227# GNU General Public License for more details. 228 229# You should have received a copy of the GNU General Public License 230# along with this program; if not, write to the Free Software 231# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 232 233# AM_AUTOMAKE_VERSION(VERSION) 234# ---------------------------- 235# Automake X.Y traces this macro to ensure aclocal.m4 has been 236# generated from the m4 files accompanying Automake X.Y. 237AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) 238 239# AM_SET_CURRENT_AUTOMAKE_VERSION 240# ------------------------------- 241# Call AM_AUTOMAKE_VERSION so it can be traced. 242# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 243AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 244 [AM_AUTOMAKE_VERSION([1.6.3])]) 245 246# Helper functions for option handling. -*- Autoconf -*- 247 248# Copyright 2001, 2002 Free Software Foundation, Inc. 249 250# This program is free software; you can redistribute it and/or modify 251# it under the terms of the GNU General Public License as published by 252# the Free Software Foundation; either version 2, or (at your option) 253# any later version. 254 255# This program is distributed in the hope that it will be useful, 256# but WITHOUT ANY WARRANTY; without even the implied warranty of 257# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 258# GNU General Public License for more details. 259 260# You should have received a copy of the GNU General Public License 261# along with this program; if not, write to the Free Software 262# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 263# 02111-1307, USA. 264 265# serial 2 266 267# _AM_MANGLE_OPTION(NAME) 268# ----------------------- 269AC_DEFUN([_AM_MANGLE_OPTION], 270[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 271 272# _AM_SET_OPTION(NAME) 273# ------------------------------ 274# Set option NAME. Presently that only means defining a flag for this option. 275AC_DEFUN([_AM_SET_OPTION], 276[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 277 278# _AM_SET_OPTIONS(OPTIONS) 279# ---------------------------------- 280# OPTIONS is a space-separated list of Automake options. 281AC_DEFUN([_AM_SET_OPTIONS], 282[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 283 284# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 285# ------------------------------------------- 286# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 287AC_DEFUN([_AM_IF_OPTION], 288[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 289 290# 291# Check to make sure that the build environment is sane. 292# 293 294# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 295 296# This program is free software; you can redistribute it and/or modify 297# it under the terms of the GNU General Public License as published by 298# the Free Software Foundation; either version 2, or (at your option) 299# any later version. 300 301# This program is distributed in the hope that it will be useful, 302# but WITHOUT ANY WARRANTY; without even the implied warranty of 303# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304# GNU General Public License for more details. 305 306# You should have received a copy of the GNU General Public License 307# along with this program; if not, write to the Free Software 308# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 309# 02111-1307, USA. 310 311# serial 3 312 313# AM_SANITY_CHECK 314# --------------- 315AC_DEFUN([AM_SANITY_CHECK], 316[AC_MSG_CHECKING([whether build environment is sane]) 317# Just in case 318sleep 1 319echo timestamp > conftest.file 320# Do `set' in a subshell so we don't clobber the current shell's 321# arguments. Must try -L first in case configure is actually a 322# symlink; some systems play weird games with the mod time of symlinks 323# (eg FreeBSD returns the mod time of the symlink's containing 324# directory). 325if ( 326 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 327 if test "$[*]" = "X"; then 328 # -L didn't work. 329 set X `ls -t $srcdir/configure conftest.file` 330 fi 331 rm -f conftest.file 332 if test "$[*]" != "X $srcdir/configure conftest.file" \ 333 && test "$[*]" != "X conftest.file $srcdir/configure"; then 334 335 # If neither matched, then we have a broken ls. This can happen 336 # if, for instance, CONFIG_SHELL is bash and it inherits a 337 # broken ls alias from the environment. This has actually 338 # happened. Such a system could not be considered "sane". 339 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 340alias in your environment]) 341 fi 342 343 test "$[2]" = conftest.file 344 ) 345then 346 # Ok. 347 : 348else 349 AC_MSG_ERROR([newly created file is older than distributed files! 350Check your system clock]) 351fi 352AC_MSG_RESULT(yes)]) 353 354# -*- Autoconf -*- 355 356 357# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 358 359# This program is free software; you can redistribute it and/or modify 360# it under the terms of the GNU General Public License as published by 361# the Free Software Foundation; either version 2, or (at your option) 362# any later version. 363 364# This program is distributed in the hope that it will be useful, 365# but WITHOUT ANY WARRANTY; without even the implied warranty of 366# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 367# GNU General Public License for more details. 368 369# You should have received a copy of the GNU General Public License 370# along with this program; if not, write to the Free Software 371# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 372# 02111-1307, USA. 373 374# serial 3 375 376# AM_MISSING_PROG(NAME, PROGRAM) 377# ------------------------------ 378AC_DEFUN([AM_MISSING_PROG], 379[AC_REQUIRE([AM_MISSING_HAS_RUN]) 380$1=${$1-"${am_missing_run}$2"} 381AC_SUBST($1)]) 382 383 384# AM_MISSING_HAS_RUN 385# ------------------ 386# Define MISSING if not defined so far and test if it supports --run. 387# If it does, set am_missing_run to use it, otherwise, to nothing. 388AC_DEFUN([AM_MISSING_HAS_RUN], 389[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 390test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 391# Use eval to expand $SHELL 392if eval "$MISSING --run true"; then 393 am_missing_run="$MISSING --run " 394else 395 am_missing_run= 396 AC_MSG_WARN([`missing' script is too old or missing]) 397fi 398]) 399 400# AM_AUX_DIR_EXPAND 401 402# Copyright 2001 Free Software Foundation, Inc. 403 404# This program is free software; you can redistribute it and/or modify 405# it under the terms of the GNU General Public License as published by 406# the Free Software Foundation; either version 2, or (at your option) 407# any later version. 408 409# This program is distributed in the hope that it will be useful, 410# but WITHOUT ANY WARRANTY; without even the implied warranty of 411# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 412# GNU General Public License for more details. 413 414# You should have received a copy of the GNU General Public License 415# along with this program; if not, write to the Free Software 416# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 417# 02111-1307, USA. 418 419# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 420# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 421# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 422# 423# Of course, Automake must honor this variable whenever it calls a 424# tool from the auxiliary directory. The problem is that $srcdir (and 425# therefore $ac_aux_dir as well) can be either absolute or relative, 426# depending on how configure is run. This is pretty annoying, since 427# it makes $ac_aux_dir quite unusable in subdirectories: in the top 428# source directory, any form will work fine, but in subdirectories a 429# relative path needs to be adjusted first. 430# 431# $ac_aux_dir/missing 432# fails when called from a subdirectory if $ac_aux_dir is relative 433# $top_srcdir/$ac_aux_dir/missing 434# fails if $ac_aux_dir is absolute, 435# fails when called from a subdirectory in a VPATH build with 436# a relative $ac_aux_dir 437# 438# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 439# are both prefixed by $srcdir. In an in-source build this is usually 440# harmless because $srcdir is `.', but things will broke when you 441# start a VPATH build or use an absolute $srcdir. 442# 443# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 444# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 445# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 446# and then we would define $MISSING as 447# MISSING="\${SHELL} $am_aux_dir/missing" 448# This will work as long as MISSING is not called from configure, because 449# unfortunately $(top_srcdir) has no meaning in configure. 450# However there are other variables, like CC, which are often used in 451# configure, and could therefore not use this "fixed" $ac_aux_dir. 452# 453# Another solution, used here, is to always expand $ac_aux_dir to an 454# absolute PATH. The drawback is that using absolute paths prevent a 455# configured tree to be moved without reconfiguration. 456 457# Rely on autoconf to set up CDPATH properly. 458AC_PREREQ([2.50]) 459 460AC_DEFUN([AM_AUX_DIR_EXPAND], [ 461# expand $ac_aux_dir to an absolute path 462am_aux_dir=`cd $ac_aux_dir && pwd` 463]) 464 465# AM_PROG_INSTALL_SH 466# ------------------ 467# Define $install_sh. 468 469# Copyright 2001 Free Software Foundation, Inc. 470 471# This program is free software; you can redistribute it and/or modify 472# it under the terms of the GNU General Public License as published by 473# the Free Software Foundation; either version 2, or (at your option) 474# any later version. 475 476# This program is distributed in the hope that it will be useful, 477# but WITHOUT ANY WARRANTY; without even the implied warranty of 478# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 479# GNU General Public License for more details. 480 481# You should have received a copy of the GNU General Public License 482# along with this program; if not, write to the Free Software 483# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 484# 02111-1307, USA. 485 486AC_DEFUN([AM_PROG_INSTALL_SH], 487[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 488install_sh=${install_sh-"$am_aux_dir/install-sh"} 489AC_SUBST(install_sh)]) 490 491# AM_PROG_INSTALL_STRIP 492 493# Copyright 2001 Free Software Foundation, Inc. 494 495# This program is free software; you can redistribute it and/or modify 496# it under the terms of the GNU General Public License as published by 497# the Free Software Foundation; either version 2, or (at your option) 498# any later version. 499 500# This program is distributed in the hope that it will be useful, 501# but WITHOUT ANY WARRANTY; without even the implied warranty of 502# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 503# GNU General Public License for more details. 504 505# You should have received a copy of the GNU General Public License 506# along with this program; if not, write to the Free Software 507# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 508# 02111-1307, USA. 509 510# One issue with vendor `install' (even GNU) is that you can't 511# specify the program used to strip binaries. This is especially 512# annoying in cross-compiling environments, where the build's strip 513# is unlikely to handle the host's binaries. 514# Fortunately install-sh will honor a STRIPPROG variable, so we 515# always use install-sh in `make install-strip', and initialize 516# STRIPPROG with the value of the STRIP variable (set by the user). 517AC_DEFUN([AM_PROG_INSTALL_STRIP], 518[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 519# Installed binaries are usually stripped using `strip' when the user 520# run `make install-strip'. However `strip' might not be the right 521# tool to use in cross-compilation environments, therefore Automake 522# will honor the `STRIP' environment variable to overrule this program. 523dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 524if test "$cross_compiling" != no; then 525 AC_CHECK_TOOL([STRIP], [strip], :) 526fi 527INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 528AC_SUBST([INSTALL_STRIP_PROGRAM])]) 529 530# serial 4 -*- Autoconf -*- 531 532# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 533 534# This program is free software; you can redistribute it and/or modify 535# it under the terms of the GNU General Public License as published by 536# the Free Software Foundation; either version 2, or (at your option) 537# any later version. 538 539# This program is distributed in the hope that it will be useful, 540# but WITHOUT ANY WARRANTY; without even the implied warranty of 541# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 542# GNU General Public License for more details. 543 544# You should have received a copy of the GNU General Public License 545# along with this program; if not, write to the Free Software 546# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 547# 02111-1307, USA. 548 549 550# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 551# written in clear, in which case automake, when reading aclocal.m4, 552# will think it sees a *use*, and therefore will trigger all it's 553# C support machinery. Also note that it means that autoscan, seeing 554# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 555 556 557 558# _AM_DEPENDENCIES(NAME) 559# ---------------------- 560# See how the compiler implements dependency checking. 561# NAME is "CC", "CXX", "GCJ", or "OBJC". 562# We try a few techniques and use that to set a single cache variable. 563# 564# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 565# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 566# dependency, and given that the user is not expected to run this macro, 567# just rely on AC_PROG_CC. 568AC_DEFUN([_AM_DEPENDENCIES], 569[AC_REQUIRE([AM_SET_DEPDIR])dnl 570AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 571AC_REQUIRE([AM_MAKE_INCLUDE])dnl 572AC_REQUIRE([AM_DEP_TRACK])dnl 573 574ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 575 [$1], CXX, [depcc="$CXX" am_compiler_list=], 576 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 577 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 578 [depcc="$$1" am_compiler_list=]) 579 580AC_CACHE_CHECK([dependency style of $depcc], 581 [am_cv_$1_dependencies_compiler_type], 582[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 583 # We make a subdir and do the tests there. Otherwise we can end up 584 # making bogus files that we don't know about and never remove. For 585 # instance it was reported that on HP-UX the gcc test will end up 586 # making a dummy file named `D' -- because `-MD' means `put the output 587 # in D'. 588 mkdir conftest.dir 589 # Copy depcomp to subdir because otherwise we won't find it if we're 590 # using a relative directory. 591 cp "$am_depcomp" conftest.dir 592 cd conftest.dir 593 594 am_cv_$1_dependencies_compiler_type=none 595 if test "$am_compiler_list" = ""; then 596 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 597 fi 598 for depmode in $am_compiler_list; do 599 # We need to recreate these files for each test, as the compiler may 600 # overwrite some of them when testing with obscure command lines. 601 # This happens at least with the AIX C compiler. 602 echo '#include "conftest.h"' > conftest.c 603 echo 'int i;' > conftest.h 604 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf 605 606 case $depmode in 607 nosideeffect) 608 # after this tag, mechanisms are not by side-effect, so they'll 609 # only be used when explicitly requested 610 if test "x$enable_dependency_tracking" = xyes; then 611 continue 612 else 613 break 614 fi 615 ;; 616 none) break ;; 617 esac 618 # We check with `-c' and `-o' for the sake of the "dashmstdout" 619 # mode. It turns out that the SunPro C++ compiler does not properly 620 # handle `-M -o', and we need to detect this. 621 if depmode=$depmode \ 622 source=conftest.c object=conftest.o \ 623 depfile=conftest.Po tmpdepfile=conftest.TPo \ 624 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && 625 grep conftest.h conftest.Po > /dev/null 2>&1 && 626 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 627 am_cv_$1_dependencies_compiler_type=$depmode 628 break 629 fi 630 done 631 632 cd .. 633 rm -rf conftest.dir 634else 635 am_cv_$1_dependencies_compiler_type=none 636fi 637]) 638AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 639]) 640 641 642# AM_SET_DEPDIR 643# ------------- 644# Choose a directory name for dependency files. 645# This macro is AC_REQUIREd in _AM_DEPENDENCIES 646AC_DEFUN([AM_SET_DEPDIR], 647[rm -f .deps 2>/dev/null 648mkdir .deps 2>/dev/null 649if test -d .deps; then 650 DEPDIR=.deps 651else 652 # MS-DOS does not allow filenames that begin with a dot. 653 DEPDIR=_deps 654fi 655rmdir .deps 2>/dev/null 656AC_SUBST([DEPDIR]) 657]) 658 659 660# AM_DEP_TRACK 661# ------------ 662AC_DEFUN([AM_DEP_TRACK], 663[AC_ARG_ENABLE(dependency-tracking, 664[ --disable-dependency-tracking Speeds up one-time builds 665 --enable-dependency-tracking Do not reject slow dependency extractors]) 666if test "x$enable_dependency_tracking" != xno; then 667 am_depcomp="$ac_aux_dir/depcomp" 668 AMDEPBACKSLASH='\' 669fi 670AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 671AC_SUBST([AMDEPBACKSLASH]) 672]) 673 674# Generate code to set up dependency tracking. -*- Autoconf -*- 675 676# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 677 678# This program is free software; you can redistribute it and/or modify 679# it under the terms of the GNU General Public License as published by 680# the Free Software Foundation; either version 2, or (at your option) 681# any later version. 682 683# This program is distributed in the hope that it will be useful, 684# but WITHOUT ANY WARRANTY; without even the implied warranty of 685# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 686# GNU General Public License for more details. 687 688# You should have received a copy of the GNU General Public License 689# along with this program; if not, write to the Free Software 690# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 691# 02111-1307, USA. 692 693#serial 2 694 695# _AM_OUTPUT_DEPENDENCY_COMMANDS 696# ------------------------------ 697AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 698[for mf in $CONFIG_FILES; do 699 # Strip MF so we end up with the name of the file. 700 mf=`echo "$mf" | sed -e 's/:.*$//'` 701 # Check whether this is an Automake generated Makefile or not. 702 # We used to match only the files named `Makefile.in', but 703 # some people rename them; so instead we look at the file content. 704 # Grep'ing the first line is not enough: some people post-process 705 # each Makefile.in and add a new line on top of each file to say so. 706 # So let's grep whole file. 707 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 708 dirpart=`AS_DIRNAME("$mf")` 709 else 710 continue 711 fi 712 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 713 # Extract the definition of DEP_FILES from the Makefile without 714 # running `make'. 715 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 716 test -z "$DEPDIR" && continue 717 # When using ansi2knr, U may be empty or an underscore; expand it 718 U=`sed -n -e '/^U = / s///p' < "$mf"` 719 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 720 # We invoke sed twice because it is the simplest approach to 721 # changing $(DEPDIR) to its actual value in the expansion. 722 for file in `sed -n -e ' 723 /^DEP_FILES = .*\\\\$/ { 724 s/^DEP_FILES = // 725 :loop 726 s/\\\\$// 727 p 728 n 729 /\\\\$/ b loop 730 p 731 } 732 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 733 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 734 # Make sure the directory exists. 735 test -f "$dirpart/$file" && continue 736 fdir=`AS_DIRNAME(["$file"])` 737 AS_MKDIR_P([$dirpart/$fdir]) 738 # echo "creating $dirpart/$file" 739 echo '# dummy' > "$dirpart/$file" 740 done 741done 742])# _AM_OUTPUT_DEPENDENCY_COMMANDS 743 744 745# AM_OUTPUT_DEPENDENCY_COMMANDS 746# ----------------------------- 747# This macro should only be invoked once -- use via AC_REQUIRE. 748# 749# This code is only required when automatic dependency tracking 750# is enabled. FIXME. This creates each `.P' file that we will 751# need in order to bootstrap the dependency handling code. 752AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 753[AC_CONFIG_COMMANDS([depfiles], 754 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 755 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 756]) 757 758# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- 759 760# This program is free software; you can redistribute it and/or modify 761# it under the terms of the GNU General Public License as published by 762# the Free Software Foundation; either version 2, or (at your option) 763# any later version. 764 765# This program is distributed in the hope that it will be useful, 766# but WITHOUT ANY WARRANTY; without even the implied warranty of 767# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 768# GNU General Public License for more details. 769 770# You should have received a copy of the GNU General Public License 771# along with this program; if not, write to the Free Software 772# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 773# 02111-1307, USA. 774 775# serial 2 776 777# AM_MAKE_INCLUDE() 778# ----------------- 779# Check to see how make treats includes. 780AC_DEFUN([AM_MAKE_INCLUDE], 781[am_make=${MAKE-make} 782cat > confinc << 'END' 783doit: 784 @echo done 785END 786# If we don't find an include directive, just comment out the code. 787AC_MSG_CHECKING([for style of include used by $am_make]) 788am__include="#" 789am__quote= 790_am_result=none 791# First try GNU make style include. 792echo "include confinc" > confmf 793# We grep out `Entering directory' and `Leaving directory' 794# messages which can occur if `w' ends up in MAKEFLAGS. 795# In particular we don't look at `^make:' because GNU make might 796# be invoked under some other name (usually "gmake"), in which 797# case it prints its new name instead of `make'. 798if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then 799 am__include=include 800 am__quote= 801 _am_result=GNU 802fi 803# Now try BSD make style include. 804if test "$am__include" = "#"; then 805 echo '.include "confinc"' > confmf 806 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 807 am__include=.include 808 am__quote="\"" 809 _am_result=BSD 810 fi 811fi 812AC_SUBST(am__include) 813AC_SUBST(am__quote) 814AC_MSG_RESULT($_am_result) 815rm -f confinc confmf 816]) 817 818# AM_CONDITIONAL -*- Autoconf -*- 819 820# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 821 822# This program is free software; you can redistribute it and/or modify 823# it under the terms of the GNU General Public License as published by 824# the Free Software Foundation; either version 2, or (at your option) 825# any later version. 826 827# This program is distributed in the hope that it will be useful, 828# but WITHOUT ANY WARRANTY; without even the implied warranty of 829# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 830# GNU General Public License for more details. 831 832# You should have received a copy of the GNU General Public License 833# along with this program; if not, write to the Free Software 834# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 835# 02111-1307, USA. 836 837# serial 5 838 839AC_PREREQ(2.52) 840 841# AM_CONDITIONAL(NAME, SHELL-CONDITION) 842# ------------------------------------- 843# Define a conditional. 844AC_DEFUN([AM_CONDITIONAL], 845[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 846 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 847AC_SUBST([$1_TRUE]) 848AC_SUBST([$1_FALSE]) 849if $2; then 850 $1_TRUE= 851 $1_FALSE='#' 852else 853 $1_TRUE='#' 854 $1_FALSE= 855fi 856AC_CONFIG_COMMANDS_PRE( 857[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 858 AC_MSG_ERROR([conditional \"$1\" was never defined. 859Usually this means the macro was only invoked conditionally.]) 860fi])]) 861 862 863# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 864 865# This program is free software; you can redistribute it and/or modify 866# it under the terms of the GNU General Public License as published by 867# the Free Software Foundation; either version 2, or (at your option) 868# any later version. 869 870# This program is distributed in the hope that it will be useful, 871# but WITHOUT ANY WARRANTY; without even the implied warranty of 872# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 873# GNU General Public License for more details. 874 875# You should have received a copy of the GNU General Public License 876# along with this program; if not, write to the Free Software 877# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 878# 02111-1307, USA. 879 880# serial 3 881 882AC_PREREQ(2.50) 883 884# AM_PROG_LEX 885# ----------- 886# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a 887# "missing" invocation, for better error output. 888AC_DEFUN([AM_PROG_LEX], 889[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl 890AC_REQUIRE([AC_PROG_LEX])dnl 891if test "$LEX" = :; then 892 LEX=${am_missing_run}flex 893fi]) 894 895dnl $Id: krb-prog-ln-s.m4,v 1.1 1997/12/14 15:59:01 joda Exp $ 896dnl 897dnl 898dnl Better test for ln -s, ln or cp 899dnl 900 901AC_DEFUN(AC_KRB_PROG_LN_S, 902[AC_MSG_CHECKING(for ln -s or something else) 903AC_CACHE_VAL(ac_cv_prog_LN_S, 904[rm -f conftestdata 905if ln -s X conftestdata 2>/dev/null 906then 907 rm -f conftestdata 908 ac_cv_prog_LN_S="ln -s" 909else 910 touch conftestdata1 911 if ln conftestdata1 conftestdata2; then 912 rm -f conftestdata* 913 ac_cv_prog_LN_S=ln 914 else 915 ac_cv_prog_LN_S=cp 916 fi 917fi])dnl 918LN_S="$ac_cv_prog_LN_S" 919AC_MSG_RESULT($ac_cv_prog_LN_S) 920AC_SUBST(LN_S)dnl 921]) 922 923 924dnl $Id: mips-abi.m4,v 1.6 2002/04/30 16:46:05 joda Exp $ 925dnl 926dnl 927dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some 928dnl value. 929 930AC_DEFUN(AC_MIPS_ABI, [ 931AC_ARG_WITH(mips_abi, 932 AC_HELP_STRING([--with-mips-abi=abi],[ABI to use for IRIX (32, n32, or 64)])) 933 934case "$host_os" in 935irix*) 936with_mips_abi="${with_mips_abi:-yes}" 937if test -n "$GCC"; then 938 939# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select 940# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs. 941# 942# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old 943# GCC and revert back to O32. The same goes if O32 is asked for - old 944# GCCs doesn't like the -mabi option, and new GCCs can't output O32. 945# 946# Don't you just love *all* the different SGI ABIs? 947 948case "${with_mips_abi}" in 949 32|o32) abi='-mabi=32'; abilibdirext='' ;; 950 n32|yes) abi='-mabi=n32'; abilibdirext='32' ;; 951 64) abi='-mabi=64'; abilibdirext='64' ;; 952 no) abi=''; abilibdirext='';; 953 *) AC_MSG_ERROR("Invalid ABI specified") ;; 954esac 955if test -n "$abi" ; then 956ac_foo=krb_cv_gcc_`echo $abi | tr =- __` 957dnl 958dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to 959dnl AC_MSG_RESULT 960dnl 961AC_MSG_CHECKING([if $CC supports the $abi option]) 962AC_CACHE_VAL($ac_foo, [ 963save_CFLAGS="$CFLAGS" 964CFLAGS="$CFLAGS $abi" 965AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no) 966CFLAGS="$save_CFLAGS" 967]) 968ac_res=`eval echo \\\$$ac_foo` 969AC_MSG_RESULT($ac_res) 970if test $ac_res = no; then 971# Try to figure out why that failed... 972case $abi in 973 -mabi=32) 974 save_CFLAGS="$CFLAGS" 975 CFLAGS="$CFLAGS -mabi=n32" 976 AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no) 977 CLAGS="$save_CFLAGS" 978 if test $ac_res = yes; then 979 # New GCC 980 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI]) 981 fi 982 # Old GCC 983 abi='' 984 abilibdirext='' 985 ;; 986 -mabi=n32|-mabi=64) 987 if test $with_mips_abi = yes; then 988 # Old GCC, default to O32 989 abi='' 990 abilibdirext='' 991 else 992 # Some broken GCC 993 AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI]) 994 fi 995 ;; 996esac 997fi #if test $ac_res = no; then 998fi #if test -n "$abi" ; then 999else 1000case "${with_mips_abi}" in 1001 32|o32) abi='-32'; abilibdirext='' ;; 1002 n32|yes) abi='-n32'; abilibdirext='32' ;; 1003 64) abi='-64'; abilibdirext='64' ;; 1004 no) abi=''; abilibdirext='';; 1005 *) AC_MSG_ERROR("Invalid ABI specified") ;; 1006esac 1007fi #if test -n "$GCC"; then 1008;; 1009esac 1010]) 1011 1012dnl 1013dnl $Id: c-attribute.m4,v 1.2 1999/03/01 09:52:23 joda Exp $ 1014dnl 1015 1016dnl 1017dnl Test for __attribute__ 1018dnl 1019 1020AC_DEFUN(AC_C___ATTRIBUTE__, [ 1021AC_MSG_CHECKING(for __attribute__) 1022AC_CACHE_VAL(ac_cv___attribute__, [ 1023AC_TRY_COMPILE([ 1024#include <stdlib.h> 1025], 1026[ 1027static void foo(void) __attribute__ ((noreturn)); 1028 1029static void 1030foo(void) 1031{ 1032 exit(1); 1033} 1034], 1035ac_cv___attribute__=yes, 1036ac_cv___attribute__=no)]) 1037if test "$ac_cv___attribute__" = "yes"; then 1038 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) 1039fi 1040AC_MSG_RESULT($ac_cv___attribute__) 1041]) 1042 1043 1044# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- 1045 1046# serial 46 AC_PROG_LIBTOOL 1047 1048AC_DEFUN([AC_PROG_LIBTOOL], 1049[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 1050 1051# This can be used to rebuild libtool when needed 1052LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1053 1054# Always use our own libtool. 1055LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1056AC_SUBST(LIBTOOL)dnl 1057 1058# Prevent multiple expansion 1059define([AC_PROG_LIBTOOL], []) 1060]) 1061 1062AC_DEFUN([AC_LIBTOOL_SETUP], 1063[AC_PREREQ(2.13)dnl 1064AC_REQUIRE([AC_ENABLE_SHARED])dnl 1065AC_REQUIRE([AC_ENABLE_STATIC])dnl 1066AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 1067AC_REQUIRE([AC_CANONICAL_HOST])dnl 1068AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1069AC_REQUIRE([AC_PROG_CC])dnl 1070AC_REQUIRE([AC_PROG_LD])dnl 1071AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1072AC_REQUIRE([AC_PROG_NM])dnl 1073AC_REQUIRE([AC_PROG_LN_S])dnl 1074AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1075AC_REQUIRE([AC_OBJEXT])dnl 1076AC_REQUIRE([AC_EXEEXT])dnl 1077dnl 1078 1079_LT_AC_PROG_ECHO_BACKSLASH 1080# Only perform the check for file, if the check method requires it 1081case $deplibs_check_method in 1082file_magic*) 1083 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1084 AC_PATH_MAGIC 1085 fi 1086 ;; 1087esac 1088 1089AC_CHECK_TOOL(RANLIB, ranlib, :) 1090AC_CHECK_TOOL(STRIP, strip, :) 1091 1092ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 1093ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 1094enable_win32_dll=yes, enable_win32_dll=no) 1095 1096AC_ARG_ENABLE(libtool-lock, 1097 [ --disable-libtool-lock avoid locking (might break parallel builds)]) 1098test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1099 1100# Some flags need to be propagated to the compiler or linker for good 1101# libtool support. 1102case $host in 1103*-*-irix6*) 1104 # Find out which ABI we are using. 1105 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1106 if AC_TRY_EVAL(ac_compile); then 1107 case `/usr/bin/file conftest.$ac_objext` in 1108 *32-bit*) 1109 LD="${LD-ld} -32" 1110 ;; 1111 *N32*) 1112 LD="${LD-ld} -n32" 1113 ;; 1114 *64-bit*) 1115 LD="${LD-ld} -64" 1116 ;; 1117 esac 1118 fi 1119 rm -rf conftest* 1120 ;; 1121 1122*-*-sco3.2v5*) 1123 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1124 SAVE_CFLAGS="$CFLAGS" 1125 CFLAGS="$CFLAGS -belf" 1126 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1127 [AC_LANG_SAVE 1128 AC_LANG_C 1129 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1130 AC_LANG_RESTORE]) 1131 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1132 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1133 CFLAGS="$SAVE_CFLAGS" 1134 fi 1135 ;; 1136 1137ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 1138[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1139 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1140 AC_CHECK_TOOL(AS, as, false) 1141 AC_CHECK_TOOL(OBJDUMP, objdump, false) 1142 1143 # recent cygwin and mingw systems supply a stub DllMain which the user 1144 # can override, but on older systems we have to supply one 1145 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, 1146 [AC_TRY_LINK([], 1147 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); 1148 DllMain (0, 0, 0);], 1149 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) 1150 1151 case $host/$CC in 1152 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) 1153 # old mingw systems require "-dll" to link a DLL, while more recent ones 1154 # require "-mdll" 1155 SAVE_CFLAGS="$CFLAGS" 1156 CFLAGS="$CFLAGS -mdll" 1157 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, 1158 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) 1159 CFLAGS="$SAVE_CFLAGS" ;; 1160 *-*-cygwin* | *-*-pw32*) 1161 # cygwin systems need to pass --dll to the linker, and not link 1162 # crt.o which will require a WinMain@16 definition. 1163 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; 1164 esac 1165 ;; 1166 ]) 1167esac 1168 1169_LT_AC_LTCONFIG_HACK 1170 1171]) 1172 1173# AC_LIBTOOL_HEADER_ASSERT 1174# ------------------------ 1175AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], 1176[AC_CACHE_CHECK([whether $CC supports assert without backlinking], 1177 [lt_cv_func_assert_works], 1178 [case $host in 1179 *-*-solaris*) 1180 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then 1181 case `$CC --version 2>/dev/null` in 1182 [[12]].*) lt_cv_func_assert_works=no ;; 1183 *) lt_cv_func_assert_works=yes ;; 1184 esac 1185 fi 1186 ;; 1187 esac]) 1188 1189if test "x$lt_cv_func_assert_works" = xyes; then 1190 AC_CHECK_HEADERS(assert.h) 1191fi 1192])# AC_LIBTOOL_HEADER_ASSERT 1193 1194# _LT_AC_CHECK_DLFCN 1195# -------------------- 1196AC_DEFUN([_LT_AC_CHECK_DLFCN], 1197[AC_CHECK_HEADERS(dlfcn.h) 1198])# _LT_AC_CHECK_DLFCN 1199 1200# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1201# --------------------------------- 1202AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 1203[AC_REQUIRE([AC_CANONICAL_HOST]) 1204AC_REQUIRE([AC_PROG_NM]) 1205AC_REQUIRE([AC_OBJEXT]) 1206# Check for command to grab the raw symbol name followed by C symbol from nm. 1207AC_MSG_CHECKING([command to parse $NM output]) 1208AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl 1209 1210# These are sane defaults that work on at least a few old systems. 1211# [They come from Ultrix. What could be older than Ultrix?!! ;)] 1212 1213# Character class describing NM global symbol codes. 1214symcode='[[BCDEGRST]]' 1215 1216# Regexp to match symbols that can be accessed directly from C. 1217sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 1218 1219# Transform the above into a raw symbol and a C symbol. 1220symxfrm='\1 \2\3 \3' 1221 1222# Transform an extracted symbol line into a proper C declaration 1223lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" 1224 1225# Transform an extracted symbol line into symbol name and symbol address 1226lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 1227 1228# Define system-specific variables. 1229case $host_os in 1230aix*) 1231 symcode='[[BCDT]]' 1232 ;; 1233cygwin* | mingw* | pw32*) 1234 symcode='[[ABCDGISTW]]' 1235 ;; 1236hpux*) # Its linker distinguishes data from code symbols 1237 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 1238 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 1239 ;; 1240irix*) 1241 symcode='[[BCDEGRST]]' 1242 ;; 1243solaris* | sysv5*) 1244 symcode='[[BDT]]' 1245 ;; 1246sysv4) 1247 symcode='[[DFNSTU]]' 1248 ;; 1249esac 1250 1251# Handle CRLF in mingw tool chain 1252opt_cr= 1253case $host_os in 1254mingw*) 1255 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 1256 ;; 1257esac 1258 1259# If we're using GNU nm, then use its standard symbol codes. 1260if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then 1261 symcode='[[ABCDGISTW]]' 1262fi 1263 1264# Try without a prefix undercore, then with it. 1265for ac_symprfx in "" "_"; do 1266 1267 # Write the raw and C identifiers. 1268lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" 1269 1270 # Check to see that the pipe works correctly. 1271 pipe_works=no 1272 rm -f conftest* 1273 cat > conftest.$ac_ext <<EOF 1274#ifdef __cplusplus 1275extern "C" { 1276#endif 1277char nm_test_var; 1278void nm_test_func(){} 1279#ifdef __cplusplus 1280} 1281#endif 1282int main(){nm_test_var='a';nm_test_func();return(0);} 1283EOF 1284 1285 if AC_TRY_EVAL(ac_compile); then 1286 # Now try to grab the symbols. 1287 nlist=conftest.nm 1288 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 1289 # Try sorting and uniquifying the output. 1290 if sort "$nlist" | uniq > "$nlist"T; then 1291 mv -f "$nlist"T "$nlist" 1292 else 1293 rm -f "$nlist"T 1294 fi 1295 1296 # Make sure that we snagged all the symbols we need. 1297 if egrep ' nm_test_var$' "$nlist" >/dev/null; then 1298 if egrep ' nm_test_func$' "$nlist" >/dev/null; then 1299 cat <<EOF > conftest.$ac_ext 1300#ifdef __cplusplus 1301extern "C" { 1302#endif 1303 1304EOF 1305 # Now generate the symbol file. 1306 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' 1307 1308 cat <<EOF >> conftest.$ac_ext 1309#if defined (__STDC__) && __STDC__ 1310# define lt_ptr void * 1311#else 1312# define lt_ptr char * 1313# define const 1314#endif 1315 1316/* The mapping between symbol names and symbols. */ 1317const struct { 1318 const char *name; 1319 lt_ptr address; 1320} 1321lt_preloaded_symbols[[]] = 1322{ 1323EOF 1324 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext 1325 cat <<\EOF >> conftest.$ac_ext 1326 {0, (lt_ptr) 0} 1327}; 1328 1329#ifdef __cplusplus 1330} 1331#endif 1332EOF 1333 # Now try linking the two files. 1334 mv conftest.$ac_objext conftstm.$ac_objext 1335 save_LIBS="$LIBS" 1336 save_CFLAGS="$CFLAGS" 1337 LIBS="conftstm.$ac_objext" 1338 CFLAGS="$CFLAGS$no_builtin_flag" 1339 if AC_TRY_EVAL(ac_link) && test -s conftest; then 1340 pipe_works=yes 1341 fi 1342 LIBS="$save_LIBS" 1343 CFLAGS="$save_CFLAGS" 1344 else 1345 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC 1346 fi 1347 else 1348 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC 1349 fi 1350 else 1351 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC 1352 fi 1353 else 1354 echo "$progname: failed program was:" >&AC_FD_CC 1355 cat conftest.$ac_ext >&5 1356 fi 1357 rm -f conftest* conftst* 1358 1359 # Do not use the global_symbol_pipe unless it works. 1360 if test "$pipe_works" = yes; then 1361 break 1362 else 1363 lt_cv_sys_global_symbol_pipe= 1364 fi 1365done 1366]) 1367global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" 1368if test -z "$lt_cv_sys_global_symbol_pipe"; then 1369 global_symbol_to_cdecl= 1370 global_symbol_to_c_name_address= 1371else 1372 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" 1373 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" 1374fi 1375if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; 1376then 1377 AC_MSG_RESULT(failed) 1378else 1379 AC_MSG_RESULT(ok) 1380fi 1381]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1382 1383# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR 1384# --------------------------------- 1385AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], 1386[# Find the correct PATH separator. Usually this is `:', but 1387# DJGPP uses `;' like DOS. 1388if test "X${PATH_SEPARATOR+set}" != Xset; then 1389 UNAME=${UNAME-`uname 2>/dev/null`} 1390 case X$UNAME in 1391 *-DOS) lt_cv_sys_path_separator=';' ;; 1392 *) lt_cv_sys_path_separator=':' ;; 1393 esac 1394 PATH_SEPARATOR=$lt_cv_sys_path_separator 1395fi 1396])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR 1397 1398# _LT_AC_PROG_ECHO_BACKSLASH 1399# -------------------------- 1400# Add some code to the start of the generated configure script which 1401# will find an echo command which doesn't interpret backslashes. 1402AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 1403[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1404 [AC_DIVERT_PUSH(NOTICE)]) 1405_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR 1406 1407# Check that we are running under the correct shell. 1408SHELL=${CONFIG_SHELL-/bin/sh} 1409 1410case X$ECHO in 1411X*--fallback-echo) 1412 # Remove one level of quotation (which was required for Make). 1413 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1414 ;; 1415esac 1416 1417echo=${ECHO-echo} 1418if test "X[$]1" = X--no-reexec; then 1419 # Discard the --no-reexec flag, and continue. 1420 shift 1421elif test "X[$]1" = X--fallback-echo; then 1422 # Avoid inline document here, it may be left over 1423 : 1424elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 1425 # Yippee, $echo works! 1426 : 1427else 1428 # Restart under the correct shell. 1429 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1430fi 1431 1432if test "X[$]1" = X--fallback-echo; then 1433 # used as fallback echo 1434 shift 1435 cat <<EOF 1436$* 1437EOF 1438 exit 0 1439fi 1440 1441# The HP-UX ksh and POSIX shell print the target directory to stdout 1442# if CDPATH is set. 1443if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 1444 1445if test -z "$ECHO"; then 1446if test "X${echo_test_string+set}" != Xset; then 1447# find a string as large as possible, as long as the shell can cope with it 1448 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1449 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1450 if (echo_test_string="`eval $cmd`") 2>/dev/null && 1451 echo_test_string="`eval $cmd`" && 1452 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 1453 then 1454 break 1455 fi 1456 done 1457fi 1458 1459if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1460 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1461 test "X$echo_testing_string" = "X$echo_test_string"; then 1462 : 1463else 1464 # The Solaris, AIX, and Digital Unix default echo programs unquote 1465 # backslashes. This makes it impossible to quote backslashes using 1466 # echo "$something" | sed 's/\\/\\\\/g' 1467 # 1468 # So, first we look for a working echo in the user's PATH. 1469 1470 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1471 for dir in $PATH /usr/ucb; do 1472 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1473 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1474 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1475 test "X$echo_testing_string" = "X$echo_test_string"; then 1476 echo="$dir/echo" 1477 break 1478 fi 1479 done 1480 IFS="$save_ifs" 1481 1482 if test "X$echo" = Xecho; then 1483 # We didn't find a better echo, so look for alternatives. 1484 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 1485 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 1486 test "X$echo_testing_string" = "X$echo_test_string"; then 1487 # This shell has a builtin print -r that does the trick. 1488 echo='print -r' 1489 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 1490 test "X$CONFIG_SHELL" != X/bin/ksh; then 1491 # If we have ksh, try running configure again with it. 1492 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1493 export ORIGINAL_CONFIG_SHELL 1494 CONFIG_SHELL=/bin/ksh 1495 export CONFIG_SHELL 1496 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1497 else 1498 # Try using printf. 1499 echo='printf %s\n' 1500 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1501 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1502 test "X$echo_testing_string" = "X$echo_test_string"; then 1503 # Cool, printf works 1504 : 1505 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1506 test "X$echo_testing_string" = 'X\t' && 1507 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1508 test "X$echo_testing_string" = "X$echo_test_string"; then 1509 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1510 export CONFIG_SHELL 1511 SHELL="$CONFIG_SHELL" 1512 export SHELL 1513 echo="$CONFIG_SHELL [$]0 --fallback-echo" 1514 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1515 test "X$echo_testing_string" = 'X\t' && 1516 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1517 test "X$echo_testing_string" = "X$echo_test_string"; then 1518 echo="$CONFIG_SHELL [$]0 --fallback-echo" 1519 else 1520 # maybe with a smaller string... 1521 prev=: 1522 1523 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1524 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 1525 then 1526 break 1527 fi 1528 prev="$cmd" 1529 done 1530 1531 if test "$prev" != 'sed 50q "[$]0"'; then 1532 echo_test_string=`eval $prev` 1533 export echo_test_string 1534 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1535 else 1536 # Oops. We lost completely, so just stick with echo. 1537 echo=echo 1538 fi 1539 fi 1540 fi 1541 fi 1542fi 1543fi 1544 1545# Copy echo and quote the copy suitably for passing to libtool from 1546# the Makefile, instead of quoting the original, which is used later. 1547ECHO=$echo 1548if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1549 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1550fi 1551 1552AC_SUBST(ECHO) 1553AC_DIVERT_POP 1554])# _LT_AC_PROG_ECHO_BACKSLASH 1555 1556# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1557# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1558# ------------------------------------------------------------------ 1559AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 1560[if test "$cross_compiling" = yes; then : 1561 [$4] 1562else 1563 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1564 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1565 lt_status=$lt_dlunknown 1566 cat > conftest.$ac_ext <<EOF 1567[#line __oline__ "configure" 1568#include "confdefs.h" 1569 1570#if HAVE_DLFCN_H 1571#include <dlfcn.h> 1572#endif 1573 1574#include <stdio.h> 1575 1576#ifdef RTLD_GLOBAL 1577# define LT_DLGLOBAL RTLD_GLOBAL 1578#else 1579# ifdef DL_GLOBAL 1580# define LT_DLGLOBAL DL_GLOBAL 1581# else 1582# define LT_DLGLOBAL 0 1583# endif 1584#endif 1585 1586/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1587 find out it does not work in some platform. */ 1588#ifndef LT_DLLAZY_OR_NOW 1589# ifdef RTLD_LAZY 1590# define LT_DLLAZY_OR_NOW RTLD_LAZY 1591# else 1592# ifdef DL_LAZY 1593# define LT_DLLAZY_OR_NOW DL_LAZY 1594# else 1595# ifdef RTLD_NOW 1596# define LT_DLLAZY_OR_NOW RTLD_NOW 1597# else 1598# ifdef DL_NOW 1599# define LT_DLLAZY_OR_NOW DL_NOW 1600# else 1601# define LT_DLLAZY_OR_NOW 0 1602# endif 1603# endif 1604# endif 1605# endif 1606#endif 1607 1608#ifdef __cplusplus 1609extern "C" void exit (int); 1610#endif 1611 1612void fnord() { int i=42;} 1613int main () 1614{ 1615 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1616 int status = $lt_dlunknown; 1617 1618 if (self) 1619 { 1620 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1621 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1622 /* dlclose (self); */ 1623 } 1624 1625 exit (status); 1626}] 1627EOF 1628 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1629 (./conftest; exit; ) 2>/dev/null 1630 lt_status=$? 1631 case x$lt_status in 1632 x$lt_dlno_uscore) $1 ;; 1633 x$lt_dlneed_uscore) $2 ;; 1634 x$lt_unknown|x*) $3 ;; 1635 esac 1636 else : 1637 # compilation failed 1638 $3 1639 fi 1640fi 1641rm -fr conftest* 1642])# _LT_AC_TRY_DLOPEN_SELF 1643 1644# AC_LIBTOOL_DLOPEN_SELF 1645# ------------------- 1646AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1647[if test "x$enable_dlopen" != xyes; then 1648 enable_dlopen=unknown 1649 enable_dlopen_self=unknown 1650 enable_dlopen_self_static=unknown 1651else 1652 lt_cv_dlopen=no 1653 lt_cv_dlopen_libs= 1654 1655 case $host_os in 1656 beos*) 1657 lt_cv_dlopen="load_add_on" 1658 lt_cv_dlopen_libs= 1659 lt_cv_dlopen_self=yes 1660 ;; 1661 1662 cygwin* | mingw* | pw32*) 1663 lt_cv_dlopen="LoadLibrary" 1664 lt_cv_dlopen_libs= 1665 ;; 1666 1667 *) 1668 AC_CHECK_FUNC([shl_load], 1669 [lt_cv_dlopen="shl_load"], 1670 [AC_CHECK_LIB([dld], [shl_load], 1671 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 1672 [AC_CHECK_FUNC([dlopen], 1673 [lt_cv_dlopen="dlopen"], 1674 [AC_CHECK_LIB([dl], [dlopen], 1675 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1676 [AC_CHECK_LIB([svld], [dlopen], 1677 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1678 [AC_CHECK_LIB([dld], [dld_link], 1679 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 1680 ]) 1681 ]) 1682 ]) 1683 ]) 1684 ]) 1685 ;; 1686 esac 1687 1688 if test "x$lt_cv_dlopen" != xno; then 1689 enable_dlopen=yes 1690 else 1691 enable_dlopen=no 1692 fi 1693 1694 case $lt_cv_dlopen in 1695 dlopen) 1696 save_CPPFLAGS="$CPPFLAGS" 1697 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1698 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1699 1700 save_LDFLAGS="$LDFLAGS" 1701 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1702 1703 save_LIBS="$LIBS" 1704 LIBS="$lt_cv_dlopen_libs $LIBS" 1705 1706 AC_CACHE_CHECK([whether a program can dlopen itself], 1707 lt_cv_dlopen_self, [dnl 1708 _LT_AC_TRY_DLOPEN_SELF( 1709 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1710 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1711 ]) 1712 1713 if test "x$lt_cv_dlopen_self" = xyes; then 1714 LDFLAGS="$LDFLAGS $link_static_flag" 1715 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1716 lt_cv_dlopen_self_static, [dnl 1717 _LT_AC_TRY_DLOPEN_SELF( 1718 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1719 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1720 ]) 1721 fi 1722 1723 CPPFLAGS="$save_CPPFLAGS" 1724 LDFLAGS="$save_LDFLAGS" 1725 LIBS="$save_LIBS" 1726 ;; 1727 esac 1728 1729 case $lt_cv_dlopen_self in 1730 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1731 *) enable_dlopen_self=unknown ;; 1732 esac 1733 1734 case $lt_cv_dlopen_self_static in 1735 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1736 *) enable_dlopen_self_static=unknown ;; 1737 esac 1738fi 1739])# AC_LIBTOOL_DLOPEN_SELF 1740 1741AC_DEFUN([_LT_AC_LTCONFIG_HACK], 1742[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl 1743# Sed substitution that helps us do robust quoting. It backslashifies 1744# metacharacters that are still active within double-quoted strings. 1745Xsed='sed -e s/^X//' 1746sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' 1747 1748# Same as above, but do not quote variable references. 1749double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' 1750 1751# Sed substitution to delay expansion of an escaped shell variable in a 1752# double_quote_subst'ed string. 1753delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1754 1755# Constants: 1756rm="rm -f" 1757 1758# Global variables: 1759default_ofile=libtool 1760can_build_shared=yes 1761 1762# All known linkers require a `.a' archive for static linking (except M$VC, 1763# which needs '.lib'). 1764libext=a 1765ltmain="$ac_aux_dir/ltmain.sh" 1766ofile="$default_ofile" 1767with_gnu_ld="$lt_cv_prog_gnu_ld" 1768need_locks="$enable_libtool_lock" 1769 1770old_CC="$CC" 1771old_CFLAGS="$CFLAGS" 1772 1773# Set sane defaults for various variables 1774test -z "$AR" && AR=ar 1775test -z "$AR_FLAGS" && AR_FLAGS=cru 1776test -z "$AS" && AS=as 1777test -z "$CC" && CC=cc 1778test -z "$DLLTOOL" && DLLTOOL=dlltool 1779test -z "$LD" && LD=ld 1780test -z "$LN_S" && LN_S="ln -s" 1781test -z "$MAGIC_CMD" && MAGIC_CMD=file 1782test -z "$NM" && NM=nm 1783test -z "$OBJDUMP" && OBJDUMP=objdump 1784test -z "$RANLIB" && RANLIB=: 1785test -z "$STRIP" && STRIP=: 1786test -z "$ac_objext" && ac_objext=o 1787 1788if test x"$host" != x"$build"; then 1789 ac_tool_prefix=${host_alias}- 1790else 1791 ac_tool_prefix= 1792fi 1793 1794# Transform linux* to *-*-linux-gnu*, to support old configure scripts. 1795case $host_os in 1796linux-gnu*) ;; 1797linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` 1798esac 1799 1800case $host_os in 1801aix3*) 1802 # AIX sometimes has problems with the GCC collect2 program. For some 1803 # reason, if we set the COLLECT_NAMES environment variable, the problems 1804 # vanish in a puff of smoke. 1805 if test "X${COLLECT_NAMES+set}" != Xset; then 1806 COLLECT_NAMES= 1807 export COLLECT_NAMES 1808 fi 1809 ;; 1810esac 1811 1812# Determine commands to create old-style static archives. 1813old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1814old_postinstall_cmds='chmod 644 $oldlib' 1815old_postuninstall_cmds= 1816 1817if test -n "$RANLIB"; then 1818 case $host_os in 1819 openbsd*) 1820 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 1821 ;; 1822 *) 1823 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 1824 ;; 1825 esac 1826 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1827fi 1828 1829# Allow CC to be a program name with arguments. 1830set dummy $CC 1831compiler="[$]2" 1832 1833AC_MSG_CHECKING([for objdir]) 1834rm -f .libs 2>/dev/null 1835mkdir .libs 2>/dev/null 1836if test -d .libs; then 1837 objdir=.libs 1838else 1839 # MS-DOS does not allow filenames that begin with a dot. 1840 objdir=_libs 1841fi 1842rmdir .libs 2>/dev/null 1843AC_MSG_RESULT($objdir) 1844 1845 1846AC_ARG_WITH(pic, 1847[ --with-pic try to use only PIC/non-PIC objects [default=use both]], 1848pic_mode="$withval", pic_mode=default) 1849test -z "$pic_mode" && pic_mode=default 1850 1851# We assume here that the value for lt_cv_prog_cc_pic will not be cached 1852# in isolation, and that seeing it set (from the cache) indicates that 1853# the associated values are set (in the cache) correctly too. 1854AC_MSG_CHECKING([for $compiler option to produce PIC]) 1855AC_CACHE_VAL(lt_cv_prog_cc_pic, 1856[ lt_cv_prog_cc_pic= 1857 lt_cv_prog_cc_shlib= 1858 lt_cv_prog_cc_wl= 1859 lt_cv_prog_cc_static= 1860 lt_cv_prog_cc_no_builtin= 1861 lt_cv_prog_cc_can_build_shared=$can_build_shared 1862 1863 if test "$GCC" = yes; then 1864 lt_cv_prog_cc_wl='-Wl,' 1865 lt_cv_prog_cc_static='-static' 1866 1867 case $host_os in 1868 aix*) 1869 # Below there is a dirty hack to force normal static linking with -ldl 1870 # The problem is because libdl dynamically linked with both libc and 1871 # libC (AIX C++ library), which obviously doesn't included in libraries 1872 # list by gcc. This cause undefined symbols with -static flags. 1873 # This hack allows C programs to be linked with "-static -ldl", but 1874 # not sure about C++ programs. 1875 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" 1876 ;; 1877 amigaos*) 1878 # FIXME: we need at least 68020 code to build shared libraries, but 1879 # adding the `-m68020' flag to GCC prevents building anything better, 1880 # like `-m68040'. 1881 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' 1882 ;; 1883 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 1884 # PIC is the default for these OSes. 1885 ;; 1886 darwin* | rhapsody*) 1887 # PIC is the default on this platform 1888 # Common symbols not allowed in MH_DYLIB files 1889 lt_cv_prog_cc_pic='-fno-common' 1890 ;; 1891 cygwin* | mingw* | pw32* | os2*) 1892 # This hack is so that the source file can tell whether it is being 1893 # built for inclusion in a dll (and should export symbols for example). 1894 lt_cv_prog_cc_pic='-DDLL_EXPORT' 1895 ;; 1896 sysv4*MP*) 1897 if test -d /usr/nec; then 1898 lt_cv_prog_cc_pic=-Kconform_pic 1899 fi 1900 ;; 1901 *) 1902 lt_cv_prog_cc_pic='-fPIC' 1903 ;; 1904 esac 1905 else 1906 # PORTME Check for PIC flags for the system compiler. 1907 case $host_os in 1908 aix3* | aix4* | aix5*) 1909 lt_cv_prog_cc_wl='-Wl,' 1910 # All AIX code is PIC. 1911 if test "$host_cpu" = ia64; then 1912 # AIX 5 now supports IA64 processor 1913 lt_cv_prog_cc_static='-Bstatic' 1914 else 1915 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 1916 fi 1917 ;; 1918 1919 hpux9* | hpux10* | hpux11*) 1920 # Is there a better lt_cv_prog_cc_static that works with the bundled CC? 1921 lt_cv_prog_cc_wl='-Wl,' 1922 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" 1923 lt_cv_prog_cc_pic='+Z' 1924 ;; 1925 1926 irix5* | irix6*) 1927 lt_cv_prog_cc_wl='-Wl,' 1928 lt_cv_prog_cc_static='-non_shared' 1929 # PIC (with -KPIC) is the default. 1930 ;; 1931 1932 cygwin* | mingw* | pw32* | os2*) 1933 # This hack is so that the source file can tell whether it is being 1934 # built for inclusion in a dll (and should export symbols for example). 1935 lt_cv_prog_cc_pic='-DDLL_EXPORT' 1936 ;; 1937 1938 newsos6) 1939 lt_cv_prog_cc_pic='-KPIC' 1940 lt_cv_prog_cc_static='-Bstatic' 1941 ;; 1942 1943 osf3* | osf4* | osf5*) 1944 # All OSF/1 code is PIC. 1945 lt_cv_prog_cc_wl='-Wl,' 1946 lt_cv_prog_cc_static='-non_shared' 1947 ;; 1948 1949 sco3.2v5*) 1950 lt_cv_prog_cc_pic='-Kpic' 1951 lt_cv_prog_cc_static='-dn' 1952 lt_cv_prog_cc_shlib='-belf' 1953 ;; 1954 1955 solaris*) 1956 lt_cv_prog_cc_pic='-KPIC' 1957 lt_cv_prog_cc_static='-Bstatic' 1958 lt_cv_prog_cc_wl='-Wl,' 1959 ;; 1960 1961 sunos4*) 1962 lt_cv_prog_cc_pic='-PIC' 1963 lt_cv_prog_cc_static='-Bstatic' 1964 lt_cv_prog_cc_wl='-Qoption ld ' 1965 ;; 1966 1967 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 1968 lt_cv_prog_cc_pic='-KPIC' 1969 lt_cv_prog_cc_static='-Bstatic' 1970 if test "x$host_vendor" = xsni; then 1971 lt_cv_prog_cc_wl='-LD' 1972 else 1973 lt_cv_prog_cc_wl='-Wl,' 1974 fi 1975 ;; 1976 1977 uts4*) 1978 lt_cv_prog_cc_pic='-pic' 1979 lt_cv_prog_cc_static='-Bstatic' 1980 ;; 1981 1982 sysv4*MP*) 1983 if test -d /usr/nec ;then 1984 lt_cv_prog_cc_pic='-Kconform_pic' 1985 lt_cv_prog_cc_static='-Bstatic' 1986 fi 1987 ;; 1988 1989 *) 1990 lt_cv_prog_cc_can_build_shared=no 1991 ;; 1992 esac 1993 fi 1994]) 1995if test -z "$lt_cv_prog_cc_pic"; then 1996 AC_MSG_RESULT([none]) 1997else 1998 AC_MSG_RESULT([$lt_cv_prog_cc_pic]) 1999 2000 # Check to make sure the pic_flag actually works. 2001 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) 2002 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl 2003 save_CFLAGS="$CFLAGS" 2004 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" 2005 AC_TRY_COMPILE([], [], [dnl 2006 case $host_os in 2007 hpux9* | hpux10* | hpux11*) 2008 # On HP-UX, both CC and GCC only warn that PIC is supported... then 2009 # they create non-PIC objects. So, if there were any warnings, we 2010 # assume that PIC is not supported. 2011 if test -s conftest.err; then 2012 lt_cv_prog_cc_pic_works=no 2013 else 2014 lt_cv_prog_cc_pic_works=yes 2015 fi 2016 ;; 2017 *) 2018 lt_cv_prog_cc_pic_works=yes 2019 ;; 2020 esac 2021 ], [dnl 2022 lt_cv_prog_cc_pic_works=no 2023 ]) 2024 CFLAGS="$save_CFLAGS" 2025 ]) 2026 2027 if test "X$lt_cv_prog_cc_pic_works" = Xno; then 2028 lt_cv_prog_cc_pic= 2029 lt_cv_prog_cc_can_build_shared=no 2030 else 2031 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" 2032 fi 2033 2034 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) 2035fi 2036 2037# Check for any special shared library compilation flags. 2038if test -n "$lt_cv_prog_cc_shlib"; then 2039 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) 2040 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : 2041 else 2042 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) 2043 lt_cv_prog_cc_can_build_shared=no 2044 fi 2045fi 2046 2047AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) 2048AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl 2049 lt_cv_prog_cc_static_works=no 2050 save_LDFLAGS="$LDFLAGS" 2051 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" 2052 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) 2053 LDFLAGS="$save_LDFLAGS" 2054]) 2055 2056# Belt *and* braces to stop my trousers falling down: 2057test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= 2058AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) 2059 2060pic_flag="$lt_cv_prog_cc_pic" 2061special_shlib_compile_flags="$lt_cv_prog_cc_shlib" 2062wl="$lt_cv_prog_cc_wl" 2063link_static_flag="$lt_cv_prog_cc_static" 2064no_builtin_flag="$lt_cv_prog_cc_no_builtin" 2065can_build_shared="$lt_cv_prog_cc_can_build_shared" 2066 2067 2068# Check to see if options -o and -c are simultaneously supported by compiler 2069AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) 2070AC_CACHE_VAL([lt_cv_compiler_c_o], [ 2071$rm -r conftest 2>/dev/null 2072mkdir conftest 2073cd conftest 2074echo "int some_variable = 0;" > conftest.$ac_ext 2075mkdir out 2076# According to Tom Tromey, Ian Lance Taylor reported there are C compilers 2077# that will create temporary files in the current directory regardless of 2078# the output directory. Thus, making CWD read-only will cause this test 2079# to fail, enabling locking or at least warning the user not to do parallel 2080# builds. 2081chmod -w . 2082save_CFLAGS="$CFLAGS" 2083CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" 2084compiler_c_o=no 2085if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then 2086 # The compiler can only warn and ignore the option if not recognized 2087 # So say no if there are warnings 2088 if test -s out/conftest.err; then 2089 lt_cv_compiler_c_o=no 2090 else 2091 lt_cv_compiler_c_o=yes 2092 fi 2093else 2094 # Append any errors to the config.log. 2095 cat out/conftest.err 1>&AC_FD_CC 2096 lt_cv_compiler_c_o=no 2097fi 2098CFLAGS="$save_CFLAGS" 2099chmod u+w . 2100$rm conftest* out/* 2101rmdir out 2102cd .. 2103rmdir conftest 2104$rm -r conftest 2>/dev/null 2105]) 2106compiler_c_o=$lt_cv_compiler_c_o 2107AC_MSG_RESULT([$compiler_c_o]) 2108 2109if test x"$compiler_c_o" = x"yes"; then 2110 # Check to see if we can write to a .lo 2111 AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) 2112 AC_CACHE_VAL([lt_cv_compiler_o_lo], [ 2113 lt_cv_compiler_o_lo=no 2114 save_CFLAGS="$CFLAGS" 2115 CFLAGS="$CFLAGS -c -o conftest.lo" 2116 save_objext="$ac_objext" 2117 ac_objext=lo 2118 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl 2119 # The compiler can only warn and ignore the option if not recognized 2120 # So say no if there are warnings 2121 if test -s conftest.err; then 2122 lt_cv_compiler_o_lo=no 2123 else 2124 lt_cv_compiler_o_lo=yes 2125 fi 2126 ]) 2127 ac_objext="$save_objext" 2128 CFLAGS="$save_CFLAGS" 2129 ]) 2130 compiler_o_lo=$lt_cv_compiler_o_lo 2131 AC_MSG_RESULT([$compiler_o_lo]) 2132else 2133 compiler_o_lo=no 2134fi 2135 2136# Check to see if we can do hard links to lock some files if needed 2137hard_links="nottested" 2138if test "$compiler_c_o" = no && test "$need_locks" != no; then 2139 # do not overwrite the value of need_locks provided by the user 2140 AC_MSG_CHECKING([if we can lock with hard links]) 2141 hard_links=yes 2142 $rm conftest* 2143 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2144 touch conftest.a 2145 ln conftest.a conftest.b 2>&5 || hard_links=no 2146 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2147 AC_MSG_RESULT([$hard_links]) 2148 if test "$hard_links" = no; then 2149 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) 2150 need_locks=warn 2151 fi 2152else 2153 need_locks=no 2154fi 2155 2156if test "$GCC" = yes; then 2157 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler 2158 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) 2159 echo "int some_variable = 0;" > conftest.$ac_ext 2160 save_CFLAGS="$CFLAGS" 2161 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" 2162 compiler_rtti_exceptions=no 2163 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl 2164 # The compiler can only warn and ignore the option if not recognized 2165 # So say no if there are warnings 2166 if test -s conftest.err; then 2167 compiler_rtti_exceptions=no 2168 else 2169 compiler_rtti_exceptions=yes 2170 fi 2171 ]) 2172 CFLAGS="$save_CFLAGS" 2173 AC_MSG_RESULT([$compiler_rtti_exceptions]) 2174 2175 if test "$compiler_rtti_exceptions" = "yes"; then 2176 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' 2177 else 2178 no_builtin_flag=' -fno-builtin' 2179 fi 2180fi 2181 2182# See if the linker supports building shared libraries. 2183AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) 2184 2185allow_undefined_flag= 2186no_undefined_flag= 2187need_lib_prefix=unknown 2188need_version=unknown 2189# when you set need_version to no, make sure it does not cause -set_version 2190# flags to be left without arguments 2191archive_cmds= 2192archive_expsym_cmds= 2193old_archive_from_new_cmds= 2194old_archive_from_expsyms_cmds= 2195export_dynamic_flag_spec= 2196whole_archive_flag_spec= 2197thread_safe_flag_spec= 2198hardcode_into_libs=no 2199hardcode_libdir_flag_spec= 2200hardcode_libdir_separator= 2201hardcode_direct=no 2202hardcode_minus_L=no 2203hardcode_shlibpath_var=unsupported 2204runpath_var= 2205link_all_deplibs=unknown 2206always_export_symbols=no 2207export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' 2208# include_expsyms should be a list of space-separated symbols to be *always* 2209# included in the symbol list 2210include_expsyms= 2211# exclude_expsyms can be an egrep regular expression of symbols to exclude 2212# it will be wrapped by ` (' and `)$', so one must not match beginning or 2213# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 2214# as well as any symbol that contains `d'. 2215exclude_expsyms="_GLOBAL_OFFSET_TABLE_" 2216# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 2217# platforms (ab)use it in PIC code, but their linkers get confused if 2218# the symbol is explicitly referenced. Since portable code cannot 2219# rely on this symbol name, it's probably fine to never include it in 2220# preloaded symbol tables. 2221extract_expsyms_cmds= 2222 2223case $host_os in 2224cygwin* | mingw* | pw32*) 2225 # FIXME: the MSVC++ port hasn't been tested in a loooong time 2226 # When not using gcc, we currently assume that we are using 2227 # Microsoft Visual C++. 2228 if test "$GCC" != yes; then 2229 with_gnu_ld=no 2230 fi 2231 ;; 2232openbsd*) 2233 with_gnu_ld=no 2234 ;; 2235esac 2236 2237ld_shlibs=yes 2238if test "$with_gnu_ld" = yes; then 2239 # If archive_cmds runs LD, not CC, wlarc should be empty 2240 wlarc='${wl}' 2241 2242 # See if GNU ld supports shared libraries. 2243 case $host_os in 2244 aix3* | aix4* | aix5*) 2245 # On AIX, the GNU linker is very broken 2246 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. 2247 ld_shlibs=no 2248 cat <<EOF 1>&2 2249 2250*** Warning: the GNU linker, at least up to release 2.9.1, is reported 2251*** to be unable to reliably create shared libraries on AIX. 2252*** Therefore, libtool is disabling shared libraries support. If you 2253*** really care for shared libraries, you may want to modify your PATH 2254*** so that a non-GNU linker is found, and then restart. 2255 2256EOF 2257 ;; 2258 2259 amigaos*) 2260 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 2261 hardcode_libdir_flag_spec='-L$libdir' 2262 hardcode_minus_L=yes 2263 2264 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 2265 # that the semantics of dynamic libraries on AmigaOS, at least up 2266 # to version 4, is to share data among multiple programs linked 2267 # with the same dynamic library. Since this doesn't match the 2268 # behavior of shared libraries on other platforms, we can use 2269 # them. 2270 ld_shlibs=no 2271 ;; 2272 2273 beos*) 2274 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 2275 allow_undefined_flag=unsupported 2276 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 2277 # support --undefined. This deserves some investigation. FIXME 2278 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 2279 else 2280 ld_shlibs=no 2281 fi 2282 ;; 2283 2284 cygwin* | mingw* | pw32*) 2285 # hardcode_libdir_flag_spec is actually meaningless, as there is 2286 # no search path for DLLs. 2287 hardcode_libdir_flag_spec='-L$libdir' 2288 allow_undefined_flag=unsupported 2289 always_export_symbols=yes 2290 2291 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ 2292 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ 2293 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ 2294 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ 2295 else $CC -o impgen impgen.c ; fi)~ 2296 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' 2297 2298 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' 2299 2300 # cygwin and mingw dlls have different entry points and sets of symbols 2301 # to exclude. 2302 # FIXME: what about values for MSVC? 2303 dll_entry=__cygwin_dll_entry@12 2304 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ 2305 case $host_os in 2306 mingw*) 2307 # mingw values 2308 dll_entry=_DllMainCRTStartup@12 2309 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ 2310 ;; 2311 esac 2312 2313 # mingw and cygwin differ, and it's simplest to just exclude the union 2314 # of the two symbol sets. 2315 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 2316 2317 # recent cygwin and mingw systems supply a stub DllMain which the user 2318 # can override, but on older systems we have to supply one (in ltdll.c) 2319 if test "x$lt_cv_need_dllmain" = "xyes"; then 2320 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " 2321 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ 2322 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' 2323 else 2324 ltdll_obj= 2325 ltdll_cmds= 2326 fi 2327 2328 # Extract the symbol export list from an `--export-all' def file, 2329 # then regenerate the def file from the symbol export list, so that 2330 # the compiled dll only exports the symbol export list. 2331 # Be careful not to strip the DATA tag left be newer dlltools. 2332 export_symbols_cmds="$ltdll_cmds"' 2333 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ 2334 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' 2335 2336 # If the export-symbols file already is a .def file (1st line 2337 # is EXPORTS), use it as is. 2338 # If DATA tags from a recent dlltool are present, honour them! 2339 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then 2340 cp $export_symbols $output_objdir/$soname-def; 2341 else 2342 echo EXPORTS > $output_objdir/$soname-def; 2343 _lt_hint=1; 2344 cat $export_symbols | while read symbol; do 2345 set dummy \$symbol; 2346 case \[$]# in 2347 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 2348 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; 2349 esac; 2350 _lt_hint=`expr 1 + \$_lt_hint`; 2351 done; 2352 fi~ 2353 '"$ltdll_cmds"' 2354 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 2355 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ 2356 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 2357 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ 2358 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' 2359 ;; 2360 2361 netbsd*) 2362 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2363 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 2364 wlarc= 2365 else 2366 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 2367 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 2368 fi 2369 ;; 2370 2371 solaris* | sysv5*) 2372 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then 2373 ld_shlibs=no 2374 cat <<EOF 1>&2 2375 2376*** Warning: The releases 2.8.* of the GNU linker cannot reliably 2377*** create shared libraries on Solaris systems. Therefore, libtool 2378*** is disabling shared libraries support. We urge you to upgrade GNU 2379*** binutils to release 2.9.1 or newer. Another option is to modify 2380*** your PATH or compiler configuration so that the native linker is 2381*** used, and then restart. 2382 2383EOF 2384 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 2385 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 2386 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 2387 else 2388 ld_shlibs=no 2389 fi 2390 ;; 2391 2392 sunos4*) 2393 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 2394 wlarc= 2395 hardcode_direct=yes 2396 hardcode_shlibpath_var=no 2397 ;; 2398 2399 *) 2400 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 2401 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 2402 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 2403 else 2404 ld_shlibs=no 2405 fi 2406 ;; 2407 esac 2408 2409 if test "$ld_shlibs" = yes; then 2410 runpath_var=LD_RUN_PATH 2411 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' 2412 export_dynamic_flag_spec='${wl}--export-dynamic' 2413 case $host_os in 2414 cygwin* | mingw* | pw32*) 2415 # dlltool doesn't understand --whole-archive et. al. 2416 whole_archive_flag_spec= 2417 ;; 2418 *) 2419 # ancient GNU ld didn't support --whole-archive et. al. 2420 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then 2421 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 2422 else 2423 whole_archive_flag_spec= 2424 fi 2425 ;; 2426 esac 2427 fi 2428else 2429 # PORTME fill in a description of your system's linker (not GNU ld) 2430 case $host_os in 2431 aix3*) 2432 allow_undefined_flag=unsupported 2433 always_export_symbols=yes 2434 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 2435 # Note: this linker hardcodes the directories in LIBPATH if there 2436 # are no directories specified by -L. 2437 hardcode_minus_L=yes 2438 if test "$GCC" = yes && test -z "$link_static_flag"; then 2439 # Neither direct hardcoding nor static linking is supported with a 2440 # broken collect2. 2441 hardcode_direct=unsupported 2442 fi 2443 ;; 2444 2445 aix4* | aix5*) 2446 if test "$host_cpu" = ia64; then 2447 # On IA64, the linker does run time linking by default, so we don't 2448 # have to do anything special. 2449 aix_use_runtimelinking=no 2450 exp_sym_flag='-Bexport' 2451 no_entry_flag="" 2452 else 2453 aix_use_runtimelinking=no 2454 2455 # Test if we are trying to use run time linking or normal 2456 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 2457 # need to do runtime linking. 2458 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 2459 for ld_flag in $LDFLAGS; do 2460 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 2461 aix_use_runtimelinking=yes 2462 break 2463 fi 2464 done 2465 esac 2466 2467 exp_sym_flag='-bexport' 2468 no_entry_flag='-bnoentry' 2469 fi 2470 2471 # When large executables or shared objects are built, AIX ld can 2472 # have problems creating the table of contents. If linking a library 2473 # or program results in "error TOC overflow" add -mminimal-toc to 2474 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 2475 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 2476 2477 hardcode_direct=yes 2478 archive_cmds='' 2479 hardcode_libdir_separator=':' 2480 if test "$GCC" = yes; then 2481 case $host_os in aix4.[[012]]|aix4.[[012]].*) 2482 collect2name=`${CC} -print-prog-name=collect2` 2483 if test -f "$collect2name" && \ 2484 strings "$collect2name" | grep resolve_lib_name >/dev/null 2485 then 2486 # We have reworked collect2 2487 hardcode_direct=yes 2488 else 2489 # We have old collect2 2490 hardcode_direct=unsupported 2491 # It fails to find uninstalled libraries when the uninstalled 2492 # path is not listed in the libpath. Setting hardcode_minus_L 2493 # to unsupported forces relinking 2494 hardcode_minus_L=yes 2495 hardcode_libdir_flag_spec='-L$libdir' 2496 hardcode_libdir_separator= 2497 fi 2498 esac 2499 2500 shared_flag='-shared' 2501 else 2502 # not using gcc 2503 if test "$host_cpu" = ia64; then 2504 shared_flag='${wl}-G' 2505 else 2506 if test "$aix_use_runtimelinking" = yes; then 2507 shared_flag='${wl}-G' 2508 else 2509 shared_flag='${wl}-bM:SRE' 2510 fi 2511 fi 2512 fi 2513 2514 # It seems that -bexpall can do strange things, so it is better to 2515 # generate a list of symbols to export. 2516 always_export_symbols=yes 2517 if test "$aix_use_runtimelinking" = yes; then 2518 # Warning - without using the other runtime loading flags (-brtl), 2519 # -berok will link without error, but may produce a broken library. 2520 allow_undefined_flag='-berok' 2521 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 2522 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" 2523 else 2524 if test "$host_cpu" = ia64; then 2525 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 2526 allow_undefined_flag="-z nodefs" 2527 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 2528 else 2529 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' 2530 # Warning - without using the other run time loading flags, 2531 # -berok will link without error, but may produce a broken library. 2532 allow_undefined_flag='${wl}-berok' 2533 # This is a bit strange, but is similar to how AIX traditionally builds 2534 # it's shared libraries. 2535 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' 2536 fi 2537 fi 2538 ;; 2539 2540 amigaos*) 2541 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 2542 hardcode_libdir_flag_spec='-L$libdir' 2543 hardcode_minus_L=yes 2544 # see comment about different semantics on the GNU ld section 2545 ld_shlibs=no 2546 ;; 2547 2548 cygwin* | mingw* | pw32*) 2549 # When not using gcc, we currently assume that we are using 2550 # Microsoft Visual C++. 2551 # hardcode_libdir_flag_spec is actually meaningless, as there is 2552 # no search path for DLLs. 2553 hardcode_libdir_flag_spec=' ' 2554 allow_undefined_flag=unsupported 2555 # Tell ltmain to make .lib files, not .a files. 2556 libext=lib 2557 # FIXME: Setting linknames here is a bad hack. 2558 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 2559 # The linker will automatically build a .lib file if we build a DLL. 2560 old_archive_from_new_cmds='true' 2561 # FIXME: Should let the user specify the lib program. 2562 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' 2563 fix_srcfile_path='`cygpath -w "$srcfile"`' 2564 ;; 2565 2566 darwin* | rhapsody*) 2567 case "$host_os" in 2568 rhapsody* | darwin1.[[012]]) 2569 allow_undefined_flag='-undefined suppress' 2570 ;; 2571 *) # Darwin 1.3 on 2572 allow_undefined_flag='-flat_namespace -undefined suppress' 2573 ;; 2574 esac 2575 # FIXME: Relying on posixy $() will cause problems for 2576 # cross-compilation, but unfortunately the echo tests do not 2577 # yet detect zsh echo's removal of \ escapes. 2578 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' 2579 # We need to add '_' to the symbols in $export_symbols first 2580 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' 2581 hardcode_direct=yes 2582 hardcode_shlibpath_var=no 2583 whole_archive_flag_spec='-all_load $convenience' 2584 ;; 2585 2586 freebsd1*) 2587 ld_shlibs=no 2588 ;; 2589 2590 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 2591 # support. Future versions do this automatically, but an explicit c++rt0.o 2592 # does not break anything, and helps significantly (at the cost of a little 2593 # extra space). 2594 freebsd2.2*) 2595 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 2596 hardcode_libdir_flag_spec='-R$libdir' 2597 hardcode_direct=yes 2598 hardcode_shlibpath_var=no 2599 ;; 2600 2601 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 2602 freebsd2*) 2603 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 2604 hardcode_direct=yes 2605 hardcode_minus_L=yes 2606 hardcode_shlibpath_var=no 2607 ;; 2608 2609 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 2610 freebsd*) 2611 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 2612 hardcode_libdir_flag_spec='-R$libdir' 2613 hardcode_direct=yes 2614 hardcode_shlibpath_var=no 2615 ;; 2616 2617 hpux9* | hpux10* | hpux11*) 2618 case $host_os in 2619 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 2620 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; 2621 esac 2622 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 2623 hardcode_libdir_separator=: 2624 hardcode_direct=yes 2625 hardcode_minus_L=yes # Not in the search PATH, but as the default 2626 # location of the library. 2627 export_dynamic_flag_spec='${wl}-E' 2628 ;; 2629 2630 irix5* | irix6*) 2631 if test "$GCC" = yes; then 2632 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 2633 else 2634 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 2635 fi 2636 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 2637 hardcode_libdir_separator=: 2638 link_all_deplibs=yes 2639 ;; 2640 2641 netbsd*) 2642 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2643 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 2644 else 2645 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 2646 fi 2647 hardcode_libdir_flag_spec='-R$libdir' 2648 hardcode_direct=yes 2649 hardcode_shlibpath_var=no 2650 ;; 2651 2652 newsos6) 2653 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2654 hardcode_direct=yes 2655 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 2656 hardcode_libdir_separator=: 2657 hardcode_shlibpath_var=no 2658 ;; 2659 2660 openbsd*) 2661 hardcode_direct=yes 2662 hardcode_shlibpath_var=no 2663 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2664 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' 2665 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 2666 export_dynamic_flag_spec='${wl}-E' 2667 else 2668 case "$host_os" in 2669 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 2670 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 2671 hardcode_libdir_flag_spec='-R$libdir' 2672 ;; 2673 *) 2674 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' 2675 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 2676 ;; 2677 esac 2678 fi 2679 ;; 2680 2681 os2*) 2682 hardcode_libdir_flag_spec='-L$libdir' 2683 hardcode_minus_L=yes 2684 allow_undefined_flag=unsupported 2685 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 2686 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 2687 ;; 2688 2689 osf3*) 2690 if test "$GCC" = yes; then 2691 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 2692 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 2693 else 2694 allow_undefined_flag=' -expect_unresolved \*' 2695 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 2696 fi 2697 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 2698 hardcode_libdir_separator=: 2699 ;; 2700 2701 osf4* | osf5*) # as osf3* with the addition of -msym flag 2702 if test "$GCC" = yes; then 2703 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 2704 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 2705 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 2706 else 2707 allow_undefined_flag=' -expect_unresolved \*' 2708 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 2709 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 2710 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' 2711 2712 #Both c and cxx compiler support -rpath directly 2713 hardcode_libdir_flag_spec='-rpath $libdir' 2714 fi 2715 hardcode_libdir_separator=: 2716 ;; 2717 2718 sco3.2v5*) 2719 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2720 hardcode_shlibpath_var=no 2721 runpath_var=LD_RUN_PATH 2722 hardcode_runpath_var=yes 2723 export_dynamic_flag_spec='${wl}-Bexport' 2724 ;; 2725 2726 solaris*) 2727 # gcc --version < 3.0 without binutils cannot create self contained 2728 # shared libraries reliably, requiring libgcc.a to resolve some of 2729 # the object symbols generated in some cases. Libraries that use 2730 # assert need libgcc.a to resolve __eprintf, for example. Linking 2731 # a copy of libgcc.a into every shared library to guarantee resolving 2732 # such symbols causes other problems: According to Tim Van Holder 2733 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate 2734 # (to the application) exception stack for one thing. 2735 no_undefined_flag=' -z defs' 2736 if test "$GCC" = yes; then 2737 case `$CC --version 2>/dev/null` in 2738 [[12]].*) 2739 cat <<EOF 1>&2 2740 2741*** Warning: Releases of GCC earlier than version 3.0 cannot reliably 2742*** create self contained shared libraries on Solaris systems, without 2743*** introducing a dependency on libgcc.a. Therefore, libtool is disabling 2744*** -no-undefined support, which will at least allow you to build shared 2745*** libraries. However, you may find that when you link such libraries 2746*** into an application without using GCC, you have to manually add 2747*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to 2748*** upgrade to a newer version of GCC. Another option is to rebuild your 2749*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. 2750 2751EOF 2752 no_undefined_flag= 2753 ;; 2754 esac 2755 fi 2756 # $CC -shared without GNU ld will not create a library from C++ 2757 # object files and a static libstdc++, better avoid it by now 2758 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 2759 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 2760 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 2761 hardcode_libdir_flag_spec='-R$libdir' 2762 hardcode_shlibpath_var=no 2763 case $host_os in 2764 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 2765 *) # Supported since Solaris 2.6 (maybe 2.5.1?) 2766 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; 2767 esac 2768 link_all_deplibs=yes 2769 ;; 2770 2771 sunos4*) 2772 if test "x$host_vendor" = xsequent; then 2773 # Use $CC to link under sequent, because it throws in some extra .o 2774 # files that make .init and .fini sections work. 2775 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 2776 else 2777 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 2778 fi 2779 hardcode_libdir_flag_spec='-L$libdir' 2780 hardcode_direct=yes 2781 hardcode_minus_L=yes 2782 hardcode_shlibpath_var=no 2783 ;; 2784 2785 sysv4) 2786 if test "x$host_vendor" = xsno; then 2787 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' 2788 hardcode_direct=yes # is this really true??? 2789 else 2790 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2791 hardcode_direct=no #Motorola manual says yes, but my tests say they lie 2792 fi 2793 runpath_var='LD_RUN_PATH' 2794 hardcode_shlibpath_var=no 2795 ;; 2796 2797 sysv4.3*) 2798 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2799 hardcode_shlibpath_var=no 2800 export_dynamic_flag_spec='-Bexport' 2801 ;; 2802 2803 sysv5*) 2804 no_undefined_flag=' -z text' 2805 # $CC -shared without GNU ld will not create a library from C++ 2806 # object files and a static libstdc++, better avoid it by now 2807 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 2808 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 2809 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 2810 hardcode_libdir_flag_spec= 2811 hardcode_shlibpath_var=no 2812 runpath_var='LD_RUN_PATH' 2813 ;; 2814 2815 uts4*) 2816 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2817 hardcode_libdir_flag_spec='-L$libdir' 2818 hardcode_shlibpath_var=no 2819 ;; 2820 2821 dgux*) 2822 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2823 hardcode_libdir_flag_spec='-L$libdir' 2824 hardcode_shlibpath_var=no 2825 ;; 2826 2827 sysv4*MP*) 2828 if test -d /usr/nec; then 2829 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 2830 hardcode_shlibpath_var=no 2831 runpath_var=LD_RUN_PATH 2832 hardcode_runpath_var=yes 2833 ld_shlibs=yes 2834 fi 2835 ;; 2836 2837 sysv4.2uw2*) 2838 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' 2839 hardcode_direct=yes 2840 hardcode_minus_L=no 2841 hardcode_shlibpath_var=no 2842 hardcode_runpath_var=yes 2843 runpath_var=LD_RUN_PATH 2844 ;; 2845 2846 sysv5uw7* | unixware7*) 2847 no_undefined_flag='${wl}-z ${wl}text' 2848 if test "$GCC" = yes; then 2849 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 2850 else 2851 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 2852 fi 2853 runpath_var='LD_RUN_PATH' 2854 hardcode_shlibpath_var=no 2855 ;; 2856 2857 *) 2858 ld_shlibs=no 2859 ;; 2860 esac 2861fi 2862AC_MSG_RESULT([$ld_shlibs]) 2863test "$ld_shlibs" = no && can_build_shared=no 2864 2865# Check hardcoding attributes. 2866AC_MSG_CHECKING([how to hardcode library paths into programs]) 2867hardcode_action= 2868if test -n "$hardcode_libdir_flag_spec" || \ 2869 test -n "$runpath_var"; then 2870 2871 # We can hardcode non-existant directories. 2872 if test "$hardcode_direct" != no && 2873 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2874 # have to relink, otherwise we might link with an installed library 2875 # when we should be linking with a yet-to-be-installed one 2876 ## test "$hardcode_shlibpath_var" != no && 2877 test "$hardcode_minus_L" != no; then 2878 # Linking always hardcodes the temporary library directory. 2879 hardcode_action=relink 2880 else 2881 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2882 hardcode_action=immediate 2883 fi 2884else 2885 # We cannot hardcode anything, or else we can only hardcode existing 2886 # directories. 2887 hardcode_action=unsupported 2888fi 2889AC_MSG_RESULT([$hardcode_action]) 2890 2891striplib= 2892old_striplib= 2893AC_MSG_CHECKING([whether stripping libraries is possible]) 2894if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2895 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2896 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2897 AC_MSG_RESULT([yes]) 2898else 2899 AC_MSG_RESULT([no]) 2900fi 2901 2902reload_cmds='$LD$reload_flag -o $output$reload_objs' 2903test -z "$deplibs_check_method" && deplibs_check_method=unknown 2904 2905# PORTME Fill in your ld.so characteristics 2906AC_MSG_CHECKING([dynamic linker characteristics]) 2907library_names_spec= 2908libname_spec='lib$name' 2909soname_spec= 2910postinstall_cmds= 2911postuninstall_cmds= 2912finish_cmds= 2913finish_eval= 2914shlibpath_var= 2915shlibpath_overrides_runpath=unknown 2916version_type=none 2917dynamic_linker="$host_os ld.so" 2918sys_lib_dlsearch_path_spec="/lib /usr/lib" 2919sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2920 2921case $host_os in 2922aix3*) 2923 version_type=linux 2924 library_names_spec='${libname}${release}.so$versuffix $libname.a' 2925 shlibpath_var=LIBPATH 2926 2927 # AIX has no versioning support, so we append a major version to the name. 2928 soname_spec='${libname}${release}.so$major' 2929 ;; 2930 2931aix4* | aix5*) 2932 version_type=linux 2933 if test "$host_cpu" = ia64; then 2934 # AIX 5 supports IA64 2935 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' 2936 shlibpath_var=LD_LIBRARY_PATH 2937 else 2938 # With GCC up to 2.95.x, collect2 would create an import file 2939 # for dependence libraries. The import file would start with 2940 # the line `#! .'. This would cause the generated library to 2941 # depend on `.', always an invalid library. This was fixed in 2942 # development snapshots of GCC prior to 3.0. 2943 case $host_os in 2944 aix4 | aix4.[[01]] | aix4.[[01]].*) 2945 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2946 echo ' yes ' 2947 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2948 : 2949 else 2950 can_build_shared=no 2951 fi 2952 ;; 2953 esac 2954 # AIX (on Power*) has no versioning support, so currently we can 2955 # not hardcode correct soname into executable. Probably we can 2956 # add versioning support to collect2, so additional links can 2957 # be useful in future. 2958 if test "$aix_use_runtimelinking" = yes; then 2959 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2960 # instead of lib<name>.a to let people know that these are not 2961 # typical AIX shared libraries. 2962 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 2963 else 2964 # We preserve .a as extension for shared libraries through AIX4.2 2965 # and later when we are not doing run time linking. 2966 library_names_spec='${libname}${release}.a $libname.a' 2967 soname_spec='${libname}${release}.so$major' 2968 fi 2969 shlibpath_var=LIBPATH 2970 fi 2971 ;; 2972 2973amigaos*) 2974 library_names_spec='$libname.ixlibrary $libname.a' 2975 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2976 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' 2977 ;; 2978 2979beos*) 2980 library_names_spec='${libname}.so' 2981 dynamic_linker="$host_os ld.so" 2982 shlibpath_var=LIBRARY_PATH 2983 ;; 2984 2985bsdi4*) 2986 version_type=linux 2987 need_version=no 2988 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 2989 soname_spec='${libname}${release}.so$major' 2990 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2991 shlibpath_var=LD_LIBRARY_PATH 2992 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2993 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2994 export_dynamic_flag_spec=-rdynamic 2995 # the default ld.so.conf also contains /usr/contrib/lib and 2996 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2997 # libtool to hard-code these into programs 2998 ;; 2999 3000cygwin* | mingw* | pw32*) 3001 version_type=windows 3002 need_version=no 3003 need_lib_prefix=no 3004 case $GCC,$host_os in 3005 yes,cygwin*) 3006 library_names_spec='$libname.dll.a' 3007 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' 3008 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ 3009 dldir=$destdir/`dirname \$dlpath`~ 3010 test -d \$dldir || mkdir -p \$dldir~ 3011 $install_prog .libs/$dlname \$dldir/$dlname' 3012 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3013 dlpath=$dir/\$dldll~ 3014 $rm \$dlpath' 3015 ;; 3016 yes,mingw*) 3017 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' 3018 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` 3019 ;; 3020 yes,pw32*) 3021 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 3022 ;; 3023 *) 3024 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' 3025 ;; 3026 esac 3027 dynamic_linker='Win32 ld.exe' 3028 # FIXME: first we should search . and the directory the executable is in 3029 shlibpath_var=PATH 3030 ;; 3031 3032darwin* | rhapsody*) 3033 dynamic_linker="$host_os dyld" 3034 version_type=darwin 3035 need_lib_prefix=no 3036 need_version=no 3037 # FIXME: Relying on posixy $() will cause problems for 3038 # cross-compilation, but unfortunately the echo tests do not 3039 # yet detect zsh echo's removal of \ escapes. 3040 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' 3041 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' 3042 shlibpath_overrides_runpath=yes 3043 shlibpath_var=DYLD_LIBRARY_PATH 3044 ;; 3045 3046freebsd1*) 3047 dynamic_linker=no 3048 ;; 3049 3050freebsd*) 3051 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 3052 version_type=freebsd-$objformat 3053 case $version_type in 3054 freebsd-elf*) 3055 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 3056 need_version=no 3057 need_lib_prefix=no 3058 ;; 3059 freebsd-*) 3060 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' 3061 need_version=yes 3062 ;; 3063 esac 3064 shlibpath_var=LD_LIBRARY_PATH 3065 case $host_os in 3066 freebsd2*) 3067 shlibpath_overrides_runpath=yes 3068 ;; 3069 *) 3070 shlibpath_overrides_runpath=no 3071 hardcode_into_libs=yes 3072 ;; 3073 esac 3074 ;; 3075 3076gnu*) 3077 version_type=linux 3078 need_lib_prefix=no 3079 need_version=no 3080 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' 3081 soname_spec='${libname}${release}.so$major' 3082 shlibpath_var=LD_LIBRARY_PATH 3083 hardcode_into_libs=yes 3084 ;; 3085 3086hpux9* | hpux10* | hpux11*) 3087 # Give a soname corresponding to the major version so that dld.sl refuses to 3088 # link against other versions. 3089 dynamic_linker="$host_os dld.sl" 3090 version_type=sunos 3091 need_lib_prefix=no 3092 need_version=no 3093 shlibpath_var=SHLIB_PATH 3094 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3095 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 3096 soname_spec='${libname}${release}.sl$major' 3097 # HP-UX runs *really* slowly unless shared libraries are mode 555. 3098 postinstall_cmds='chmod 555 $lib' 3099 ;; 3100 3101irix5* | irix6*) 3102 version_type=irix 3103 need_lib_prefix=no 3104 need_version=no 3105 soname_spec='${libname}${release}.so$major' 3106 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' 3107 case $host_os in 3108 irix5*) 3109 libsuff= shlibsuff= 3110 ;; 3111 *) 3112 case $LD in # libtool.m4 will add one of these switches to LD 3113 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; 3114 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; 3115 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; 3116 *) libsuff= shlibsuff= libmagic=never-match;; 3117 esac 3118 ;; 3119 esac 3120 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3121 shlibpath_overrides_runpath=no 3122 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3123 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3124 ;; 3125 3126# No shared lib support for Linux oldld, aout, or coff. 3127linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) 3128 dynamic_linker=no 3129 ;; 3130 3131# This must be Linux ELF. 3132linux-gnu*) 3133 version_type=linux 3134 need_lib_prefix=no 3135 need_version=no 3136 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3137 soname_spec='${libname}${release}.so$major' 3138 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3139 shlibpath_var=LD_LIBRARY_PATH 3140 shlibpath_overrides_runpath=no 3141 # This implies no fast_install, which is unacceptable. 3142 # Some rework will be needed to allow for fast_install 3143 # before this can be enabled. 3144 hardcode_into_libs=yes 3145 3146 # We used to test for /lib/ld.so.1 and disable shared libraries on 3147 # powerpc, because MkLinux only supported shared libraries with the 3148 # GNU dynamic linker. Since this was broken with cross compilers, 3149 # most powerpc-linux boxes support dynamic linking these days and 3150 # people can always --disable-shared, the test was removed, and we 3151 # assume the GNU/Linux dynamic linker is in use. 3152 dynamic_linker='GNU/Linux ld.so' 3153 ;; 3154 3155netbsd*) 3156 version_type=sunos 3157 need_lib_prefix=no 3158 need_version=no 3159 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3160 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 3161 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3162 dynamic_linker='NetBSD (a.out) ld.so' 3163 else 3164 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' 3165 soname_spec='${libname}${release}.so$major' 3166 dynamic_linker='NetBSD ld.elf_so' 3167 fi 3168 shlibpath_var=LD_LIBRARY_PATH 3169 shlibpath_overrides_runpath=yes 3170 hardcode_into_libs=yes 3171 ;; 3172 3173newsos6) 3174 version_type=linux 3175 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3176 shlibpath_var=LD_LIBRARY_PATH 3177 shlibpath_overrides_runpath=yes 3178 ;; 3179 3180openbsd*) 3181 version_type=sunos 3182 need_lib_prefix=no 3183 need_version=no 3184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3185 case "$host_os" in 3186 openbsd2.[[89]] | openbsd2.[[89]].*) 3187 shlibpath_overrides_runpath=no 3188 ;; 3189 *) 3190 shlibpath_overrides_runpath=yes 3191 ;; 3192 esac 3193 else 3194 shlibpath_overrides_runpath=yes 3195 fi 3196 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 3197 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3198 shlibpath_var=LD_LIBRARY_PATH 3199 ;; 3200 3201os2*) 3202 libname_spec='$name' 3203 need_lib_prefix=no 3204 library_names_spec='$libname.dll $libname.a' 3205 dynamic_linker='OS/2 ld.exe' 3206 shlibpath_var=LIBPATH 3207 ;; 3208 3209osf3* | osf4* | osf5*) 3210 version_type=osf 3211 need_version=no 3212 soname_spec='${libname}${release}.so' 3213 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 3214 shlibpath_var=LD_LIBRARY_PATH 3215 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3216 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3217 ;; 3218 3219sco3.2v5*) 3220 version_type=osf 3221 soname_spec='${libname}${release}.so$major' 3222 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3223 shlibpath_var=LD_LIBRARY_PATH 3224 ;; 3225 3226solaris*) 3227 version_type=linux 3228 need_lib_prefix=no 3229 need_version=no 3230 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3231 soname_spec='${libname}${release}.so$major' 3232 shlibpath_var=LD_LIBRARY_PATH 3233 shlibpath_overrides_runpath=yes 3234 hardcode_into_libs=yes 3235 # ldd complains unless libraries are executable 3236 postinstall_cmds='chmod +x $lib' 3237 ;; 3238 3239sunos4*) 3240 version_type=sunos 3241 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 3242 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3243 shlibpath_var=LD_LIBRARY_PATH 3244 shlibpath_overrides_runpath=yes 3245 if test "$with_gnu_ld" = yes; then 3246 need_lib_prefix=no 3247 fi 3248 need_version=yes 3249 ;; 3250 3251sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 3252 version_type=linux 3253 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3254 soname_spec='${libname}${release}.so$major' 3255 shlibpath_var=LD_LIBRARY_PATH 3256 case $host_vendor in 3257 sni) 3258 shlibpath_overrides_runpath=no 3259 ;; 3260 motorola) 3261 need_lib_prefix=no 3262 need_version=no 3263 shlibpath_overrides_runpath=no 3264 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3265 ;; 3266 esac 3267 ;; 3268 3269uts4*) 3270 version_type=linux 3271 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3272 soname_spec='${libname}${release}.so$major' 3273 shlibpath_var=LD_LIBRARY_PATH 3274 ;; 3275 3276dgux*) 3277 version_type=linux 3278 need_lib_prefix=no 3279 need_version=no 3280 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 3281 soname_spec='${libname}${release}.so$major' 3282 shlibpath_var=LD_LIBRARY_PATH 3283 ;; 3284 3285sysv4*MP*) 3286 if test -d /usr/nec ;then 3287 version_type=linux 3288 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' 3289 soname_spec='$libname.so.$major' 3290 shlibpath_var=LD_LIBRARY_PATH 3291 fi 3292 ;; 3293 3294*) 3295 dynamic_linker=no 3296 ;; 3297esac 3298AC_MSG_RESULT([$dynamic_linker]) 3299test "$dynamic_linker" = no && can_build_shared=no 3300 3301# Report the final consequences. 3302AC_MSG_CHECKING([if libtool supports shared libraries]) 3303AC_MSG_RESULT([$can_build_shared]) 3304 3305AC_MSG_CHECKING([whether to build shared libraries]) 3306test "$can_build_shared" = "no" && enable_shared=no 3307 3308# On AIX, shared libraries and static libraries use the same namespace, and 3309# are all built from PIC. 3310case "$host_os" in 3311aix3*) 3312 test "$enable_shared" = yes && enable_static=no 3313 if test -n "$RANLIB"; then 3314 archive_cmds="$archive_cmds~\$RANLIB \$lib" 3315 postinstall_cmds='$RANLIB $lib' 3316 fi 3317 ;; 3318 3319aix4*) 3320 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3321 test "$enable_shared" = yes && enable_static=no 3322 fi 3323 ;; 3324esac 3325AC_MSG_RESULT([$enable_shared]) 3326 3327AC_MSG_CHECKING([whether to build static libraries]) 3328# Make sure either enable_shared or enable_static is yes. 3329test "$enable_shared" = yes || enable_static=yes 3330AC_MSG_RESULT([$enable_static]) 3331 3332if test "$hardcode_action" = relink; then 3333 # Fast installation is not supported 3334 enable_fast_install=no 3335elif test "$shlibpath_overrides_runpath" = yes || 3336 test "$enable_shared" = no; then 3337 # Fast installation is not necessary 3338 enable_fast_install=needless 3339fi 3340 3341variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3342if test "$GCC" = yes; then 3343 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3344fi 3345 3346AC_LIBTOOL_DLOPEN_SELF 3347 3348if test "$enable_shared" = yes && test "$GCC" = yes; then 3349 case $archive_cmds in 3350 *'~'*) 3351 # FIXME: we may have to deal with multi-command sequences. 3352 ;; 3353 '$CC '*) 3354 # Test whether the compiler implicitly links with -lc since on some 3355 # systems, -lgcc has to come before -lc. If gcc already passes -lc 3356 # to ld, don't add -lc before -lgcc. 3357 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 3358 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], 3359 [$rm conftest* 3360 echo 'static int dummy;' > conftest.$ac_ext 3361 3362 if AC_TRY_EVAL(ac_compile); then 3363 soname=conftest 3364 lib=conftest 3365 libobjs=conftest.$ac_objext 3366 deplibs= 3367 wl=$lt_cv_prog_cc_wl 3368 compiler_flags=-v 3369 linker_flags=-v 3370 verstring= 3371 output_objdir=. 3372 libname=conftest 3373 save_allow_undefined_flag=$allow_undefined_flag 3374 allow_undefined_flag= 3375 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 3376 then 3377 lt_cv_archive_cmds_need_lc=no 3378 else 3379 lt_cv_archive_cmds_need_lc=yes 3380 fi 3381 allow_undefined_flag=$save_allow_undefined_flag 3382 else 3383 cat conftest.err 1>&5 3384 fi]) 3385 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) 3386 ;; 3387 esac 3388fi 3389need_lc=${lt_cv_archive_cmds_need_lc-yes} 3390 3391# The second clause should only fire when bootstrapping the 3392# libtool distribution, otherwise you forgot to ship ltmain.sh 3393# with your package, and you will get complaints that there are 3394# no rules to generate ltmain.sh. 3395if test -f "$ltmain"; then 3396 : 3397else 3398 # If there is no Makefile yet, we rely on a make rule to execute 3399 # `config.status --recheck' to rerun these tests and create the 3400 # libtool script then. 3401 test -f Makefile && make "$ltmain" 3402fi 3403 3404if test -f "$ltmain"; then 3405 trap "$rm \"${ofile}T\"; exit 1" 1 2 15 3406 $rm -f "${ofile}T" 3407 3408 echo creating $ofile 3409 3410 # Now quote all the things that may contain metacharacters while being 3411 # careful not to overquote the AC_SUBSTed values. We take copies of the 3412 # variables and quote the copies for generation of the libtool script. 3413 for var in echo old_CC old_CFLAGS \ 3414 AR AR_FLAGS CC LD LN_S NM SHELL \ 3415 reload_flag reload_cmds wl \ 3416 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ 3417 thread_safe_flag_spec whole_archive_flag_spec libname_spec \ 3418 library_names_spec soname_spec \ 3419 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ 3420 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ 3421 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ 3422 old_striplib striplib file_magic_cmd export_symbols_cmds \ 3423 deplibs_check_method allow_undefined_flag no_undefined_flag \ 3424 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ 3425 global_symbol_to_c_name_address \ 3426 hardcode_libdir_flag_spec hardcode_libdir_separator \ 3427 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 3428 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do 3429 3430 case $var in 3431 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ 3432 old_postinstall_cmds | old_postuninstall_cmds | \ 3433 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ 3434 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ 3435 postinstall_cmds | postuninstall_cmds | \ 3436 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 3437 # Double-quote double-evaled strings. 3438 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 3439 ;; 3440 *) 3441 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 3442 ;; 3443 esac 3444 done 3445 3446 cat <<__EOF__ > "${ofile}T" 3447#! $SHELL 3448 3449# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3450# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 3451# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3452# 3453# Copyright (C) 1996-2000 Free Software Foundation, Inc. 3454# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 3455# 3456# This program is free software; you can redistribute it and/or modify 3457# it under the terms of the GNU General Public License as published by 3458# the Free Software Foundation; either version 2 of the License, or 3459# (at your option) any later version. 3460# 3461# This program is distributed in the hope that it will be useful, but 3462# WITHOUT ANY WARRANTY; without even the implied warranty of 3463# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3464# General Public License for more details. 3465# 3466# You should have received a copy of the GNU General Public License 3467# along with this program; if not, write to the Free Software 3468# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3469# 3470# As a special exception to the GNU General Public License, if you 3471# distribute this file as part of a program that contains a 3472# configuration script generated by Autoconf, you may include it under 3473# the same distribution terms that you use for the rest of that program. 3474 3475# Sed that helps us avoid accidentally triggering echo(1) options like -n. 3476Xsed="sed -e s/^X//" 3477 3478# The HP-UX ksh and POSIX shell print the target directory to stdout 3479# if CDPATH is set. 3480if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 3481 3482# ### BEGIN LIBTOOL CONFIG 3483 3484# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3485 3486# Shell to use when invoking shell scripts. 3487SHELL=$lt_SHELL 3488 3489# Whether or not to build shared libraries. 3490build_libtool_libs=$enable_shared 3491 3492# Whether or not to build static libraries. 3493build_old_libs=$enable_static 3494 3495# Whether or not to add -lc for building shared libraries. 3496build_libtool_need_lc=$need_lc 3497 3498# Whether or not to optimize for fast installation. 3499fast_install=$enable_fast_install 3500 3501# The host system. 3502host_alias=$host_alias 3503host=$host 3504 3505# An echo program that does not interpret backslashes. 3506echo=$lt_echo 3507 3508# The archiver. 3509AR=$lt_AR 3510AR_FLAGS=$lt_AR_FLAGS 3511 3512# The default C compiler. 3513CC=$lt_CC 3514 3515# Is the compiler the GNU C compiler? 3516with_gcc=$GCC 3517 3518# The linker used to build libraries. 3519LD=$lt_LD 3520 3521# Whether we need hard or soft links. 3522LN_S=$lt_LN_S 3523 3524# A BSD-compatible nm program. 3525NM=$lt_NM 3526 3527# A symbol stripping program 3528STRIP=$STRIP 3529 3530# Used to examine libraries when file_magic_cmd begins "file" 3531MAGIC_CMD=$MAGIC_CMD 3532 3533# Used on cygwin: DLL creation program. 3534DLLTOOL="$DLLTOOL" 3535 3536# Used on cygwin: object dumper. 3537OBJDUMP="$OBJDUMP" 3538 3539# Used on cygwin: assembler. 3540AS="$AS" 3541 3542# The name of the directory that contains temporary libtool files. 3543objdir=$objdir 3544 3545# How to create reloadable object files. 3546reload_flag=$lt_reload_flag 3547reload_cmds=$lt_reload_cmds 3548 3549# How to pass a linker flag through the compiler. 3550wl=$lt_wl 3551 3552# Object file suffix (normally "o"). 3553objext="$ac_objext" 3554 3555# Old archive suffix (normally "a"). 3556libext="$libext" 3557 3558# Executable file suffix (normally ""). 3559exeext="$exeext" 3560 3561# Additional compiler flags for building library objects. 3562pic_flag=$lt_pic_flag 3563pic_mode=$pic_mode 3564 3565# Does compiler simultaneously support -c and -o options? 3566compiler_c_o=$lt_compiler_c_o 3567 3568# Can we write directly to a .lo ? 3569compiler_o_lo=$lt_compiler_o_lo 3570 3571# Must we lock files when doing compilation ? 3572need_locks=$lt_need_locks 3573 3574# Do we need the lib prefix for modules? 3575need_lib_prefix=$need_lib_prefix 3576 3577# Do we need a version for libraries? 3578need_version=$need_version 3579 3580# Whether dlopen is supported. 3581dlopen_support=$enable_dlopen 3582 3583# Whether dlopen of programs is supported. 3584dlopen_self=$enable_dlopen_self 3585 3586# Whether dlopen of statically linked programs is supported. 3587dlopen_self_static=$enable_dlopen_self_static 3588 3589# Compiler flag to prevent dynamic linking. 3590link_static_flag=$lt_link_static_flag 3591 3592# Compiler flag to turn off builtin functions. 3593no_builtin_flag=$lt_no_builtin_flag 3594 3595# Compiler flag to allow reflexive dlopens. 3596export_dynamic_flag_spec=$lt_export_dynamic_flag_spec 3597 3598# Compiler flag to generate shared objects directly from archives. 3599whole_archive_flag_spec=$lt_whole_archive_flag_spec 3600 3601# Compiler flag to generate thread-safe objects. 3602thread_safe_flag_spec=$lt_thread_safe_flag_spec 3603 3604# Library versioning type. 3605version_type=$version_type 3606 3607# Format of library name prefix. 3608libname_spec=$lt_libname_spec 3609 3610# List of archive names. First name is the real one, the rest are links. 3611# The last name is the one that the linker finds with -lNAME. 3612library_names_spec=$lt_library_names_spec 3613 3614# The coded name of the library, if different from the real name. 3615soname_spec=$lt_soname_spec 3616 3617# Commands used to build and install an old-style archive. 3618RANLIB=$lt_RANLIB 3619old_archive_cmds=$lt_old_archive_cmds 3620old_postinstall_cmds=$lt_old_postinstall_cmds 3621old_postuninstall_cmds=$lt_old_postuninstall_cmds 3622 3623# Create an old-style archive from a shared archive. 3624old_archive_from_new_cmds=$lt_old_archive_from_new_cmds 3625 3626# Create a temporary old-style archive to link instead of a shared archive. 3627old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds 3628 3629# Commands used to build and install a shared archive. 3630archive_cmds=$lt_archive_cmds 3631archive_expsym_cmds=$lt_archive_expsym_cmds 3632postinstall_cmds=$lt_postinstall_cmds 3633postuninstall_cmds=$lt_postuninstall_cmds 3634 3635# Commands to strip libraries. 3636old_striplib=$lt_old_striplib 3637striplib=$lt_striplib 3638 3639# Method to check whether dependent libraries are shared objects. 3640deplibs_check_method=$lt_deplibs_check_method 3641 3642# Command to use when deplibs_check_method == file_magic. 3643file_magic_cmd=$lt_file_magic_cmd 3644 3645# Flag that allows shared libraries with undefined symbols to be built. 3646allow_undefined_flag=$lt_allow_undefined_flag 3647 3648# Flag that forces no undefined symbols. 3649no_undefined_flag=$lt_no_undefined_flag 3650 3651# Commands used to finish a libtool library installation in a directory. 3652finish_cmds=$lt_finish_cmds 3653 3654# Same as above, but a single script fragment to be evaled but not shown. 3655finish_eval=$lt_finish_eval 3656 3657# Take the output of nm and produce a listing of raw symbols and C names. 3658global_symbol_pipe=$lt_global_symbol_pipe 3659 3660# Transform the output of nm in a proper C declaration 3661global_symbol_to_cdecl=$lt_global_symbol_to_cdecl 3662 3663# Transform the output of nm in a C name address pair 3664global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address 3665 3666# This is the shared library runtime path variable. 3667runpath_var=$runpath_var 3668 3669# This is the shared library path variable. 3670shlibpath_var=$shlibpath_var 3671 3672# Is shlibpath searched before the hard-coded library search path? 3673shlibpath_overrides_runpath=$shlibpath_overrides_runpath 3674 3675# How to hardcode a shared library path into an executable. 3676hardcode_action=$hardcode_action 3677 3678# Whether we should hardcode library paths into libraries. 3679hardcode_into_libs=$hardcode_into_libs 3680 3681# Flag to hardcode \$libdir into a binary during linking. 3682# This must work even if \$libdir does not exist. 3683hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec 3684 3685# Whether we need a single -rpath flag with a separated argument. 3686hardcode_libdir_separator=$lt_hardcode_libdir_separator 3687 3688# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the 3689# resulting binary. 3690hardcode_direct=$hardcode_direct 3691 3692# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 3693# resulting binary. 3694hardcode_minus_L=$hardcode_minus_L 3695 3696# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 3697# the resulting binary. 3698hardcode_shlibpath_var=$hardcode_shlibpath_var 3699 3700# Variables whose values should be saved in libtool wrapper scripts and 3701# restored at relink time. 3702variables_saved_for_relink="$variables_saved_for_relink" 3703 3704# Whether libtool must link a program against all its dependency libraries. 3705link_all_deplibs=$link_all_deplibs 3706 3707# Compile-time system search path for libraries 3708sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 3709 3710# Run-time system search path for libraries 3711sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 3712 3713# Fix the shell variable \$srcfile for the compiler. 3714fix_srcfile_path="$fix_srcfile_path" 3715 3716# Set to yes if exported symbols are required. 3717always_export_symbols=$always_export_symbols 3718 3719# The commands to list exported symbols. 3720export_symbols_cmds=$lt_export_symbols_cmds 3721 3722# The commands to extract the exported symbol list from a shared archive. 3723extract_expsyms_cmds=$lt_extract_expsyms_cmds 3724 3725# Symbols that should not be listed in the preloaded symbols. 3726exclude_expsyms=$lt_exclude_expsyms 3727 3728# Symbols that must always be exported. 3729include_expsyms=$lt_include_expsyms 3730 3731# ### END LIBTOOL CONFIG 3732 3733__EOF__ 3734 3735 case $host_os in 3736 aix3*) 3737 cat <<\EOF >> "${ofile}T" 3738 3739# AIX sometimes has problems with the GCC collect2 program. For some 3740# reason, if we set the COLLECT_NAMES environment variable, the problems 3741# vanish in a puff of smoke. 3742if test "X${COLLECT_NAMES+set}" != Xset; then 3743 COLLECT_NAMES= 3744 export COLLECT_NAMES 3745fi 3746EOF 3747 ;; 3748 esac 3749 3750 case $host_os in 3751 cygwin* | mingw* | pw32* | os2*) 3752 cat <<'EOF' >> "${ofile}T" 3753 # This is a source program that is used to create dlls on Windows 3754 # Don't remove nor modify the starting and closing comments 3755# /* ltdll.c starts here */ 3756# #define WIN32_LEAN_AND_MEAN 3757# #include <windows.h> 3758# #undef WIN32_LEAN_AND_MEAN 3759# #include <stdio.h> 3760# 3761# #ifndef __CYGWIN__ 3762# # ifdef __CYGWIN32__ 3763# # define __CYGWIN__ __CYGWIN32__ 3764# # endif 3765# #endif 3766# 3767# #ifdef __cplusplus 3768# extern "C" { 3769# #endif 3770# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 3771# #ifdef __cplusplus 3772# } 3773# #endif 3774# 3775# #ifdef __CYGWIN__ 3776# #include <cygwin/cygwin_dll.h> 3777# DECLARE_CYGWIN_DLL( DllMain ); 3778# #endif 3779# HINSTANCE __hDllInstance_base; 3780# 3781# BOOL APIENTRY 3782# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 3783# { 3784# __hDllInstance_base = hInst; 3785# return TRUE; 3786# } 3787# /* ltdll.c ends here */ 3788 # This is a source program that is used to create import libraries 3789 # on Windows for dlls which lack them. Don't remove nor modify the 3790 # starting and closing comments 3791# /* impgen.c starts here */ 3792# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. 3793# 3794# This file is part of GNU libtool. 3795# 3796# This program is free software; you can redistribute it and/or modify 3797# it under the terms of the GNU General Public License as published by 3798# the Free Software Foundation; either version 2 of the License, or 3799# (at your option) any later version. 3800# 3801# This program is distributed in the hope that it will be useful, 3802# but WITHOUT ANY WARRANTY; without even the implied warranty of 3803# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3804# GNU General Public License for more details. 3805# 3806# You should have received a copy of the GNU General Public License 3807# along with this program; if not, write to the Free Software 3808# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 3809# */ 3810# 3811# #include <stdio.h> /* for printf() */ 3812# #include <unistd.h> /* for open(), lseek(), read() */ 3813# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ 3814# #include <string.h> /* for strdup() */ 3815# 3816# /* O_BINARY isn't required (or even defined sometimes) under Unix */ 3817# #ifndef O_BINARY 3818# #define O_BINARY 0 3819# #endif 3820# 3821# static unsigned int 3822# pe_get16 (fd, offset) 3823# int fd; 3824# int offset; 3825# { 3826# unsigned char b[2]; 3827# lseek (fd, offset, SEEK_SET); 3828# read (fd, b, 2); 3829# return b[0] + (b[1]<<8); 3830# } 3831# 3832# static unsigned int 3833# pe_get32 (fd, offset) 3834# int fd; 3835# int offset; 3836# { 3837# unsigned char b[4]; 3838# lseek (fd, offset, SEEK_SET); 3839# read (fd, b, 4); 3840# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 3841# } 3842# 3843# static unsigned int 3844# pe_as32 (ptr) 3845# void *ptr; 3846# { 3847# unsigned char *b = ptr; 3848# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 3849# } 3850# 3851# int 3852# main (argc, argv) 3853# int argc; 3854# char *argv[]; 3855# { 3856# int dll; 3857# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; 3858# unsigned long export_rva, export_size, nsections, secptr, expptr; 3859# unsigned long name_rvas, nexp; 3860# unsigned char *expdata, *erva; 3861# char *filename, *dll_name; 3862# 3863# filename = argv[1]; 3864# 3865# dll = open(filename, O_RDONLY|O_BINARY); 3866# if (dll < 1) 3867# return 1; 3868# 3869# dll_name = filename; 3870# 3871# for (i=0; filename[i]; i++) 3872# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') 3873# dll_name = filename + i +1; 3874# 3875# pe_header_offset = pe_get32 (dll, 0x3c); 3876# opthdr_ofs = pe_header_offset + 4 + 20; 3877# num_entries = pe_get32 (dll, opthdr_ofs + 92); 3878# 3879# if (num_entries < 1) /* no exports */ 3880# return 1; 3881# 3882# export_rva = pe_get32 (dll, opthdr_ofs + 96); 3883# export_size = pe_get32 (dll, opthdr_ofs + 100); 3884# nsections = pe_get16 (dll, pe_header_offset + 4 +2); 3885# secptr = (pe_header_offset + 4 + 20 + 3886# pe_get16 (dll, pe_header_offset + 4 + 16)); 3887# 3888# expptr = 0; 3889# for (i = 0; i < nsections; i++) 3890# { 3891# char sname[8]; 3892# unsigned long secptr1 = secptr + 40 * i; 3893# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); 3894# unsigned long vsize = pe_get32 (dll, secptr1 + 16); 3895# unsigned long fptr = pe_get32 (dll, secptr1 + 20); 3896# lseek(dll, secptr1, SEEK_SET); 3897# read(dll, sname, 8); 3898# if (vaddr <= export_rva && vaddr+vsize > export_rva) 3899# { 3900# expptr = fptr + (export_rva - vaddr); 3901# if (export_rva + export_size > vaddr + vsize) 3902# export_size = vsize - (export_rva - vaddr); 3903# break; 3904# } 3905# } 3906# 3907# expdata = (unsigned char*)malloc(export_size); 3908# lseek (dll, expptr, SEEK_SET); 3909# read (dll, expdata, export_size); 3910# erva = expdata - export_rva; 3911# 3912# nexp = pe_as32 (expdata+24); 3913# name_rvas = pe_as32 (expdata+32); 3914# 3915# printf ("EXPORTS\n"); 3916# for (i = 0; i<nexp; i++) 3917# { 3918# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); 3919# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); 3920# } 3921# 3922# return 0; 3923# } 3924# /* impgen.c ends here */ 3925 3926EOF 3927 ;; 3928 esac 3929 3930 # We use sed instead of cat because bash on DJGPP gets confused if 3931 # if finds mixed CR/LF and LF-only lines. Since sed operates in 3932 # text mode, it properly converts lines to CR/LF. This bash problem 3933 # is reportedly fixed, but why not run on old versions too? 3934 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) 3935 3936 mv -f "${ofile}T" "$ofile" || \ 3937 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") 3938 chmod +x "$ofile" 3939fi 3940 3941])# _LT_AC_LTCONFIG_HACK 3942 3943# AC_LIBTOOL_DLOPEN - enable checks for dlopen support 3944AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) 3945 3946# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's 3947AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) 3948 3949# AC_ENABLE_SHARED - implement the --enable-shared flag 3950# Usage: AC_ENABLE_SHARED[(DEFAULT)] 3951# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 3952# `yes'. 3953AC_DEFUN([AC_ENABLE_SHARED], 3954[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 3955AC_ARG_ENABLE(shared, 3956changequote(<<, >>)dnl 3957<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], 3958changequote([, ])dnl 3959[p=${PACKAGE-default} 3960case $enableval in 3961yes) enable_shared=yes ;; 3962no) enable_shared=no ;; 3963*) 3964 enable_shared=no 3965 # Look at the argument we got. We use all the common list separators. 3966 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 3967 for pkg in $enableval; do 3968 if test "X$pkg" = "X$p"; then 3969 enable_shared=yes 3970 fi 3971 done 3972 IFS="$ac_save_ifs" 3973 ;; 3974esac], 3975enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl 3976]) 3977 3978# AC_DISABLE_SHARED - set the default shared flag to --disable-shared 3979AC_DEFUN([AC_DISABLE_SHARED], 3980[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3981AC_ENABLE_SHARED(no)]) 3982 3983# AC_ENABLE_STATIC - implement the --enable-static flag 3984# Usage: AC_ENABLE_STATIC[(DEFAULT)] 3985# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 3986# `yes'. 3987AC_DEFUN([AC_ENABLE_STATIC], 3988[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 3989AC_ARG_ENABLE(static, 3990changequote(<<, >>)dnl 3991<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], 3992changequote([, ])dnl 3993[p=${PACKAGE-default} 3994case $enableval in 3995yes) enable_static=yes ;; 3996no) enable_static=no ;; 3997*) 3998 enable_static=no 3999 # Look at the argument we got. We use all the common list separators. 4000 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 4001 for pkg in $enableval; do 4002 if test "X$pkg" = "X$p"; then 4003 enable_static=yes 4004 fi 4005 done 4006 IFS="$ac_save_ifs" 4007 ;; 4008esac], 4009enable_static=AC_ENABLE_STATIC_DEFAULT)dnl 4010]) 4011 4012# AC_DISABLE_STATIC - set the default static flag to --disable-static 4013AC_DEFUN([AC_DISABLE_STATIC], 4014[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4015AC_ENABLE_STATIC(no)]) 4016 4017 4018# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag 4019# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] 4020# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 4021# `yes'. 4022AC_DEFUN([AC_ENABLE_FAST_INSTALL], 4023[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 4024AC_ARG_ENABLE(fast-install, 4025changequote(<<, >>)dnl 4026<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], 4027changequote([, ])dnl 4028[p=${PACKAGE-default} 4029case $enableval in 4030yes) enable_fast_install=yes ;; 4031no) enable_fast_install=no ;; 4032*) 4033 enable_fast_install=no 4034 # Look at the argument we got. We use all the common list separators. 4035 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 4036 for pkg in $enableval; do 4037 if test "X$pkg" = "X$p"; then 4038 enable_fast_install=yes 4039 fi 4040 done 4041 IFS="$ac_save_ifs" 4042 ;; 4043esac], 4044enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl 4045]) 4046 4047# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install 4048AC_DEFUN([AC_DISABLE_FAST_INSTALL], 4049[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4050AC_ENABLE_FAST_INSTALL(no)]) 4051 4052# AC_LIBTOOL_PICMODE - implement the --with-pic flag 4053# Usage: AC_LIBTOOL_PICMODE[(MODE)] 4054# Where MODE is either `yes' or `no'. If omitted, it defaults to 4055# `both'. 4056AC_DEFUN([AC_LIBTOOL_PICMODE], 4057[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4058pic_mode=ifelse($#,1,$1,default)]) 4059 4060 4061# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library 4062AC_DEFUN([AC_PATH_TOOL_PREFIX], 4063[AC_MSG_CHECKING([for $1]) 4064AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4065[case $MAGIC_CMD in 4066 /*) 4067 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4068 ;; 4069 ?:/*) 4070 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. 4071 ;; 4072 *) 4073 ac_save_MAGIC_CMD="$MAGIC_CMD" 4074 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 4075dnl $ac_dummy forces splitting on constant user-supplied paths. 4076dnl POSIX.2 word splitting is done only on the output of word expansions, 4077dnl not every word. This closes a longstanding sh security hole. 4078 ac_dummy="ifelse([$2], , $PATH, [$2])" 4079 for ac_dir in $ac_dummy; do 4080 test -z "$ac_dir" && ac_dir=. 4081 if test -f $ac_dir/$1; then 4082 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4083 if test -n "$file_magic_test_file"; then 4084 case $deplibs_check_method in 4085 "file_magic "*) 4086 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 4087 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4088 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4089 egrep "$file_magic_regex" > /dev/null; then 4090 : 4091 else 4092 cat <<EOF 1>&2 4093 4094*** Warning: the command libtool uses to detect shared libraries, 4095*** $file_magic_cmd, produces output that libtool cannot recognize. 4096*** The result is that libtool may fail to recognize shared libraries 4097*** as such. This will affect the creation of libtool libraries that 4098*** depend on shared libraries, but programs linked with such libtool 4099*** libraries will work regardless of this problem. Nevertheless, you 4100*** may want to report the problem to your system manager and/or to 4101*** bug-libtool@gnu.org 4102 4103EOF 4104 fi ;; 4105 esac 4106 fi 4107 break 4108 fi 4109 done 4110 IFS="$ac_save_ifs" 4111 MAGIC_CMD="$ac_save_MAGIC_CMD" 4112 ;; 4113esac]) 4114MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4115if test -n "$MAGIC_CMD"; then 4116 AC_MSG_RESULT($MAGIC_CMD) 4117else 4118 AC_MSG_RESULT(no) 4119fi 4120]) 4121 4122 4123# AC_PATH_MAGIC - find a file program which can recognise a shared library 4124AC_DEFUN([AC_PATH_MAGIC], 4125[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl 4126AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) 4127if test -z "$lt_cv_path_MAGIC_CMD"; then 4128 if test -n "$ac_tool_prefix"; then 4129 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) 4130 else 4131 MAGIC_CMD=: 4132 fi 4133fi 4134]) 4135 4136 4137# AC_PROG_LD - find the path to the GNU or non-GNU linker 4138AC_DEFUN([AC_PROG_LD], 4139[AC_ARG_WITH(gnu-ld, 4140[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 4141test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 4142AC_REQUIRE([AC_PROG_CC])dnl 4143AC_REQUIRE([AC_CANONICAL_HOST])dnl 4144AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4145AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl 4146ac_prog=ld 4147if test "$GCC" = yes; then 4148 # Check if gcc -print-prog-name=ld gives a path. 4149 AC_MSG_CHECKING([for ld used by GCC]) 4150 case $host in 4151 *-*-mingw*) 4152 # gcc leaves a trailing carriage return which upsets mingw 4153 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4154 *) 4155 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4156 esac 4157 case $ac_prog in 4158 # Accept absolute paths. 4159 [[\\/]]* | [[A-Za-z]]:[[\\/]]*) 4160 re_direlt='/[[^/]][[^/]]*/\.\./' 4161 # Canonicalize the path of ld 4162 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 4163 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 4164 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 4165 done 4166 test -z "$LD" && LD="$ac_prog" 4167 ;; 4168 "") 4169 # If it fails, then pretend we aren't using GCC. 4170 ac_prog=ld 4171 ;; 4172 *) 4173 # If it is relative, then search for the first ld in PATH. 4174 with_gnu_ld=unknown 4175 ;; 4176 esac 4177elif test "$with_gnu_ld" = yes; then 4178 AC_MSG_CHECKING([for GNU ld]) 4179else 4180 AC_MSG_CHECKING([for non-GNU ld]) 4181fi 4182AC_CACHE_VAL(lt_cv_path_LD, 4183[if test -z "$LD"; then 4184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4185 for ac_dir in $PATH; do 4186 test -z "$ac_dir" && ac_dir=. 4187 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4188 lt_cv_path_LD="$ac_dir/$ac_prog" 4189 # Check to see if the program is GNU ld. I'd rather use --version, 4190 # but apparently some GNU ld's only accept -v. 4191 # Break only if it was the GNU/non-GNU ld that we prefer. 4192 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 4193 test "$with_gnu_ld" != no && break 4194 else 4195 test "$with_gnu_ld" != yes && break 4196 fi 4197 fi 4198 done 4199 IFS="$ac_save_ifs" 4200else 4201 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4202fi]) 4203LD="$lt_cv_path_LD" 4204if test -n "$LD"; then 4205 AC_MSG_RESULT($LD) 4206else 4207 AC_MSG_RESULT(no) 4208fi 4209test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4210AC_PROG_LD_GNU 4211]) 4212 4213# AC_PROG_LD_GNU - 4214AC_DEFUN([AC_PROG_LD_GNU], 4215[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4216[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 4217if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 4218 lt_cv_prog_gnu_ld=yes 4219else 4220 lt_cv_prog_gnu_ld=no 4221fi]) 4222with_gnu_ld=$lt_cv_prog_gnu_ld 4223]) 4224 4225# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker 4226# -- PORTME Some linkers may need a different reload flag. 4227AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 4228[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, 4229[lt_cv_ld_reload_flag='-r']) 4230reload_flag=$lt_cv_ld_reload_flag 4231test -n "$reload_flag" && reload_flag=" $reload_flag" 4232]) 4233 4234# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies 4235# -- PORTME fill in with the dynamic library characteristics 4236AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 4237[AC_CACHE_CHECK([how to recognise dependant libraries], 4238lt_cv_deplibs_check_method, 4239[lt_cv_file_magic_cmd='$MAGIC_CMD' 4240lt_cv_file_magic_test_file= 4241lt_cv_deplibs_check_method='unknown' 4242# Need to set the preceding variable on all platforms that support 4243# interlibrary dependencies. 4244# 'none' -- dependencies not supported. 4245# `unknown' -- same as none, but documents that we really don't know. 4246# 'pass_all' -- all dependencies passed with no checks. 4247# 'test_compile' -- check by making test program. 4248# 'file_magic [[regex]]' -- check by looking for files in library path 4249# which responds to the $file_magic_cmd with a given egrep regex. 4250# If you have `file' or equivalent on your system and you're not sure 4251# whether `pass_all' will *always* work, you probably want this one. 4252 4253case $host_os in 4254aix4* | aix5*) 4255 lt_cv_deplibs_check_method=pass_all 4256 ;; 4257 4258beos*) 4259 lt_cv_deplibs_check_method=pass_all 4260 ;; 4261 4262bsdi4*) 4263 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4264 lt_cv_file_magic_cmd='/usr/bin/file -L' 4265 lt_cv_file_magic_test_file=/shlib/libc.so 4266 ;; 4267 4268cygwin* | mingw* | pw32*) 4269 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 4270 lt_cv_file_magic_cmd='$OBJDUMP -f' 4271 ;; 4272 4273darwin* | rhapsody*) 4274 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' 4275 lt_cv_file_magic_cmd='/usr/bin/file -L' 4276 case "$host_os" in 4277 rhapsody* | darwin1.[[012]]) 4278 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` 4279 ;; 4280 *) # Darwin 1.3 on 4281 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' 4282 ;; 4283 esac 4284 ;; 4285 4286freebsd*) 4287 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4288 case $host_cpu in 4289 i*86 ) 4290 # Not sure whether the presence of OpenBSD here was a mistake. 4291 # Let's accept both of them until this is cleared up. 4292 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' 4293 lt_cv_file_magic_cmd=/usr/bin/file 4294 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4295 ;; 4296 esac 4297 else 4298 lt_cv_deplibs_check_method=pass_all 4299 fi 4300 ;; 4301 4302gnu*) 4303 lt_cv_deplibs_check_method=pass_all 4304 ;; 4305 4306hpux10.20*|hpux11*) 4307 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 4308 lt_cv_file_magic_cmd=/usr/bin/file 4309 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4310 ;; 4311 4312irix5* | irix6*) 4313 case $host_os in 4314 irix5*) 4315 # this will be overridden with pass_all, but let us keep it just in case 4316 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" 4317 ;; 4318 *) 4319 case $LD in 4320 *-32|*"-32 ") libmagic=32-bit;; 4321 *-n32|*"-n32 ") libmagic=N32;; 4322 *-64|*"-64 ") libmagic=64-bit;; 4323 *) libmagic=never-match;; 4324 esac 4325 # this will be overridden with pass_all, but let us keep it just in case 4326 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" 4327 ;; 4328 esac 4329 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` 4330 lt_cv_deplibs_check_method=pass_all 4331 ;; 4332 4333# This must be Linux ELF. 4334linux-gnu*) 4335 case $host_cpu in 4336 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) 4337 lt_cv_deplibs_check_method=pass_all ;; 4338 *) 4339 # glibc up to 2.1.1 does not perform some relocations on ARM 4340 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; 4341 esac 4342 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` 4343 ;; 4344 4345netbsd*) 4346 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4347 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' 4348 else 4349 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' 4350 fi 4351 ;; 4352 4353newos6*) 4354 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4355 lt_cv_file_magic_cmd=/usr/bin/file 4356 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4357 ;; 4358 4359openbsd*) 4360 lt_cv_file_magic_cmd=/usr/bin/file 4361 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4362 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4363 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' 4364 else 4365 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' 4366 fi 4367 ;; 4368 4369osf3* | osf4* | osf5*) 4370 # this will be overridden with pass_all, but let us keep it just in case 4371 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' 4372 lt_cv_file_magic_test_file=/shlib/libc.so 4373 lt_cv_deplibs_check_method=pass_all 4374 ;; 4375 4376sco3.2v5*) 4377 lt_cv_deplibs_check_method=pass_all 4378 ;; 4379 4380solaris*) 4381 lt_cv_deplibs_check_method=pass_all 4382 lt_cv_file_magic_test_file=/lib/libc.so 4383 ;; 4384 4385sysv5uw[[78]]* | sysv4*uw2*) 4386 lt_cv_deplibs_check_method=pass_all 4387 ;; 4388 4389sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 4390 case $host_vendor in 4391 motorola) 4392 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' 4393 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4394 ;; 4395 ncr) 4396 lt_cv_deplibs_check_method=pass_all 4397 ;; 4398 sequent) 4399 lt_cv_file_magic_cmd='/bin/file' 4400 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4401 ;; 4402 sni) 4403 lt_cv_file_magic_cmd='/bin/file' 4404 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4405 lt_cv_file_magic_test_file=/lib/libc.so 4406 ;; 4407 esac 4408 ;; 4409esac 4410]) 4411file_magic_cmd=$lt_cv_file_magic_cmd 4412deplibs_check_method=$lt_cv_deplibs_check_method 4413]) 4414 4415 4416# AC_PROG_NM - find the path to a BSD-compatible name lister 4417AC_DEFUN([AC_PROG_NM], 4418[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl 4419AC_MSG_CHECKING([for BSD-compatible nm]) 4420AC_CACHE_VAL(lt_cv_path_NM, 4421[if test -n "$NM"; then 4422 # Let the user override the test. 4423 lt_cv_path_NM="$NM" 4424else 4425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4426 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 4427 test -z "$ac_dir" && ac_dir=. 4428 tmp_nm=$ac_dir/${ac_tool_prefix}nm 4429 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then 4430 # Check to see if the nm accepts a BSD-compat flag. 4431 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4432 # nm: unknown option "B" ignored 4433 # Tru64's nm complains that /dev/null is an invalid object file 4434 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then 4435 lt_cv_path_NM="$tmp_nm -B" 4436 break 4437 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 4438 lt_cv_path_NM="$tmp_nm -p" 4439 break 4440 else 4441 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4442 continue # so that we can try to find one that supports BSD flags 4443 fi 4444 fi 4445 done 4446 IFS="$ac_save_ifs" 4447 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 4448fi]) 4449NM="$lt_cv_path_NM" 4450AC_MSG_RESULT([$NM]) 4451]) 4452 4453# AC_CHECK_LIBM - check for math library 4454AC_DEFUN([AC_CHECK_LIBM], 4455[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4456LIBM= 4457case $host in 4458*-*-beos* | *-*-cygwin* | *-*-pw32*) 4459 # These system don't have libm 4460 ;; 4461*-ncr-sysv4.3*) 4462 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4463 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") 4464 ;; 4465*) 4466 AC_CHECK_LIB(m, main, LIBM="-lm") 4467 ;; 4468esac 4469]) 4470 4471# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for 4472# the libltdl convenience library and INCLTDL to the include flags for 4473# the libltdl header and adds --enable-ltdl-convenience to the 4474# configure arguments. Note that LIBLTDL and INCLTDL are not 4475# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not 4476# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed 4477# with '${top_builddir}/' and INCLTDL will be prefixed with 4478# '${top_srcdir}/' (note the single quotes!). If your package is not 4479# flat and you're not using automake, define top_builddir and 4480# top_srcdir appropriately in the Makefiles. 4481AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 4482[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4483 case $enable_ltdl_convenience in 4484 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 4485 "") enable_ltdl_convenience=yes 4486 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 4487 esac 4488 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 4489 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4490]) 4491 4492# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for 4493# the libltdl installable library and INCLTDL to the include flags for 4494# the libltdl header and adds --enable-ltdl-install to the configure 4495# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is 4496# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed 4497# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will 4498# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed 4499# with '${top_srcdir}/' (note the single quotes!). If your package is 4500# not flat and you're not using automake, define top_builddir and 4501# top_srcdir appropriately in the Makefiles. 4502# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 4503AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 4504[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4505 AC_CHECK_LIB(ltdl, main, 4506 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 4507 [if test x"$enable_ltdl_install" = xno; then 4508 AC_MSG_WARN([libltdl not installed, but installation disabled]) 4509 else 4510 enable_ltdl_install=yes 4511 fi 4512 ]) 4513 if test x"$enable_ltdl_install" = x"yes"; then 4514 ac_configure_args="$ac_configure_args --enable-ltdl-install" 4515 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 4516 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4517 else 4518 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 4519 LIBLTDL="-lltdl" 4520 INCLTDL= 4521 fi 4522]) 4523 4524# old names 4525AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 4526AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 4527AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 4528AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 4529AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 4530AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 4531AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 4532 4533# This is just to silence aclocal about the macro not being used 4534ifelse([AC_DISABLE_FAST_INSTALL]) 4535 4536dnl $Id: wflags.m4,v 1.3 1999/03/11 12:11:41 joda Exp $ 4537dnl 4538dnl set WFLAGS 4539 4540AC_DEFUN(AC_WFLAGS,[ 4541WFLAGS_NOUNUSED="" 4542WFLAGS_NOIMPLICITINT="" 4543if test -z "$WFLAGS" -a "$GCC" = "yes"; then 4544 # -Wno-implicit-int for broken X11 headers 4545 # leave these out for now: 4546 # -Wcast-align doesn't work well on alpha osf/1 4547 # -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast 4548 # -Wmissing-declarations -Wnested-externs 4549 WFLAGS="ifelse($#, 0,-Wall, $1)" 4550 WFLAGS_NOUNUSED="-Wno-unused" 4551 WFLAGS_NOIMPLICITINT="-Wno-implicit-int" 4552fi 4553AC_SUBST(WFLAGS)dnl 4554AC_SUBST(WFLAGS_NOUNUSED)dnl 4555AC_SUBST(WFLAGS_NOIMPLICITINT)dnl 4556]) 4557 4558dnl $Id: test-package.m4,v 1.12 2002/09/10 15:23:38 joda Exp $ 4559dnl 4560dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs, 4561dnl default locations, conditional, config-program) 4562 4563AC_DEFUN(rk_TEST_PACKAGE,[ 4564AC_ARG_WITH($1, 4565 AC_HELP_STRING([--with-$1=dir],[use $1 in dir])) 4566AC_ARG_WITH($1-lib, 4567 AC_HELP_STRING([--with-$1-lib=dir],[use $1 libraries in dir]), 4568[if test "$withval" = "yes" -o "$withval" = "no"; then 4569 AC_MSG_ERROR([No argument for --with-$1-lib]) 4570elif test "X$with_$1" = "X"; then 4571 with_$1=yes 4572fi]) 4573AC_ARG_WITH($1-include, 4574 AC_HELP_STRING([--with-$1-include=dir],[use $1 headers in dir]), 4575[if test "$withval" = "yes" -o "$withval" = "no"; then 4576 AC_MSG_ERROR([No argument for --with-$1-include]) 4577elif test "X$with_$1" = "X"; then 4578 with_$1=yes 4579fi]) 4580AC_ARG_WITH($1-config, 4581 AC_HELP_STRING([--with-$1-config=path],[config program for $1])) 4582 4583m4_ifval([$6], 4584 m4_define([rk_pkgname], $6), 4585 m4_define([rk_pkgname], AS_TR_CPP($1))) 4586 4587AC_MSG_CHECKING(for $1) 4588 4589case "$with_$1" in 4590yes|"") d='$5' ;; 4591no) d= ;; 4592*) d="$with_$1" ;; 4593esac 4594 4595header_dirs= 4596lib_dirs= 4597for i in $d; do 4598 if test "$with_$1_include" = ""; then 4599 if test -d "$i/include/$1"; then 4600 header_dirs="$header_dirs $i/include/$1" 4601 fi 4602 if test -d "$i/include"; then 4603 header_dirs="$header_dirs $i/include" 4604 fi 4605 fi 4606 if test "$with_$1_lib" = ""; then 4607 if test -d "$i/lib$abilibdirext"; then 4608 lib_dirs="$lib_dirs $i/lib$abilibdirext" 4609 fi 4610 fi 4611done 4612 4613if test "$with_$1_include"; then 4614 header_dirs="$with_$1_include $header_dirs" 4615fi 4616if test "$with_$1_lib"; then 4617 lib_dirs="$with_$1_lib $lib_dirs" 4618fi 4619 4620if test "$with_$1_config" = ""; then 4621 with_$1_config='$7' 4622fi 4623 4624$1_cflags= 4625$1_libs= 4626 4627case "$with_$1_config" in 4628yes|no|"") 4629 ;; 4630*) 4631 $1_cflags="`$with_$1_config --cflags 2>&1`" 4632 $1_libs="`$with_$1_config --libs 2>&1`" 4633 ;; 4634esac 4635 4636found=no 4637if test "$with_$1" != no; then 4638 save_CFLAGS="$CFLAGS" 4639 save_LIBS="$LIBS" 4640 if test "$[]$1_cflags" -a "$[]$1_libs"; then 4641 CFLAGS="$[]$1_cflags $save_CFLAGS" 4642 LIBS="$[]$1_libs $save_LIBS" 4643 AC_TRY_LINK([$2],,[ 4644 INCLUDE_$1="$[]$1_cflags" 4645 LIB_$1="$[]$1_libs" 4646 AC_MSG_RESULT([from $with_$1_config]) 4647 found=yes]) 4648 fi 4649 if test "$found" = no; then 4650 ires= lres= 4651 for i in $header_dirs; do 4652 CFLAGS="-I$i $save_CFLAGS" 4653 AC_TRY_COMPILE([$2],,ires=$i;break) 4654 done 4655 for i in $lib_dirs; do 4656 LIBS="-L$i $3 $4 $save_LIBS" 4657 AC_TRY_LINK([$2],,lres=$i;break) 4658 done 4659 if test "$ires" -a "$lres" -a "$with_$1" != "no"; then 4660 INCLUDE_$1="-I$ires" 4661 LIB_$1="-L$lres $3 $4" 4662 found=yes 4663 AC_MSG_RESULT([headers $ires, libraries $lres]) 4664 fi 4665 fi 4666 CFLAGS="$save_CFLAGS" 4667 LIBS="$save_LIBS" 4668fi 4669 4670if test "$found" = yes; then 4671 AC_DEFINE_UNQUOTED(rk_pkgname, 1, [Define if you have the $1 package.]) 4672 with_$1=yes 4673else 4674 with_$1=no 4675 INCLUDE_$1= 4676 LIB_$1= 4677 AC_MSG_RESULT(no) 4678fi 4679 4680AC_SUBST(INCLUDE_$1) 4681AC_SUBST(LIB_$1) 4682]) 4683 4684dnl $Id: find-func.m4,v 1.1 1997/12/14 15:58:58 joda Exp $ 4685dnl 4686dnl AC_FIND_FUNC(func, libraries, includes, arguments) 4687AC_DEFUN(AC_FIND_FUNC, [ 4688AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4]) 4689if test -n "$LIB_$1"; then 4690 LIBS="$LIB_$1 $LIBS" 4691fi 4692]) 4693 4694dnl $Id: find-func-no-libs.m4,v 1.5 1999/10/30 21:08:18 assar Exp $ 4695dnl 4696dnl 4697dnl Look for function in any of the specified libraries 4698dnl 4699 4700dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args) 4701AC_DEFUN(AC_FIND_FUNC_NO_LIBS, [ 4702AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])]) 4703 4704dnl $Id: find-func-no-libs2.m4,v 1.6 2001/09/01 10:57:32 assar Exp $ 4705dnl 4706dnl 4707dnl Look for function in any of the specified libraries 4708dnl 4709 4710dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args) 4711AC_DEFUN(AC_FIND_FUNC_NO_LIBS2, [ 4712 4713AC_MSG_CHECKING([for $1]) 4714AC_CACHE_VAL(ac_cv_funclib_$1, 4715[ 4716if eval "test \"\$ac_cv_func_$1\" != yes" ; then 4717 ac_save_LIBS="$LIBS" 4718 for ac_lib in $2; do 4719 case "$ac_lib" in 4720 "") ;; 4721 yes) ac_lib="" ;; 4722 no) continue ;; 4723 -l*) ;; 4724 *) ac_lib="-l$ac_lib" ;; 4725 esac 4726 LIBS="$6 $ac_lib $5 $ac_save_LIBS" 4727 AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break) 4728 done 4729 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}" 4730 LIBS="$ac_save_LIBS" 4731fi 4732]) 4733 4734eval "ac_res=\$ac_cv_funclib_$1" 4735 4736if false; then 4737 AC_CHECK_FUNCS($1) 4738dnl AC_CHECK_LIBS($2, foo) 4739fi 4740# $1 4741eval "ac_tr_func=HAVE_[]upcase($1)" 4742eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')" 4743eval "LIB_$1=$ac_res" 4744 4745case "$ac_res" in 4746 yes) 4747 eval "ac_cv_func_$1=yes" 4748 eval "LIB_$1=" 4749 AC_DEFINE_UNQUOTED($ac_tr_func) 4750 AC_MSG_RESULT([yes]) 4751 ;; 4752 no) 4753 eval "ac_cv_func_$1=no" 4754 eval "LIB_$1=" 4755 AC_MSG_RESULT([no]) 4756 ;; 4757 *) 4758 eval "ac_cv_func_$1=yes" 4759 eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" 4760 AC_DEFINE_UNQUOTED($ac_tr_func) 4761 AC_DEFINE_UNQUOTED($ac_tr_lib) 4762 AC_MSG_RESULT([yes, in $ac_res]) 4763 ;; 4764esac 4765AC_SUBST(LIB_$1) 4766]) 4767 4768dnl $Id: crypto.m4,v 1.13 2002/09/10 19:55:48 joda Exp $ 4769dnl 4770dnl test for crypto libraries: 4771dnl - libcrypto (from openssl) 4772dnl - libdes (from krb4) 4773dnl - own-built libdes 4774 4775m4_define([test_headers], [ 4776 #undef KRB5 /* makes md4.h et al unhappy */ 4777 #ifdef HAVE_OPENSSL 4778 #include <openssl/md4.h> 4779 #include <openssl/md5.h> 4780 #include <openssl/sha.h> 4781 #include <openssl/des.h> 4782 #include <openssl/rc4.h> 4783 #else 4784 #include <md4.h> 4785 #include <md5.h> 4786 #include <sha.h> 4787 #include <des.h> 4788 #include <rc4.h> 4789 #endif 4790 #ifdef OLD_HASH_NAMES 4791 typedef struct md4 MD4_CTX; 4792 #define MD4_Init(C) md4_init((C)) 4793 #define MD4_Update(C, D, L) md4_update((C), (D), (L)) 4794 #define MD4_Final(D, C) md4_finito((C), (D)) 4795 typedef struct md5 MD5_CTX; 4796 #define MD5_Init(C) md5_init((C)) 4797 #define MD5_Update(C, D, L) md5_update((C), (D), (L)) 4798 #define MD5_Final(D, C) md5_finito((C), (D)) 4799 typedef struct sha SHA_CTX; 4800 #define SHA1_Init(C) sha_init((C)) 4801 #define SHA1_Update(C, D, L) sha_update((C), (D), (L)) 4802 #define SHA1_Final(D, C) sha_finito((C), (D)) 4803 #endif 4804 ]) 4805m4_define([test_body], [ 4806 void *schedule = 0; 4807 MD4_CTX md4; 4808 MD5_CTX md5; 4809 SHA_CTX sha1; 4810 4811 MD4_Init(&md4); 4812 MD5_Init(&md5); 4813 SHA1_Init(&sha1); 4814 4815 des_cbc_encrypt(0, 0, 0, schedule, 0, 0); 4816 RC4(0, 0, 0, 0);]) 4817 4818 4819AC_DEFUN([KRB_CRYPTO],[ 4820crypto_lib=unknown 4821AC_WITH_ALL([openssl]) 4822 4823DIR_des= 4824 4825AC_MSG_CHECKING([for crypto library]) 4826 4827openssl=no 4828old_hash=no 4829 4830if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then 4831 save_CPPFLAGS="$CPPFLAGS" 4832 save_LIBS="$LIBS" 4833 4834 cdirs= clibs= 4835 for i in $LIB_krb4; do 4836 case "$i" in 4837 -L*) cdirs="$cdirs $i";; 4838 -l*) clibs="$clibs $i";; 4839 esac 4840 done 4841 4842 ires= 4843 for i in $INCLUDE_krb4; do 4844 CFLAGS="-DHAVE_OPENSSL $i $save_CFLAGS" 4845 AC_TRY_COMPILE(test_headers, test_body, 4846 openssl=yes ires="$i"; break) 4847 CFLAGS="$i $save_CFLAGS" 4848 AC_TRY_COMPILE(test_headers, test_body, 4849 openssl=no ires="$i"; break) 4850 CFLAGS="-DOLD_HASH_NAMES $i $save_CFLAGS" 4851 AC_TRY_COMPILE(test_headers, test_body, 4852 openssl=no ires="$i" old_hash=yes; break) 4853 done 4854 lres= 4855 for i in $cdirs; do 4856 for j in $clibs; do 4857 LIBS="$i $j $save_LIBS" 4858 AC_TRY_LINK(test_headers, test_body, 4859 lres="$i $j"; break 2) 4860 done 4861 done 4862 CFLAGS="$save_CFLAGS" 4863 LIBS="$save_LIBS" 4864 if test "$ires" -a "$lres"; then 4865 INCLUDE_des="$ires" 4866 LIB_des="$lres" 4867 crypto_lib=krb4 4868 AC_MSG_RESULT([same as krb4]) 4869 LIB_des_a='$(LIB_des)' 4870 LIB_des_so='$(LIB_des)' 4871 LIB_des_appl='$(LIB_des)' 4872 fi 4873fi 4874 4875if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then 4876 save_CFLAGS="$CFLAGS" 4877 save_LIBS="$LIBS" 4878 INCLUDE_des= 4879 LIB_des= 4880 if test "$with_openssl_include" != ""; then 4881 INCLUDE_des="-I${with_openssl}/include" 4882 fi 4883 if test "$with_openssl_lib" != ""; then 4884 LIB_des="-L${with_openssl}/lib" 4885 fi 4886 CFLAGS="-DHAVE_OPENSSL ${INCLUDE_des} ${CFLAGS}" 4887 LIB_des="${LIB_des} -lcrypto" 4888 LIB_des_a="$LIB_des" 4889 LIB_des_so="$LIB_des" 4890 LIB_des_appl="$LIB_des" 4891 LIBS="${LIBS} ${LIB_des}" 4892 AC_TRY_LINK(test_headers, test_body, [ 4893 crypto_lib=libcrypto openssl=yes 4894 AC_MSG_RESULT([libcrypto]) 4895 ]) 4896 CFLAGS="$save_CFLAGS" 4897 LIBS="$save_LIBS" 4898fi 4899 4900if test "$crypto_lib" = "unknown"; then 4901 4902 DIR_des='des' 4903 LIB_des='$(top_builddir)/lib/des/libdes.la' 4904 LIB_des_a='$(top_builddir)/lib/des/.libs/libdes.a' 4905 LIB_des_so='$(top_builddir)/lib/des/.libs/libdes.so' 4906 LIB_des_appl="-ldes" 4907 4908 AC_MSG_RESULT([included libdes]) 4909 4910fi 4911 4912if test "$with_krb4" != no -a "$crypto_lib" != krb4; then 4913 AC_MSG_ERROR([the crypto library used by krb4 lacks features 4914required by Kerberos 5; to continue, you need to install a newer 4915Kerberos 4 or configure --without-krb4]) 4916fi 4917 4918if test "$openssl" = "yes"; then 4919 AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto]) 4920fi 4921if test "$old_hash" = yes; then 4922 AC_DEFINE([HAVE_OLD_HASH_NAMES], 1, 4923 [define if you have hash functions like md4_finito()]) 4924fi 4925AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = yes)dnl 4926 4927AC_SUBST(DIR_des) 4928AC_SUBST(INCLUDE_des) 4929AC_SUBST(LIB_des) 4930AC_SUBST(LIB_des_a) 4931AC_SUBST(LIB_des_so) 4932AC_SUBST(LIB_des_appl) 4933]) 4934 4935dnl 4936dnl $Id: with-all.m4,v 1.1 2001/08/29 17:01:23 assar Exp $ 4937dnl 4938 4939dnl AC_WITH_ALL(name) 4940 4941AC_DEFUN([AC_WITH_ALL], [ 4942AC_ARG_WITH($1, 4943 AC_HELP_STRING([--with-$1=dir], 4944 [use $1 in dir])) 4945 4946AC_ARG_WITH($1-lib, 4947 AC_HELP_STRING([--with-$1-lib=dir], 4948 [use $1 libraries in dir]), 4949[if test "$withval" = "yes" -o "$withval" = "no"; then 4950 AC_MSG_ERROR([No argument for --with-$1-lib]) 4951elif test "X$with_$1" = "X"; then 4952 with_$1=yes 4953fi]) 4954 4955AC_ARG_WITH($1-include, 4956 AC_HELP_STRING([--with-$1-include=dir], 4957 [use $1 headers in dir]), 4958[if test "$withval" = "yes" -o "$withval" = "no"; then 4959 AC_MSG_ERROR([No argument for --with-$1-include]) 4960elif test "X$with_$1" = "X"; then 4961 with_$1=yes 4962fi]) 4963 4964case "$with_$1" in 4965yes) ;; 4966no) ;; 4967"") ;; 4968*) if test "$with_$1_include" = ""; then 4969 with_$1_include="$with_$1/include" 4970 fi 4971 if test "$with_$1_lib" = ""; then 4972 with_$1_lib="$with_$1/lib$abilibdirext" 4973 fi 4974 ;; 4975esac 4976]) 4977dnl $Id: db.m4,v 1.9 2002/09/10 14:29:47 joda Exp $ 4978dnl 4979dnl tests for various db libraries 4980dnl 4981AC_DEFUN([rk_DB],[ 4982AC_ARG_ENABLE(berkeley-db, 4983 AC_HELP_STRING([--disable-berkeley-db], 4984 [if you don't want berkeley db]),[ 4985]) 4986 4987have_ndbm=no 4988db_type=unknown 4989 4990if test "$enable_berkeley_db" != no; then 4991 4992 AC_CHECK_HEADERS([ \ 4993 db4/db.h \ 4994 db3/db.h \ 4995 db.h \ 4996 db_185.h \ 4997 ]) 4998 4999dnl db_create is used by db3 and db4 5000 5001 AC_FIND_FUNC_NO_LIBS(db_create, db4 db3 db, [ 5002 #include <stdio.h> 5003 #ifdef HAVE_DB4_DB_H 5004 #include <db4/db.h> 5005 #elif defined(HAVE_DB3_DB_H) 5006 #include <db3/db.h> 5007 #else 5008 #include <db.h> 5009 #endif 5010 ],[NULL, NULL, 0]) 5011 5012 if test "$ac_cv_func_db_create" = "yes"; then 5013 db_type=db3 5014 if test "$ac_cv_funclib_db_create" != "yes"; then 5015 DBLIB="$ac_cv_funclib_db_create" 5016 else 5017 DBLIB="" 5018 fi 5019 AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4 library]) 5020 else 5021 5022dnl dbopen is used by db1/db2 5023 5024 AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [ 5025 #include <stdio.h> 5026 #if defined(HAVE_DB2_DB_H) 5027 #include <db2/db.h> 5028 #elif defined(HAVE_DB_185_H) 5029 #include <db_185.h> 5030 #elif defined(HAVE_DB_H) 5031 #include <db.h> 5032 #else 5033 #error no db.h 5034 #endif 5035 ],[NULL, 0, 0, 0, NULL]) 5036 5037 if test "$ac_cv_func_dbopen" = "yes"; then 5038 db_type=db1 5039 if test "$ac_cv_funclib_dbopen" != "yes"; then 5040 DBLIB="$ac_cv_funclib_dbopen" 5041 else 5042 DBLIB="" 5043 fi 5044 AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library]) 5045 fi 5046 fi 5047 5048dnl test for ndbm compatability 5049 5050 if test "$ac_cv_func_dbm_firstkey" != yes; then 5051 AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [ 5052 #include <stdio.h> 5053 #define DB_DBM_HSEARCH 1 5054 #include <db.h> 5055 DBM *dbm; 5056 ],[NULL]) 5057 5058 if test "$ac_cv_func_dbm_firstkey" = "yes"; then 5059 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then 5060 LIB_NDBM="$ac_cv_funclib_dbm_firstkey" 5061 else 5062 LIB_NDBM="" 5063 fi 5064 AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db]) 5065 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) 5066 else 5067 $as_unset ac_cv_func_dbm_firstkey 5068 $as_unset ac_cv_funclib_dbm_firstkey 5069 fi 5070 fi 5071 5072fi # berkeley db 5073 5074if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then 5075 5076 AC_CHECK_HEADERS([ \ 5077 dbm.h \ 5078 ndbm.h \ 5079 ]) 5080 5081 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [ 5082 #include <stdio.h> 5083 #if defined(HAVE_NDBM_H) 5084 #include <ndbm.h> 5085 #elif defined(HAVE_DBM_H) 5086 #include <dbm.h> 5087 #endif 5088 DBM *dbm; 5089 ],[NULL]) 5090 5091 if test "$ac_cv_func_dbm_firstkey" = "yes"; then 5092 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then 5093 LIB_NDBM="$ac_cv_funclib_dbm_firstkey" 5094 else 5095 LIB_NDBM="" 5096 fi 5097 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl 5098 have_ndbm=yes 5099 if test "$db_type" = "unknown"; then 5100 db_type=ndbm 5101 DBLIB="$LIB_NDBM" 5102 fi 5103 else 5104 5105 $as_unset ac_cv_func_dbm_firstkey 5106 $as_unset ac_cv_funclib_dbm_firstkey 5107 5108 AC_CHECK_HEADERS([ \ 5109 gdbm/ndbm.h \ 5110 ]) 5111 5112 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [ 5113 #include <stdio.h> 5114 #include <gdbm/ndbm.h> 5115 DBM *dbm; 5116 ],[NULL]) 5117 5118 if test "$ac_cv_func_dbm_firstkey" = "yes"; then 5119 if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then 5120 LIB_NDBM="$ac_cv_funclib_dbm_firstkey" 5121 else 5122 LIB_NDBM="" 5123 fi 5124 AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl 5125 have_ndbm=yes 5126 if test "$db_type" = "unknown"; then 5127 db_type=ndbm 5128 DBLIB="$LIB_NDBM" 5129 fi 5130 fi 5131 fi 5132 5133fi # unknown 5134 5135if test "$have_ndbm" = "yes"; then 5136 AC_MSG_CHECKING([if ndbm is implemented with db]) 5137 AC_TRY_RUN([ 5138#include <unistd.h> 5139#include <fcntl.h> 5140#if defined(HAVE_GDBM_NDBM_H) 5141#include <gdbm/ndbm.h> 5142#elif defined(HAVE_NDBM_H) 5143#include <ndbm.h> 5144#elif defined(HAVE_DBM_H) 5145#include <dbm.h> 5146#endif 5147int main() 5148{ 5149 DBM *d; 5150 5151 d = dbm_open("conftest", O_RDWR | O_CREAT, 0666); 5152 if (d == NULL) 5153 return 1; 5154 dbm_close(d); 5155 return 0; 5156}],[ 5157 if test -f conftest.db; then 5158 AC_MSG_RESULT([yes]) 5159 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) 5160 else 5161 AC_MSG_RESULT([no]) 5162 fi],[AC_MSG_RESULT([no])]) 5163fi 5164 5165AM_CONDITIONAL(HAVE_DB1, test "$db_type" = db1)dnl 5166AM_CONDITIONAL(HAVE_DB3, test "$db_type" = db3)dnl 5167AM_CONDITIONAL(HAVE_NDBM, test "$db_type" = ndbm)dnl 5168 5169z="" 5170for i in $LDFLAGS; do 5171 case "$i" in 5172 -L*) z="$z $i";; 5173 esac 5174done 5175DBLIB="$z $DBLIB" 5176AC_SUBST(DBLIB)dnl 5177AC_SUBST(LIB_NDBM)dnl 5178]) 5179 5180dnl $Id: roken-frag.m4,v 1.44 2002/09/04 20:57:30 joda Exp $ 5181dnl 5182dnl some code to get roken working 5183dnl 5184dnl rk_ROKEN(subdir) 5185dnl 5186AC_DEFUN(rk_ROKEN, [ 5187 5188AC_REQUIRE([rk_CONFIG_HEADER]) 5189 5190DIR_roken=roken 5191LIB_roken='$(top_builddir)/$1/libroken.la' 5192INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1' 5193 5194dnl Checks for programs 5195AC_REQUIRE([AC_PROG_CC]) 5196AC_REQUIRE([AC_PROG_AWK]) 5197AC_REQUIRE([AC_OBJEXT]) 5198AC_REQUIRE([AC_EXEEXT]) 5199AC_REQUIRE([AC_PROG_LIBTOOL]) 5200 5201AC_REQUIRE([AC_MIPS_ABI]) 5202 5203dnl C characteristics 5204 5205AC_REQUIRE([AC_C___ATTRIBUTE__]) 5206AC_REQUIRE([AC_C_INLINE]) 5207AC_REQUIRE([AC_C_CONST]) 5208AC_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs) 5209 5210AC_REQUIRE([rk_DB]) 5211 5212dnl C types 5213 5214AC_REQUIRE([AC_TYPE_SIZE_T]) 5215AC_HAVE_TYPE([ssize_t],[#include <unistd.h>]) 5216AC_REQUIRE([AC_TYPE_PID_T]) 5217AC_REQUIRE([AC_TYPE_UID_T]) 5218AC_HAVE_TYPE([long long]) 5219 5220AC_REQUIRE([rk_RETSIGTYPE]) 5221 5222dnl Checks for header files. 5223AC_REQUIRE([AC_HEADER_STDC]) 5224AC_REQUIRE([AC_HEADER_TIME]) 5225 5226AC_CHECK_HEADERS([\ 5227 arpa/inet.h \ 5228 arpa/nameser.h \ 5229 config.h \ 5230 crypt.h \ 5231 dirent.h \ 5232 errno.h \ 5233 err.h \ 5234 fcntl.h \ 5235 grp.h \ 5236 ifaddrs.h \ 5237 net/if.h \ 5238 netdb.h \ 5239 netinet/in.h \ 5240 netinet/in6.h \ 5241 netinet/in_systm.h \ 5242 netinet6/in6.h \ 5243 netinet6/in6_var.h \ 5244 paths.h \ 5245 pwd.h \ 5246 resolv.h \ 5247 rpcsvc/ypclnt.h \ 5248 shadow.h \ 5249 sys/bswap.h \ 5250 sys/ioctl.h \ 5251 sys/mman.h \ 5252 sys/param.h \ 5253 sys/proc.h \ 5254 sys/resource.h \ 5255 sys/socket.h \ 5256 sys/sockio.h \ 5257 sys/stat.h \ 5258 sys/sysctl.h \ 5259 sys/time.h \ 5260 sys/tty.h \ 5261 sys/types.h \ 5262 sys/uio.h \ 5263 sys/utsname.h \ 5264 sys/wait.h \ 5265 syslog.h \ 5266 termios.h \ 5267 unistd.h \ 5268 userconf.h \ 5269 usersec.h \ 5270 util.h \ 5271 vis.h \ 5272]) 5273 5274AC_REQUIRE([CHECK_NETINET_IP_AND_TCP]) 5275 5276AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes) 5277AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes) 5278AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes) 5279AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes) 5280 5281dnl Check for functions and libraries 5282 5283AC_FIND_FUNC(socket, socket) 5284AC_FIND_FUNC(gethostbyname, nsl) 5285AC_FIND_FUNC(syslog, syslog) 5286 5287AC_KRB_IPV6 5288 5289AC_FIND_FUNC(gethostbyname2, inet6 ip6) 5290 5291AC_FIND_FUNC(res_search, resolv, 5292[ 5293#include <stdio.h> 5294#ifdef HAVE_SYS_TYPES_H 5295#include <sys/types.h> 5296#endif 5297#ifdef HAVE_NETINET_IN_H 5298#include <netinet/in.h> 5299#endif 5300#ifdef HAVE_ARPA_NAMESER_H 5301#include <arpa/nameser.h> 5302#endif 5303#ifdef HAVE_RESOLV_H 5304#include <resolv.h> 5305#endif 5306], 5307[0,0,0,0,0]) 5308 5309AC_FIND_FUNC(res_nsearch, resolv, 5310[ 5311#include <stdio.h> 5312#ifdef HAVE_SYS_TYPES_H 5313#include <sys/types.h> 5314#endif 5315#ifdef HAVE_NETINET_IN_H 5316#include <netinet/in.h> 5317#endif 5318#ifdef HAVE_ARPA_NAMESER_H 5319#include <arpa/nameser.h> 5320#endif 5321#ifdef HAVE_RESOLV_H 5322#include <resolv.h> 5323#endif 5324], 5325[0,0,0,0,0]) 5326 5327AC_FIND_FUNC(dn_expand, resolv, 5328[ 5329#include <stdio.h> 5330#ifdef HAVE_SYS_TYPES_H 5331#include <sys/types.h> 5332#endif 5333#ifdef HAVE_NETINET_IN_H 5334#include <netinet/in.h> 5335#endif 5336#ifdef HAVE_ARPA_NAMESER_H 5337#include <arpa/nameser.h> 5338#endif 5339#ifdef HAVE_RESOLV_H 5340#include <resolv.h> 5341#endif 5342], 5343[0,0,0,0,0]) 5344 5345rk_CHECK_VAR(_res, 5346[#include <stdio.h> 5347#ifdef HAVE_SYS_TYPES_H 5348#include <sys/types.h> 5349#endif 5350#ifdef HAVE_NETINET_IN_H 5351#include <netinet/in.h> 5352#endif 5353#ifdef HAVE_ARPA_NAMESER_H 5354#include <arpa/nameser.h> 5355#endif 5356#ifdef HAVE_RESOLV_H 5357#include <resolv.h> 5358#endif]) 5359 5360 5361AC_BROKEN_SNPRINTF 5362AC_BROKEN_VSNPRINTF 5363 5364AC_BROKEN_GLOB 5365if test "$ac_cv_func_glob_working" != yes; then 5366 AC_LIBOBJ(glob) 5367fi 5368AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes) 5369 5370 5371AC_CHECK_FUNCS([ \ 5372 asnprintf \ 5373 asprintf \ 5374 atexit \ 5375 cgetent \ 5376 getconfattr \ 5377 getprogname \ 5378 getrlimit \ 5379 getspnam \ 5380 initstate \ 5381 issetugid \ 5382 on_exit \ 5383 random \ 5384 setprogname \ 5385 setstate \ 5386 strsvis \ 5387 strunvis \ 5388 strvis \ 5389 strvisx \ 5390 svis \ 5391 sysconf \ 5392 sysctl \ 5393 uname \ 5394 unvis \ 5395 vasnprintf \ 5396 vasprintf \ 5397 vis \ 5398]) 5399 5400if test "$ac_cv_func_cgetent" = no; then 5401 AC_LIBOBJ(getcap) 5402fi 5403 5404AC_REQUIRE([AC_FUNC_GETLOGIN]) 5405 5406AC_REQUIRE([AC_FUNC_MMAP]) 5407 5408AC_FIND_FUNC_NO_LIBS(getsockopt,, 5409[#ifdef HAVE_SYS_TYPES_H 5410#include <sys/types.h> 5411#endif 5412#ifdef HAVE_SYS_SOCKET_H 5413#include <sys/socket.h> 5414#endif], 5415[0,0,0,0,0]) 5416AC_FIND_FUNC_NO_LIBS(setsockopt,, 5417[#ifdef HAVE_SYS_TYPES_H 5418#include <sys/types.h> 5419#endif 5420#ifdef HAVE_SYS_SOCKET_H 5421#include <sys/socket.h> 5422#endif], 5423[0,0,0,0,0]) 5424 5425AC_FIND_IF_NOT_BROKEN(hstrerror, resolv, 5426[#ifdef HAVE_NETDB_H 5427#include <netdb.h> 5428#endif], 542917) 5430AC_NEED_PROTO([ 5431#ifdef HAVE_NETDB_H 5432#include <netdb.h> 5433#endif], 5434hstrerror) 5435 5436AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf], 5437 [AC_NEED_PROTO([ 5438 #include <stdio.h> 5439 #include <string.h>], 5440 rk_func)]) 5441 5442AC_FIND_FUNC_NO_LIBS(bswap16,, 5443[#ifdef HAVE_SYS_BSWAP_H 5444#include <sys/bswap.h> 5445#endif],0) 5446 5447AC_FIND_FUNC_NO_LIBS(bswap32,, 5448[#ifdef HAVE_SYS_BSWAP_H 5449#include <sys/bswap.h> 5450#endif],0) 5451 5452AC_FIND_FUNC_NO_LIBS(pidfile,util, 5453[#ifdef HAVE_UTIL_H 5454#include <util.h> 5455#endif],0) 5456 5457AC_FIND_IF_NOT_BROKEN(getaddrinfo,, 5458[#ifdef HAVE_NETDB_H 5459#include <netdb.h> 5460#endif],[0,0,0,0]) 5461 5462AC_FIND_IF_NOT_BROKEN(getnameinfo,, 5463[#ifdef HAVE_NETDB_H 5464#include <netdb.h> 5465#endif],[0,0,0,0,0,0,0]) 5466 5467AC_FIND_IF_NOT_BROKEN(freeaddrinfo,, 5468[#ifdef HAVE_NETDB_H 5469#include <netdb.h> 5470#endif],[0]) 5471 5472AC_FIND_IF_NOT_BROKEN(gai_strerror,, 5473[#ifdef HAVE_NETDB_H 5474#include <netdb.h> 5475#endif],[0]) 5476 5477AC_BROKEN([ \ 5478 chown \ 5479 copyhostent \ 5480 daemon \ 5481 ecalloc \ 5482 emalloc \ 5483 erealloc \ 5484 estrdup \ 5485 err \ 5486 errx \ 5487 fchown \ 5488 flock \ 5489 fnmatch \ 5490 freehostent \ 5491 getcwd \ 5492 getdtablesize \ 5493 getegid \ 5494 geteuid \ 5495 getgid \ 5496 gethostname \ 5497 getifaddrs \ 5498 getipnodebyaddr \ 5499 getipnodebyname \ 5500 getopt \ 5501 gettimeofday \ 5502 getuid \ 5503 getusershell \ 5504 initgroups \ 5505 innetgr \ 5506 iruserok \ 5507 localtime_r \ 5508 lstat \ 5509 memmove \ 5510 mkstemp \ 5511 putenv \ 5512 rcmd \ 5513 readv \ 5514 recvmsg \ 5515 sendmsg \ 5516 setegid \ 5517 setenv \ 5518 seteuid \ 5519 strcasecmp \ 5520 strdup \ 5521 strerror \ 5522 strftime \ 5523 strlcat \ 5524 strlcpy \ 5525 strlwr \ 5526 strncasecmp \ 5527 strndup \ 5528 strnlen \ 5529 strptime \ 5530 strsep \ 5531 strsep_copy \ 5532 strtok_r \ 5533 strupr \ 5534 swab \ 5535 unsetenv \ 5536 verr \ 5537 verrx \ 5538 vsyslog \ 5539 vwarn \ 5540 vwarnx \ 5541 warn \ 5542 warnx \ 5543 writev \ 5544]) 5545 5546AC_FOREACH([rk_func], [strndup strsep strtok_r], 5547 [AC_NEED_PROTO([#include <string.h>], rk_func)]) 5548 5549AC_FOREACH([rk_func], [strsvis strunvis strvis strvisx svis unvis vis], 5550[AC_NEED_PROTO([#ifdef HAVE_VIS_H 5551#include <vis.h> 5552#endif], rk_func)]) 5553 5554AC_BROKEN2(inet_aton, 5555[#ifdef HAVE_SYS_TYPES_H 5556#include <sys/types.h> 5557#endif 5558#ifdef HAVE_SYS_SOCKET_H 5559#include <sys/socket.h> 5560#endif 5561#ifdef HAVE_NETINET_IN_H 5562#include <netinet/in.h> 5563#endif 5564#ifdef HAVE_ARPA_INET_H 5565#include <arpa/inet.h> 5566#endif], 5567[0,0]) 5568 5569AC_BROKEN2(inet_ntop, 5570[#ifdef HAVE_SYS_TYPES_H 5571#include <sys/types.h> 5572#endif 5573#ifdef HAVE_SYS_SOCKET_H 5574#include <sys/socket.h> 5575#endif 5576#ifdef HAVE_NETINET_IN_H 5577#include <netinet/in.h> 5578#endif 5579#ifdef HAVE_ARPA_INET_H 5580#include <arpa/inet.h> 5581#endif], 5582[0, 0, 0, 0]) 5583 5584AC_BROKEN2(inet_pton, 5585[#ifdef HAVE_SYS_TYPES_H 5586#include <sys/types.h> 5587#endif 5588#ifdef HAVE_SYS_SOCKET_H 5589#include <sys/socket.h> 5590#endif 5591#ifdef HAVE_NETINET_IN_H 5592#include <netinet/in.h> 5593#endif 5594#ifdef HAVE_ARPA_INET_H 5595#include <arpa/inet.h> 5596#endif], 5597[0,0,0]) 5598 5599dnl 5600dnl Check for sa_len in struct sockaddr, 5601dnl needs to come before the getnameinfo test 5602dnl 5603AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h> 5604#include <sys/socket.h>]) 5605 5606if test "$ac_cv_func_getnameinfo" = "yes"; then 5607 rk_BROKEN_GETNAMEINFO 5608 if test "$ac_cv_func_getnameinfo_broken" = yes; then 5609 AC_LIBOBJ(getnameinfo) 5610 fi 5611fi 5612 5613if test "$ac_cv_func_getaddrinfo" = "yes"; then 5614 rk_BROKEN_GETADDRINFO 5615 if test "$ac_cv_func_getaddrinfo_numserv" = no; then 5616 AC_LIBOBJ(getaddrinfo) 5617 AC_LIBOBJ(freeaddrinfo) 5618 fi 5619fi 5620 5621AC_NEED_PROTO([#include <stdlib.h>], setenv) 5622AC_NEED_PROTO([#include <stdlib.h>], unsetenv) 5623AC_NEED_PROTO([#include <unistd.h>], gethostname) 5624AC_NEED_PROTO([#include <unistd.h>], mkstemp) 5625AC_NEED_PROTO([#include <unistd.h>], getusershell) 5626 5627AC_NEED_PROTO([ 5628#ifdef HAVE_SYS_TYPES_H 5629#include <sys/types.h> 5630#endif 5631#ifdef HAVE_SYS_SOCKET_H 5632#include <sys/socket.h> 5633#endif 5634#ifdef HAVE_NETINET_IN_H 5635#include <netinet/in.h> 5636#endif 5637#ifdef HAVE_ARPA_INET_H 5638#include <arpa/inet.h> 5639#endif], 5640inet_aton) 5641 5642AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl 5643 5644AC_REQUIRE([rk_BROKEN_REALLOC])dnl 5645 5646dnl AC_KRB_FUNC_GETCWD_BROKEN 5647 5648dnl 5649dnl Checks for prototypes and declarations 5650dnl 5651 5652AC_PROTO_COMPAT([ 5653#ifdef HAVE_SYS_TYPES_H 5654#include <sys/types.h> 5655#endif 5656#ifdef HAVE_SYS_SOCKET_H 5657#include <sys/socket.h> 5658#endif 5659#ifdef HAVE_NETINET_IN_H 5660#include <netinet/in.h> 5661#endif 5662#ifdef HAVE_ARPA_INET_H 5663#include <arpa/inet.h> 5664#endif 5665#ifdef HAVE_NETDB_H 5666#include <netdb.h> 5667#endif 5668], 5669gethostbyname, struct hostent *gethostbyname(const char *)) 5670 5671AC_PROTO_COMPAT([ 5672#ifdef HAVE_SYS_TYPES_H 5673#include <sys/types.h> 5674#endif 5675#ifdef HAVE_SYS_SOCKET_H 5676#include <sys/socket.h> 5677#endif 5678#ifdef HAVE_NETINET_IN_H 5679#include <netinet/in.h> 5680#endif 5681#ifdef HAVE_ARPA_INET_H 5682#include <arpa/inet.h> 5683#endif 5684#ifdef HAVE_NETDB_H 5685#include <netdb.h> 5686#endif 5687], 5688gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int)) 5689 5690AC_PROTO_COMPAT([ 5691#ifdef HAVE_SYS_TYPES_H 5692#include <sys/types.h> 5693#endif 5694#ifdef HAVE_SYS_SOCKET_H 5695#include <sys/socket.h> 5696#endif 5697#ifdef HAVE_NETINET_IN_H 5698#include <netinet/in.h> 5699#endif 5700#ifdef HAVE_ARPA_INET_H 5701#include <arpa/inet.h> 5702#endif 5703#ifdef HAVE_NETDB_H 5704#include <netdb.h> 5705#endif 5706], 5707getservbyname, struct servent *getservbyname(const char *, const char *)) 5708 5709AC_PROTO_COMPAT([ 5710#ifdef HAVE_SYS_TYPES_H 5711#include <sys/types.h> 5712#endif 5713#ifdef HAVE_SYS_SOCKET_H 5714#include <sys/socket.h> 5715#endif 5716], 5717getsockname, int getsockname(int, struct sockaddr*, socklen_t*)) 5718 5719AC_PROTO_COMPAT([ 5720#ifdef HAVE_SYSLOG_H 5721#include <syslog.h> 5722#endif 5723], 5724openlog, void openlog(const char *, int, int)) 5725 5726AC_NEED_PROTO([ 5727#ifdef HAVE_CRYPT_H 5728#include <crypt.h> 5729#endif 5730#ifdef HAVE_UNISTD_H 5731#include <unistd.h> 5732#endif 5733], 5734crypt) 5735 5736dnl variables 5737 5738rk_CHECK_VAR(h_errno, 5739[#ifdef HAVE_SYS_TYPES_H 5740#include <sys/types.h> 5741#endif 5742#ifdef HAVE_NETDB_H 5743#include <netdb.h> 5744#endif]) 5745 5746rk_CHECK_VAR(h_errlist, 5747[#ifdef HAVE_NETDB_H 5748#include <netdb.h> 5749#endif]) 5750 5751rk_CHECK_VAR(h_nerr, 5752[#ifdef HAVE_NETDB_H 5753#include <netdb.h> 5754#endif]) 5755 5756rk_CHECK_VAR([__progname], 5757[#ifdef HAVE_ERR_H 5758#include <err.h> 5759#endif]) 5760 5761AC_CHECK_DECLARATION([#include <stdlib.h> 5762#ifdef HAVE_UNISTD_H 5763#include <unistd.h> 5764#endif], optarg) 5765AC_CHECK_DECLARATION([#include <stdlib.h> 5766#ifdef HAVE_UNISTD_H 5767#include <unistd.h> 5768#endif], optind) 5769AC_CHECK_DECLARATION([#include <stdlib.h> 5770#ifdef HAVE_UNISTD_H 5771#include <unistd.h> 5772#endif], opterr) 5773AC_CHECK_DECLARATION([#include <stdlib.h> 5774#ifdef HAVE_UNISTD_H 5775#include <unistd.h> 5776#endif], optopt) 5777 5778AC_CHECK_DECLARATION([#include <stdlib.h>], environ) 5779 5780dnl 5781dnl Check for fields in struct tm 5782dnl 5783 5784AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>]) 5785AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>]) 5786 5787dnl 5788dnl or do we have a variable `timezone' ? 5789dnl 5790 5791rk_CHECK_VAR(timezone,[#include <time.h>]) 5792rk_CHECK_VAR(altzone,[#include <time.h>]) 5793 5794AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>]) 5795AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>]) 5796AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>]) 5797AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>]) 5798AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>]) 5799AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>]) 5800AC_HAVE_TYPE([struct iovec],[ 5801#include <sys/types.h> 5802#include <sys/uio.h> 5803]) 5804AC_HAVE_TYPE([struct msghdr],[ 5805#include <sys/types.h> 5806#include <sys/socket.h> 5807]) 5808 5809dnl 5810dnl Check for struct winsize 5811dnl 5812 5813AC_KRB_STRUCT_WINSIZE 5814 5815dnl 5816dnl Check for struct spwd 5817dnl 5818 5819AC_KRB_STRUCT_SPWD 5820 5821dnl won't work with automake 5822dnl moved to AC_OUTPUT in configure.in 5823dnl AC_CONFIG_FILES($1/Makefile) 5824 5825LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)" 5826 5827AC_SUBST(DIR_roken)dnl 5828AC_SUBST(LIB_roken)dnl 5829AC_SUBST(INCLUDES_roken)dnl 5830]) 5831 5832dnl $Id: have-type.m4,v 1.6 2000/07/15 18:10:00 joda Exp $ 5833dnl 5834dnl check for existance of a type 5835 5836dnl AC_HAVE_TYPE(TYPE,INCLUDES) 5837AC_DEFUN(AC_HAVE_TYPE, [ 5838AC_REQUIRE([AC_HEADER_STDC]) 5839cv=`echo "$1" | sed 'y%./+- %__p__%'` 5840AC_MSG_CHECKING(for $1) 5841AC_CACHE_VAL([ac_cv_type_$cv], 5842AC_TRY_COMPILE( 5843[#include <sys/types.h> 5844#if STDC_HEADERS 5845#include <stdlib.h> 5846#include <stddef.h> 5847#endif 5848$2], 5849[$1 foo;], 5850eval "ac_cv_type_$cv=yes", 5851eval "ac_cv_type_$cv=no"))dnl 5852ac_foo=`eval echo \\$ac_cv_type_$cv` 5853AC_MSG_RESULT($ac_foo) 5854if test "$ac_foo" = yes; then 5855 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` 5856if false; then 5857 AC_CHECK_TYPES($1) 5858fi 5859 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1']) 5860fi 5861]) 5862 5863dnl 5864dnl $Id: retsigtype.m4,v 1.1 2000/07/15 18:05:56 joda Exp $ 5865dnl 5866dnl Figure out return type of signal handlers, and define SIGRETURN macro 5867dnl that can be used to return from one 5868dnl 5869AC_DEFUN(rk_RETSIGTYPE,[ 5870AC_TYPE_SIGNAL 5871if test "$ac_cv_type_signal" = "void" ; then 5872 AC_DEFINE(VOID_RETSIGTYPE, 1, [Define if signal handlers return void.]) 5873fi 5874AC_SUBST(VOID_RETSIGTYPE) 5875AH_BOTTOM([#ifdef VOID_RETSIGTYPE 5876#define SIGRETURN(x) return 5877#else 5878#define SIGRETURN(x) return (RETSIGTYPE)(x) 5879#endif]) 5880]) 5881dnl 5882dnl $Id: check-netinet-ip-and-tcp.m4,v 1.3 2000/07/18 10:33:02 joda Exp $ 5883dnl 5884 5885dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3 5886dnl you have to include standards.h before including these files 5887 5888AC_DEFUN(CHECK_NETINET_IP_AND_TCP, 5889[ 5890AC_CHECK_HEADERS(standards.h) 5891for i in netinet/ip.h netinet/tcp.h; do 5892 5893cv=`echo "$i" | sed 'y%./+-%__p_%'` 5894 5895AC_CACHE_CHECK([for $i],ac_cv_header_$cv, 5896[AC_TRY_CPP([\ 5897#ifdef HAVE_STANDARDS_H 5898#include <standards.h> 5899#endif 5900#include <$i> 5901], 5902eval "ac_cv_header_$cv=yes", 5903eval "ac_cv_header_$cv=no")]) 5904ac_res=`eval echo \\$ac_cv_header_$cv` 5905if test "$ac_res" = yes; then 5906 ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 5907 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1) 5908fi 5909done 5910if false;then 5911 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h) 5912fi 5913]) 5914 5915dnl $Id: krb-ipv6.m4,v 1.13 2002/04/30 16:48:13 joda Exp $ 5916dnl 5917dnl test for IPv6 5918dnl 5919AC_DEFUN(AC_KRB_IPV6, [ 5920AC_ARG_WITH(ipv6, 5921 AC_HELP_STRING([--without-ipv6],[do not enable IPv6 support]),[ 5922if test "$withval" = "no"; then 5923 ac_cv_lib_ipv6=no 5924fi]) 5925save_CFLAGS="${CFLAGS}" 5926AC_CACHE_CHECK([for IPv6 stack type], v6type, 5927[dnl check for different v6 implementations (by itojun) 5928v6type=unknown 5929v6lib=none 5930 5931for i in v6d toshiba kame inria zeta linux; do 5932 case $i in 5933 v6d) 5934 AC_EGREP_CPP(yes, [ 5935#include </usr/local/v6/include/sys/types.h> 5936#ifdef __V6D__ 5937yes 5938#endif], 5939 [v6type=$i; v6lib=v6; 5940 v6libdir=/usr/local/v6/lib; 5941 CFLAGS="-I/usr/local/v6/include $CFLAGS"]) 5942 ;; 5943 toshiba) 5944 AC_EGREP_CPP(yes, [ 5945#include <sys/param.h> 5946#ifdef _TOSHIBA_INET6 5947yes 5948#endif], 5949 [v6type=$i; v6lib=inet6; 5950 v6libdir=/usr/local/v6/lib; 5951 CFLAGS="-DINET6 $CFLAGS"]) 5952 ;; 5953 kame) 5954 AC_EGREP_CPP(yes, [ 5955#include <netinet/in.h> 5956#ifdef __KAME__ 5957yes 5958#endif], 5959 [v6type=$i; v6lib=inet6; 5960 v6libdir=/usr/local/v6/lib; 5961 CFLAGS="-DINET6 $CFLAGS"]) 5962 ;; 5963 inria) 5964 AC_EGREP_CPP(yes, [ 5965#include <netinet/in.h> 5966#ifdef IPV6_INRIA_VERSION 5967yes 5968#endif], 5969 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"]) 5970 ;; 5971 zeta) 5972 AC_EGREP_CPP(yes, [ 5973#include <sys/param.h> 5974#ifdef _ZETA_MINAMI_INET6 5975yes 5976#endif], 5977 [v6type=$i; v6lib=inet6; 5978 v6libdir=/usr/local/v6/lib; 5979 CFLAGS="-DINET6 $CFLAGS"]) 5980 ;; 5981 linux) 5982 if test -d /usr/inet6; then 5983 v6type=$i 5984 v6lib=inet6 5985 v6libdir=/usr/inet6 5986 CFLAGS="-DINET6 $CFLAGS" 5987 fi 5988 ;; 5989 esac 5990 if test "$v6type" != "unknown"; then 5991 break 5992 fi 5993done 5994 5995if test "$v6lib" != "none"; then 5996 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do 5997 if test -d $dir -a -f $dir/lib$v6lib.a; then 5998 LIBS="-L$dir -l$v6lib $LIBS" 5999 break 6000 fi 6001 done 6002fi 6003]) 6004 6005AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [ 6006AC_TRY_LINK([ 6007#ifdef HAVE_SYS_TYPES_H 6008#include <sys/types.h> 6009#endif 6010#ifdef HAVE_SYS_SOCKET_H 6011#include <sys/socket.h> 6012#endif 6013#ifdef HAVE_NETINET_IN_H 6014#include <netinet/in.h> 6015#endif 6016#ifdef HAVE_NETINET_IN6_H 6017#include <netinet/in6.h> 6018#endif 6019], 6020[ 6021 struct sockaddr_in6 sin6; 6022 int s; 6023 6024 s = socket(AF_INET6, SOCK_DGRAM, 0); 6025 6026 sin6.sin6_family = AF_INET6; 6027 sin6.sin6_port = htons(17); 6028 sin6.sin6_addr = in6addr_any; 6029 bind(s, (struct sockaddr *)&sin6, sizeof(sin6)); 6030], 6031ac_cv_lib_ipv6=yes, 6032ac_cv_lib_ipv6=no)]) 6033if test "$ac_cv_lib_ipv6" = yes; then 6034 AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.]) 6035else 6036 CFLAGS="${save_CFLAGS}" 6037fi 6038 6039if test "$ac_cv_lib_ipv6" = yes; then 6040 AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[ 6041 AC_TRY_LINK([ 6042#ifdef HAVE_SYS_TYPES_H 6043#include <sys/types.h> 6044#endif 6045#ifdef HAVE_SYS_SOCKET_H 6046#include <sys/socket.h> 6047#endif 6048#ifdef HAVE_NETINET_IN_H 6049#include <netinet/in.h> 6050#endif 6051#ifdef HAVE_NETINET_IN6_H 6052#include <netinet/in6.h> 6053#endif],[ 6054struct sockaddr_in6 sin6; 6055sin6.sin6_addr = in6addr_loopback; 6056],ac_cv_var_in6addr_loopback=yes,ac_cv_var_in6addr_loopback=no)]) 6057 if test "$ac_cv_var_in6addr_loopback" = yes; then 6058 AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1, 6059 [Define if you have the in6addr_loopback variable]) 6060 fi 6061fi 6062]) 6063dnl $Id: check-var.m4,v 1.6 2001/08/21 12:00:16 joda Exp $ 6064dnl 6065dnl rk_CHECK_VAR(variable, includes) 6066AC_DEFUN([rk_CHECK_VAR], [ 6067AC_MSG_CHECKING(for $1) 6068AC_CACHE_VAL(ac_cv_var_$1, [ 6069AC_TRY_LINK([extern int $1; 6070int foo() { return $1; }], 6071 [foo()], 6072 ac_cv_var_$1=yes, ac_cv_var_$1=no) 6073]) 6074ac_foo=`eval echo \\$ac_cv_var_$1` 6075AC_MSG_RESULT($ac_foo) 6076if test "$ac_foo" = yes; then 6077 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, 6078 [Define if you have the `]$1[' variable.]) 6079 m4_ifval([$2], AC_CHECK_DECLARATION([$2],[$1])) 6080fi 6081]) 6082 6083AC_WARNING_ENABLE([obsolete]) 6084AU_DEFUN([AC_CHECK_VAR], [rk_CHECK_VAR([$2], [$1])], [foo]) 6085dnl $Id: check-declaration.m4,v 1.3 1999/03/01 13:03:08 joda Exp $ 6086dnl 6087dnl 6088dnl Check if we need the declaration of a variable 6089dnl 6090 6091dnl AC_HAVE_DECLARATION(includes, variable) 6092AC_DEFUN(AC_CHECK_DECLARATION, [ 6093AC_MSG_CHECKING([if $2 is properly declared]) 6094AC_CACHE_VAL(ac_cv_var_$2_declaration, [ 6095AC_TRY_COMPILE([$1 6096extern struct { int foo; } $2;], 6097[$2.foo = 1;], 6098eval "ac_cv_var_$2_declaration=no", 6099eval "ac_cv_var_$2_declaration=yes") 6100]) 6101 6102define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION]) 6103 6104AC_MSG_RESULT($ac_cv_var_$2_declaration) 6105if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then 6106 AC_DEFINE(foo, 1, [define if your system declares $2]) 6107fi 6108undefine([foo]) 6109]) 6110 6111dnl $Id: broken-snprintf.m4,v 1.4 2001/09/01 11:56:05 assar Exp $ 6112dnl 6113AC_DEFUN(AC_BROKEN_SNPRINTF, [ 6114AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working, 6115ac_cv_func_snprintf_working=yes 6116AC_TRY_RUN([ 6117#include <stdio.h> 6118#include <string.h> 6119int main() 6120{ 6121 char foo[[3]]; 6122 snprintf(foo, 2, "12"); 6123 return strcmp(foo, "1"); 6124}],:,ac_cv_func_snprintf_working=no,:)) 6125 6126if test "$ac_cv_func_snprintf_working" = yes; then 6127 AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf]) 6128fi 6129if test "$ac_cv_func_snprintf_working" = yes; then 6130AC_NEED_PROTO([#include <stdio.h>],snprintf) 6131fi 6132]) 6133 6134AC_DEFUN(AC_BROKEN_VSNPRINTF,[ 6135AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working, 6136ac_cv_func_vsnprintf_working=yes 6137AC_TRY_RUN([ 6138#include <stdio.h> 6139#include <string.h> 6140#include <stdarg.h> 6141 6142int foo(int num, ...) 6143{ 6144 char bar[[3]]; 6145 va_list arg; 6146 va_start(arg, num); 6147 vsnprintf(bar, 2, "%s", arg); 6148 va_end(arg); 6149 return strcmp(bar, "1"); 6150} 6151 6152 6153int main() 6154{ 6155 return foo(0, "12"); 6156}],:,ac_cv_func_vsnprintf_working=no,:)) 6157 6158if test "$ac_cv_func_vsnprintf_working" = yes; then 6159 AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf]) 6160fi 6161if test "$ac_cv_func_vsnprintf_working" = yes; then 6162AC_NEED_PROTO([#include <stdio.h>],vsnprintf) 6163fi 6164]) 6165 6166dnl $Id: need-proto.m4,v 1.4 2002/08/23 15:07:41 joda Exp $ 6167dnl 6168dnl 6169dnl Check if we need the prototype for a function 6170dnl 6171 6172dnl AC_NEED_PROTO(includes, function) 6173 6174AC_DEFUN(AC_NEED_PROTO, [ 6175if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then 6176AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto, 6177AC_TRY_COMPILE([$1], 6178[struct foo { int foo; } xx; 6179extern int $2 (struct foo*); 6180$2(&xx); 6181], 6182eval "ac_cv_func_$2_noproto=yes", 6183eval "ac_cv_func_$2_noproto=no")) 6184if test "$ac_cv_func_$2_noproto" = yes; then 6185 AC_DEFINE(AS_TR_CPP(NEED_[]$2[]_PROTO), 1, 6186 [define if the system is missing a prototype for $2()]) 6187fi 6188fi 6189]) 6190 6191dnl $Id: broken-glob.m4,v 1.4 2001/06/19 09:59:46 assar Exp $ 6192dnl 6193dnl check for glob(3) 6194dnl 6195AC_DEFUN(AC_BROKEN_GLOB,[ 6196AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working, 6197ac_cv_func_glob_working=yes 6198AC_TRY_LINK([ 6199#include <stdio.h> 6200#include <glob.h>],[ 6201glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| 6202#ifdef GLOB_MAXPATH 6203GLOB_MAXPATH 6204#else 6205GLOB_LIMIT 6206#endif 6207, 6208NULL, NULL); 6209],:,ac_cv_func_glob_working=no,:)) 6210 6211if test "$ac_cv_func_glob_working" = yes; then 6212 AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks 6213 GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT]) 6214fi 6215if test "$ac_cv_func_glob_working" = yes; then 6216AC_NEED_PROTO([#include <stdio.h> 6217#include <glob.h>],glob) 6218fi 6219]) 6220 6221dnl 6222dnl $Id: krb-func-getlogin.m4,v 1.1 1999/07/13 17:45:30 assar Exp $ 6223dnl 6224dnl test for POSIX (broken) getlogin 6225dnl 6226 6227 6228AC_DEFUN(AC_FUNC_GETLOGIN, [ 6229AC_CHECK_FUNCS(getlogin setlogin) 6230if test "$ac_cv_func_getlogin" = yes; then 6231AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [ 6232if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then 6233 ac_cv_func_getlogin_posix=no 6234else 6235 ac_cv_func_getlogin_posix=yes 6236fi 6237]) 6238if test "$ac_cv_func_getlogin_posix" = yes; then 6239 AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).]) 6240fi 6241fi 6242]) 6243 6244dnl $Id: find-if-not-broken.m4,v 1.4 2002/05/19 19:37:08 joda Exp $ 6245dnl 6246dnl 6247dnl Mix between AC_FIND_FUNC and AC_BROKEN 6248dnl 6249 6250AC_DEFUN(AC_FIND_IF_NOT_BROKEN, 6251[AC_FIND_FUNC([$1], [$2], [$3], [$4]) 6252if eval "test \"$ac_cv_func_$1\" != yes"; then 6253 rk_LIBOBJ([$1]) 6254fi 6255]) 6256 6257dnl $Id: broken.m4,v 1.6 2002/05/19 19:36:52 joda Exp $ 6258dnl 6259dnl 6260dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal 6261dnl libraries 6262 6263AC_DEFUN([AC_BROKEN], 6264[AC_FOREACH([rk_func], [$1], 6265 [AC_CHECK_FUNC(rk_func, 6266 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]rk_func), 1, 6267 [Define if you have the function `]rk_func['.])], 6268 [rk_LIBOBJ(rk_func)])])]) 6269 6270dnl $Id: broken2.m4,v 1.4 2002/05/19 22:16:46 joda Exp $ 6271dnl 6272dnl AC_BROKEN but with more arguments 6273 6274dnl AC_BROKEN2(func, includes, arguments) 6275AC_DEFUN([AC_BROKEN2], 6276[AC_MSG_CHECKING([for $1]) 6277AC_CACHE_VAL(ac_cv_func_[]$1, 6278[AC_TRY_LINK([$2], 6279[ 6280/* The GNU C library defines this for functions which it implements 6281 to always fail with ENOSYS. Some functions are actually named 6282 something starting with __ and the normal name is an alias. */ 6283#if defined (__stub_$1) || defined (__stub___$1) 6284choke me 6285#else 6286$1($3) 6287#endif 6288], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])]) 6289if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then 6290 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define) 6291 AC_MSG_RESULT(yes) 6292else 6293 AC_MSG_RESULT(no) 6294 rk_LIBOBJ($1) 6295fi]) 6296 6297dnl $Id: have-struct-field.m4,v 1.6 1999/07/29 01:44:32 assar Exp $ 6298dnl 6299dnl check for fields in a structure 6300dnl 6301dnl AC_HAVE_STRUCT_FIELD(struct, field, headers) 6302 6303AC_DEFUN(AC_HAVE_STRUCT_FIELD, [ 6304define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_])) 6305AC_CACHE_CHECK([for $2 in $1], cache_val,[ 6306AC_TRY_COMPILE([$3],[$1 x; x.$2;], 6307cache_val=yes, 6308cache_val=no)]) 6309if test "$cache_val" = yes; then 6310 define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_])) 6311 AC_DEFINE(foo, 1, [Define if $1 has field $2.]) 6312 undefine([foo]) 6313fi 6314undefine([cache_val]) 6315]) 6316 6317dnl $Id: broken-getnameinfo.m4,v 1.2 2000/12/05 09:09:00 joda Exp $ 6318dnl 6319dnl test for broken AIX getnameinfo 6320 6321AC_DEFUN(rk_BROKEN_GETNAMEINFO,[ 6322AC_CACHE_CHECK([if getnameinfo is broken], ac_cv_func_getnameinfo_broken, 6323AC_TRY_RUN([[#include <stdio.h> 6324#include <sys/types.h> 6325#include <sys/socket.h> 6326#include <netinet/in.h> 6327#include <netdb.h> 6328 6329int 6330main(int argc, char **argv) 6331{ 6332 struct sockaddr_in sin; 6333 char host[256]; 6334 memset(&sin, 0, sizeof(sin)); 6335#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN 6336 sin.sin_len = sizeof(sin); 6337#endif 6338 sin.sin_family = AF_INET; 6339 sin.sin_addr.s_addr = 0xffffffff; 6340 sin.sin_port = 0; 6341 return getnameinfo((struct sockaddr*)&sin, sizeof(sin), host, sizeof(host), 6342 NULL, 0, 0); 6343} 6344]], ac_cv_func_getnameinfo_broken=no, ac_cv_func_getnameinfo_broken=yes))]) 6345 6346dnl $Id: broken-getaddrinfo.m4,v 1.3 2002/08/20 14:09:40 joda Exp $ 6347dnl 6348dnl test if getaddrinfo can handle numeric services 6349 6350AC_DEFUN(rk_BROKEN_GETADDRINFO,[ 6351AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv, 6352AC_TRY_RUN([[#include <stdio.h> 6353#include <sys/types.h> 6354#include <sys/socket.h> 6355#include <netdb.h> 6356 6357int 6358main(int argc, char **argv) 6359{ 6360 struct addrinfo hints, *ai; 6361 memset(&hints, 0, sizeof(hints)); 6362 hints.ai_flags = AI_PASSIVE; 6363 hints.ai_socktype = SOCK_STREAM; 6364 hints.ai_family = PF_UNSPEC; 6365 if(getaddrinfo(NULL, "17", &hints, &ai) != 0) 6366 return 1; 6367 return 0; 6368} 6369]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))]) 6370 6371dnl 6372dnl $Id: broken-realloc.m4,v 1.1 2000/07/15 18:05:36 joda Exp $ 6373dnl 6374dnl Test for realloc that doesn't handle NULL as first parameter 6375dnl 6376AC_DEFUN(rk_BROKEN_REALLOC, [ 6377AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [ 6378ac_cv_func_realloc_broken=no 6379AC_TRY_RUN([ 6380#include <stddef.h> 6381#include <stdlib.h> 6382 6383int main() 6384{ 6385 return realloc(NULL, 17) == NULL; 6386} 6387],:, ac_cv_func_realloc_broken=yes, :) 6388]) 6389if test "$ac_cv_func_realloc_broken" = yes ; then 6390 AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.]) 6391fi 6392AH_BOTTOM([#ifdef BROKEN_REALLOC 6393#define realloc(X, Y) isoc_realloc((X), (Y)) 6394#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y)) 6395#endif]) 6396]) 6397 6398dnl $Id: proto-compat.m4,v 1.3 1999/03/01 13:03:48 joda Exp $ 6399dnl 6400dnl 6401dnl Check if the prototype of a function is compatible with another one 6402dnl 6403 6404dnl AC_PROTO_COMPAT(includes, function, prototype) 6405 6406AC_DEFUN(AC_PROTO_COMPAT, [ 6407AC_CACHE_CHECK([if $2 is compatible with system prototype], 6408ac_cv_func_$2_proto_compat, 6409AC_TRY_COMPILE([$1], 6410[$3;], 6411eval "ac_cv_func_$2_proto_compat=yes", 6412eval "ac_cv_func_$2_proto_compat=no")) 6413define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE]) 6414if test "$ac_cv_func_$2_proto_compat" = yes; then 6415 AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with 6416 $3]) 6417fi 6418undefine([foo]) 6419]) 6420dnl $Id: krb-struct-winsize.m4,v 1.3 2001/09/01 11:56:05 assar Exp $ 6421dnl 6422dnl 6423dnl Search for struct winsize 6424dnl 6425 6426AC_DEFUN(AC_KRB_STRUCT_WINSIZE, [ 6427AC_MSG_CHECKING(for struct winsize) 6428AC_CACHE_VAL(ac_cv_struct_winsize, [ 6429ac_cv_struct_winsize=no 6430for i in sys/termios.h sys/ioctl.h; do 6431AC_EGREP_HEADER( 6432struct[[ ]]*winsize,dnl 6433$i, ac_cv_struct_winsize=yes; break)dnl 6434done 6435]) 6436if test "$ac_cv_struct_winsize" = "yes"; then 6437 AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h]) 6438fi 6439AC_MSG_RESULT($ac_cv_struct_winsize) 6440AC_EGREP_HEADER(ws_xpixel, termios.h, 6441 AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel])) 6442AC_EGREP_HEADER(ws_ypixel, termios.h, 6443 AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel])) 6444]) 6445 6446dnl $Id: krb-struct-spwd.m4,v 1.3 1999/07/13 21:04:11 assar Exp $ 6447dnl 6448dnl Test for `struct spwd' 6449 6450AC_DEFUN(AC_KRB_STRUCT_SPWD, [ 6451AC_MSG_CHECKING(for struct spwd) 6452AC_CACHE_VAL(ac_cv_struct_spwd, [ 6453AC_TRY_COMPILE( 6454[#include <pwd.h> 6455#ifdef HAVE_SHADOW_H 6456#include <shadow.h> 6457#endif], 6458[struct spwd foo;], 6459ac_cv_struct_spwd=yes, 6460ac_cv_struct_spwd=no) 6461]) 6462AC_MSG_RESULT($ac_cv_struct_spwd) 6463 6464if test "$ac_cv_struct_spwd" = "yes"; then 6465 AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd]) 6466fi 6467]) 6468 6469dnl $Id: otp.m4,v 1.2 2002/05/19 20:51:08 joda Exp $ 6470dnl 6471dnl check requirements for OTP library 6472dnl 6473AC_DEFUN([rk_OTP],[ 6474AC_REQUIRE([rk_DB])dnl 6475AC_ARG_ENABLE(otp, 6476 AC_HELP_STRING([--disable-otp],[if you don't want OTP support])) 6477if test "$enable_otp" = yes -a "$db_type" = unknown; then 6478 AC_MSG_ERROR([OTP requires a NDBM/DB compatible library]) 6479fi 6480if test "$enable_otp" != no; then 6481 if test "$db_type" != unknown; then 6482 enable_otp=yes 6483 else 6484 enable_otp=no 6485 fi 6486fi 6487if test "$enable_otp" = yes; then 6488 AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.]) 6489 LIB_otp='$(top_builddir)/lib/otp/libotp.la' 6490 AC_SUBST(LIB_otp) 6491fi 6492AC_MSG_CHECKING([whether to enable OTP library]) 6493AC_MSG_RESULT($enable_otp) 6494AM_CONDITIONAL(OTP, test "$enable_otp" = yes)dnl 6495]) 6496 6497dnl $Id: osfc2.m4,v 1.3 2002/04/30 16:46:18 joda Exp $ 6498dnl 6499dnl enable OSF C2 stuff 6500 6501AC_DEFUN(AC_CHECK_OSFC2,[ 6502AC_ARG_ENABLE(osfc2, 6503 AC_HELP_STRING([--enable-osfc2],[enable some OSF C2 support])) 6504LIB_security= 6505if test "$enable_osfc2" = yes; then 6506 AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.]) 6507 LIB_security=-lsecurity 6508fi 6509AC_SUBST(LIB_security) 6510]) 6511 6512dnl $Id: check-man.m4,v 1.3 2000/11/30 01:47:17 joda Exp $ 6513dnl check how to format manual pages 6514dnl 6515 6516AC_DEFUN(rk_CHECK_MAN, 6517[AC_PATH_PROG(NROFF, nroff) 6518AC_PATH_PROG(GROFF, groff) 6519AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format, 6520[cat > conftest.1 << END 6521.Dd January 1, 1970 6522.Dt CONFTEST 1 6523.Sh NAME 6524.Nm conftest 6525.Nd 6526foobar 6527END 6528 6529if test "$NROFF" ; then 6530 for i in "-mdoc" "-mandoc"; do 6531 if "$NROFF" $i conftest.1 2> /dev/null | \ 6532 grep Jan > /dev/null 2>&1 ; then 6533 ac_cv_sys_man_format="$NROFF $i" 6534 break 6535 fi 6536 done 6537fi 6538if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then 6539 for i in "-mdoc" "-mandoc"; do 6540 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \ 6541 grep Jan > /dev/null 2>&1 ; then 6542 ac_cv_sys_man_format="$GROFF -Tascii $i" 6543 break 6544 fi 6545 done 6546fi 6547if test "$ac_cv_sys_man_format"; then 6548 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@" 6549fi 6550]) 6551if test "$ac_cv_sys_man_format"; then 6552 CATMAN="$ac_cv_sys_man_format" 6553 AC_SUBST(CATMAN) 6554fi 6555AM_CONDITIONAL(CATMAN, test "$CATMAN") 6556AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext, 6557[if grep _suffix /etc/man.conf > /dev/null 2>&1; then 6558 ac_cv_sys_catman_ext=0 6559else 6560 ac_cv_sys_catman_ext=number 6561fi 6562]) 6563if test "$ac_cv_sys_catman_ext" = number; then 6564 CATMANEXT='$$section' 6565else 6566 CATMANEXT=0 6567fi 6568AC_SUBST(CATMANEXT) 6569]) 6570dnl 6571dnl $Id: krb-bigendian.m4,v 1.8 2002/08/28 19:20:19 joda Exp $ 6572dnl 6573 6574dnl check if this computer is little or big-endian 6575dnl if we can figure it out at compile-time then don't define the cpp symbol 6576dnl otherwise test for it and define it. also allow options for overriding 6577dnl it when cross-compiling 6578 6579AC_DEFUN(KRB_C_BIGENDIAN, [ 6580AC_ARG_ENABLE(bigendian, 6581 AC_HELP_STRING([--enable-bigendian],[the target is big endian]), 6582krb_cv_c_bigendian=yes) 6583AC_ARG_ENABLE(littleendian, 6584 AC_HELP_STRING([--enable-littleendian],[the target is little endian]), 6585krb_cv_c_bigendian=no) 6586AC_CACHE_CHECK(whether byte order is known at compile time, 6587krb_cv_c_bigendian_compile, 6588[AC_TRY_COMPILE([ 6589#include <sys/types.h> 6590#include <sys/param.h>],[ 6591#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 6592 bogus endian macros 6593#endif], krb_cv_c_bigendian_compile=yes, krb_cv_c_bigendian_compile=no)]) 6594AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[ 6595 if test "$krb_cv_c_bigendian_compile" = "yes"; then 6596 AC_TRY_COMPILE([ 6597#include <sys/types.h> 6598#include <sys/param.h>],[ 6599#if BYTE_ORDER != BIG_ENDIAN 6600 not big endian 6601#endif], krb_cv_c_bigendian=yes, krb_cv_c_bigendian=no) 6602 else 6603 AC_TRY_RUN([main () { 6604 /* Are we little or big endian? From Harbison&Steele. */ 6605 union 6606 { 6607 long l; 6608 char c[sizeof (long)]; 6609 } u; 6610 u.l = 1; 6611 exit (u.c[sizeof (long) - 1] == 1); 6612 }], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes, 6613 AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian])) 6614 fi 6615]) 6616if test "$krb_cv_c_bigendian" = "yes"; then 6617 AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl 6618fi 6619if test "$krb_cv_c_bigendian_compile" = "yes"; then 6620 AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl 6621fi 6622AH_BOTTOM([ 6623#if ENDIANESS_IN_SYS_PARAM_H 6624# include <sys/types.h> 6625# include <sys/param.h> 6626# if BYTE_ORDER == BIG_ENDIAN 6627# define WORDS_BIGENDIAN 1 6628# endif 6629#endif 6630]) 6631]) 6632 6633dnl 6634dnl $Id: aix.m4,v 1.9 2002/08/28 19:19:43 joda Exp $ 6635dnl 6636 6637AC_DEFUN(rk_AIX,[ 6638 6639aix=no 6640case "$host" in 6641*-*-aix3*) 6642 aix=3 6643 ;; 6644*-*-aix4*|*-*-aix5*) 6645 aix=4 6646 ;; 6647esac 6648 6649AM_CONDITIONAL(AIX, test "$aix" != no)dnl 6650AM_CONDITIONAL(AIX4, test "$aix" = 4) 6651 6652 6653AC_ARG_ENABLE(dynamic-afs, 6654 AC_HELP_STRING([--disable-dynamic-afs], 6655 [do not use loaded AFS library with AIX])) 6656 6657if test "$aix" != no; then 6658 if test "$enable_dynamic_afs" != no; then 6659 AC_REQUIRE([rk_DLOPEN]) 6660 if test "$ac_cv_func_dlopen" = no; then 6661 AC_FIND_FUNC_NO_LIBS(loadquery, ld) 6662 fi 6663 if test "$ac_cv_func_dlopen" != no; then 6664 AIX_EXTRA_KAFS='$(LIB_dlopen)' 6665 elif test "$ac_cv_func_loadquery" != no; then 6666 AIX_EXTRA_KAFS='$(LIB_loadquery)' 6667 else 6668 AC_MSG_NOTICE([not using dynloaded AFS library]) 6669 AIX_EXTRA_KAFS= 6670 enable_dynamic_afs=no 6671 fi 6672 else 6673 AIX_EXTRA_KAFS= 6674 fi 6675fi 6676 6677AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl 6678AC_SUBST(AIX_EXTRA_KAFS)dnl 6679 6680AH_BOTTOM([#if _AIX 6681#define _ALL_SOURCE 6682/* XXX this is gross, but kills about a gazillion warnings */ 6683struct ether_addr; 6684struct sockaddr; 6685struct sockaddr_dl; 6686struct sockaddr_in; 6687#endif]) 6688 6689]) 6690 6691dnl 6692dnl $Id: dlopen.m4,v 1.1 2002/08/28 16:32:16 joda Exp $ 6693dnl 6694 6695AC_DEFUN([rk_DLOPEN], [ 6696 AC_FIND_FUNC_NO_LIBS(dlopen, dl) 6697 AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no) 6698]) 6699 6700dnl 6701dnl $Id: irix.m4,v 1.1 2002/08/28 19:11:44 joda Exp $ 6702dnl 6703 6704AC_DEFUN([rk_IRIX], 6705[ 6706irix=no 6707case "$host" in 6708*-*-irix4*) 6709 AC_DEFINE([IRIX4], 1, 6710 [Define if you are running IRIX 4.]) 6711 irix=yes 6712 ;; 6713*-*-irix*) 6714 irix=yes 6715 ;; 6716esac 6717AM_CONDITIONAL(IRIX, test "$irix" != no)dnl 6718 6719AH_BOTTOM([ 6720/* IRIX 4 braindamage */ 6721#if IRIX == 4 && !defined(__STDC__) 6722#define __STDC__ 0 6723#endif 6724]) 6725]) 6726 6727dnl 6728dnl $Id: sunos.m4,v 1.1 2002/08/28 19:53:51 joda Exp $ 6729dnl 6730 6731AC_DEFUN([rk_SUNOS],[ 6732sunos=no 6733case "$host" in 6734*-*-sunos4*) 6735 sunos=40 6736 ;; 6737*-*-solaris2.7) 6738 sunos=57 6739 ;; 6740*-*-solaris2.[89]) 6741 sunos=58 6742 ;; 6743*-*-solaris2*) 6744 sunos=50 6745 ;; 6746esac 6747if test "$sunos" != no; then 6748 AC_DEFINE_UNQUOTED(SunOS, $sunos, 6749 [Define to what version of SunOS you are running.]) 6750fi 6751]) 6752dnl 6753dnl See if there is any X11 present 6754dnl 6755dnl $Id: check-x.m4,v 1.2 1999/11/05 04:25:23 assar Exp $ 6756 6757AC_DEFUN(KRB_CHECK_X,[ 6758AC_PATH_XTRA 6759 6760# try to figure out if we need any additional ld flags, like -R 6761# and yes, the autoconf X test is utterly broken 6762if test "$no_x" != yes; then 6763 AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[ 6764 ac_save_libs="$LIBS" 6765 ac_save_cflags="$CFLAGS" 6766 CFLAGS="$CFLAGS $X_CFLAGS" 6767 krb_cv_sys_x_libs_rpath="" 6768 krb_cv_sys_x_libs="" 6769 for rflag in "" "-R" "-R " "-rpath "; do 6770 if test "$rflag" = ""; then 6771 foo="$X_LIBS" 6772 else 6773 foo="" 6774 for flag in $X_LIBS; do 6775 case $flag in 6776 -L*) 6777 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`" 6778 ;; 6779 *) 6780 foo="$foo $flag" 6781 ;; 6782 esac 6783 done 6784 fi 6785 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" 6786 AC_TRY_RUN([ 6787 #include <X11/Xlib.h> 6788 foo() 6789 { 6790 XOpenDisplay(NULL); 6791 } 6792 main() 6793 { 6794 return 0; 6795 } 6796 ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:) 6797 done 6798 LIBS="$ac_save_libs" 6799 CFLAGS="$ac_save_cflags" 6800 ]) 6801 X_LIBS="$krb_cv_sys_x_libs" 6802fi 6803]) 6804 6805dnl $Id: check-xau.m4,v 1.3 1999/05/14 01:17:06 assar Exp $ 6806dnl 6807dnl check for Xau{Read,Write}Auth and XauFileName 6808dnl 6809AC_DEFUN(AC_CHECK_XAU,[ 6810save_CFLAGS="$CFLAGS" 6811CFLAGS="$X_CFLAGS $CFLAGS" 6812save_LIBS="$LIBS" 6813dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS" 6814LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS" 6815save_LDFLAGS="$LDFLAGS" 6816LDFLAGS="$LDFLAGS $X_LIBS" 6817 6818 6819AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau) 6820ac_xxx="$LIBS" 6821LIBS="$LIB_XauWriteAuth $LIBS" 6822AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau) 6823LIBS="$LIB_XauReadAauth $LIBS" 6824AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau) 6825LIBS="$ac_xxx" 6826 6827case "$ac_cv_funclib_XauWriteAuth" in 6828yes) ;; 6829no) ;; 6830*) if test "$ac_cv_funclib_XauReadAuth" = yes; then 6831 if test "$ac_cv_funclib_XauFileName" = yes; then 6832 LIB_XauReadAuth="$LIB_XauWriteAuth" 6833 else 6834 LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName" 6835 fi 6836 else 6837 if test "$ac_cv_funclib_XauFileName" = yes; then 6838 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth" 6839 else 6840 LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName" 6841 fi 6842 fi 6843 ;; 6844esac 6845 6846if test "$AUTOMAKE" != ""; then 6847 AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes") 6848else 6849 AC_SUBST(NEED_WRITEAUTH_TRUE) 6850 AC_SUBST(NEED_WRITEAUTH_FALSE) 6851 if test "$ac_cv_func_XauWriteAuth" != "yes"; then 6852 NEED_WRITEAUTH_TRUE= 6853 NEED_WRITEAUTH_FALSE='#' 6854 else 6855 NEED_WRITEAUTH_TRUE='#' 6856 NEED_WRITEAUTH_FALSE= 6857 fi 6858fi 6859CFLAGS=$save_CFLAGS 6860LIBS=$save_LIBS 6861LDFLAGS=$save_LDFLAGS 6862]) 6863 6864dnl $Id: check-type-extra.m4,v 1.2 1999/03/01 09:52:23 joda Exp $ 6865dnl 6866dnl ac_check_type + extra headers 6867 6868dnl AC_CHECK_TYPE_EXTRA(TYPE, DEFAULT, HEADERS) 6869AC_DEFUN(AC_CHECK_TYPE_EXTRA, 6870[AC_REQUIRE([AC_HEADER_STDC])dnl 6871AC_MSG_CHECKING(for $1) 6872AC_CACHE_VAL(ac_cv_type_$1, 6873[AC_EGREP_CPP(dnl 6874changequote(<<,>>)dnl 6875<<$1[^a-zA-Z_0-9]>>dnl 6876changequote([,]), [#include <sys/types.h> 6877#if STDC_HEADERS 6878#include <stdlib.h> 6879#include <stddef.h> 6880#endif 6881$3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl 6882AC_MSG_RESULT($ac_cv_type_$1) 6883if test $ac_cv_type_$1 = no; then 6884 AC_DEFINE($1, $2, [Define this to what the type $1 should be.]) 6885fi 6886]) 6887 6888dnl 6889dnl $Id: capabilities.m4,v 1.2 1999/09/01 11:02:26 joda Exp $ 6890dnl 6891 6892dnl 6893dnl Test SGI capabilities 6894dnl 6895 6896AC_DEFUN(KRB_CAPABILITIES,[ 6897 6898AC_CHECK_HEADERS(capability.h sys/capability.h) 6899 6900AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc) 6901]) 6902 6903dnl $Id: check-getpwnam_r-posix.m4,v 1.2 1999/03/23 16:47:31 joda Exp $ 6904dnl 6905dnl check for getpwnam_r, and if it's posix or not 6906 6907AC_DEFUN(AC_CHECK_GETPWNAM_R_POSIX,[ 6908AC_FIND_FUNC_NO_LIBS(getpwnam_r,c_r) 6909if test "$ac_cv_func_getpwnam_r" = yes; then 6910 AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix, 6911 ac_libs="$LIBS" 6912 LIBS="$LIBS $LIB_getpwnam_r" 6913 AC_TRY_RUN([ 6914#include <pwd.h> 6915int main() 6916{ 6917 struct passwd pw, *pwd; 6918 return getpwnam_r("", &pw, NULL, 0, &pwd) < 0; 6919} 6920],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:) 6921LIBS="$ac_libs") 6922if test "$ac_cv_func_getpwnam_r_posix" = yes; then 6923 AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.]) 6924fi 6925fi 6926]) 6927dnl $Id: krb-readline.m4,v 1.5 2002/08/29 02:22:32 assar Exp $ 6928dnl 6929dnl Tests for readline functions 6930dnl 6931 6932dnl el_init 6933 6934AC_DEFUN(KRB_READLINE,[ 6935AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent]) 6936if test "$ac_cv_func_el_init" = yes ; then 6937 AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[ 6938 AC_TRY_COMPILE([#include <stdio.h> 6939 #include <histedit.h>], 6940 [el_init("", NULL, NULL, NULL);], 6941 ac_cv_func_el_init_four=yes, 6942 ac_cv_func_el_init_four=no)]) 6943 if test "$ac_cv_func_el_init_four" = yes; then 6944 AC_DEFINE(HAVE_FOUR_VALUED_EL_INIT, 1, [Define if el_init takes four arguments.]) 6945 fi 6946fi 6947 6948dnl readline 6949 6950ac_foo=no 6951if test "$with_readline" = yes; then 6952 : 6953elif test "$ac_cv_func_readline" = yes; then 6954 : 6955elif test "$ac_cv_func_el_init" = yes; then 6956 ac_foo=yes 6957 LIB_readline="\$(top_builddir)/lib/editline/libel_compat.la \$(LIB_el_init) \$(LIB_tgetent)" 6958else 6959 LIB_readline="\$(top_builddir)/lib/editline/libeditline.la \$(LIB_tgetent)" 6960fi 6961AM_CONDITIONAL(el_compat, test "$ac_foo" = yes) 6962AC_DEFINE(HAVE_READLINE, 1, 6963 [Define if you have a readline compatible library.])dnl 6964 6965]) 6966 6967dnl 6968dnl $Id: telnet.m4,v 1.1 2002/08/28 19:19:01 joda Exp $ 6969dnl 6970dnl stuff used by telnet 6971 6972AC_DEFUN([rk_TELNET],[ 6973AC_DEFINE(AUTHENTICATION, 1, 6974 [Define if you want authentication support in telnet.])dnl 6975AC_DEFINE(ENCRYPTION, 1, 6976 [Define if you want encryption support in telnet.])dnl 6977AC_DEFINE(DES_ENCRYPTION, 1, 6978 [Define if you want to use DES encryption in telnet.])dnl 6979AC_DEFINE(DIAGNOSTICS, 1, 6980 [Define this to enable diagnostics in telnet.])dnl 6981AC_DEFINE(OLD_ENVIRON, 1, 6982 [Define this to enable old environment option in telnet.])dnl 6983if false; then 6984 AC_DEFINE(ENV_HACK, 1, 6985 [Define this if you want support for broken ENV_{VAR,VAL} telnets.]) 6986fi 6987 6988# Simple test for streamspty, based on the existance of getmsg(), alas 6989# this breaks on SunOS4 which have streams but BSD-like ptys 6990# 6991# And also something wierd has happend with dec-osf1, fallback to bsd-ptys 6992 6993case "$host" in 6994*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*) 6995 ;; 6996*) 6997 AC_CHECK_FUNC(getmsg) 6998 if test "$ac_cv_func_getmsg" = "yes"; then 6999 AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works, 7000 AC_TRY_RUN([ 7001 #include <stdio.h> 7002 #include <errno.h> 7003 7004 int main() 7005 { 7006 int ret; 7007 ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); 7008 if(ret < 0 && errno == ENOSYS) 7009 return 1; 7010 return 0; 7011 } 7012 ], ac_cv_func_getmsg_works=yes, 7013 ac_cv_func_getmsg_works=no, 7014 ac_cv_func_getmsg_works=no)) 7015 if test "$ac_cv_func_getmsg_works" = "yes"; then 7016 AC_DEFINE(HAVE_GETMSG, 1, 7017 [Define if you have a working getmsg.]) 7018 AC_DEFINE(STREAMSPTY, 1, 7019 [Define if you have streams ptys.]) 7020 fi 7021 fi 7022 ;; 7023esac 7024 7025AH_BOTTOM([ 7026#if defined(ENCRYPTION) && !defined(AUTHENTICATION) 7027#define AUTHENTICATION 1 7028#endif 7029 7030/* Set this to the default system lead string for telnetd 7031 * can contain %-escapes: %s=sysname, %m=machine, %r=os-release 7032 * %v=os-version, %t=tty, %h=hostname, %d=date and time 7033 */ 7034#undef USE_IM 7035 7036/* Used with login -p */ 7037#undef LOGIN_ARGS 7038 7039/* set this to a sensible login */ 7040#ifndef LOGIN_PATH 7041#define LOGIN_PATH BINDIR "/login" 7042#endif 7043]) 7044]) 7045 7046dnl $Id: check-compile-et.m4,v 1.6 2001/09/02 17:08:48 assar Exp $ 7047dnl 7048dnl CHECK_COMPILE_ET 7049AC_DEFUN([CHECK_COMPILE_ET], [ 7050 7051AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et]) 7052 7053krb_cv_compile_et="no" 7054if test "${COMPILE_ET}" = "compile_et"; then 7055 7056dnl We have compile_et. Now let's see if it supports `prefix' and `index'. 7057AC_MSG_CHECKING(whether compile_et has the features we need) 7058cat > conftest_et.et <<'EOF' 7059error_table conf 7060prefix CONFTEST 7061index 1 7062error_code CODE1, "CODE1" 7063index 128 7064error_code CODE2, "CODE2" 7065end 7066EOF 7067if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then 7068 dnl XXX Some systems have <et/com_err.h>. 7069 save_CPPFLAGS="${save_CPPFLAGS}" 7070 if test -d "/usr/include/et"; then 7071 CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" 7072 fi 7073 dnl Check that the `prefix' and `index' directives were honored. 7074 AC_TRY_RUN([ 7075#include <com_err.h> 7076#include <string.h> 7077#include "conftest_et.h" 7078int main(){return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;} 7079 ], [krb_cv_compile_et="yes"],[CPPFLAGS="${save_CPPFLAGS}"]) 7080fi 7081AC_MSG_RESULT(${krb_cv_compile_et}) 7082rm -fr conftest* 7083fi 7084 7085if test "${krb_cv_compile_et}" = "yes"; then 7086 dnl Since compile_et seems to work, let's check libcom_err 7087 krb_cv_save_LIBS="${LIBS}" 7088 LIBS="${LIBS} -lcom_err" 7089 AC_MSG_CHECKING(for com_err) 7090 AC_TRY_LINK([#include <com_err.h>],[ 7091 const char *p; 7092 p = error_message(0); 7093 ],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"]) 7094 AC_MSG_RESULT(${krb_cv_com_err}) 7095 LIBS="${krb_cv_save_LIBS}" 7096else 7097 dnl Since compile_et doesn't work, forget about libcom_err 7098 krb_cv_com_err="no" 7099fi 7100 7101dnl Only use the system's com_err if we found compile_et, libcom_err, and 7102dnl com_err.h. 7103if test "${krb_cv_com_err}" = "yes"; then 7104 DIR_com_err="" 7105 LIB_com_err="-lcom_err" 7106 LIB_com_err_a="" 7107 LIB_com_err_so="" 7108 AC_MSG_NOTICE(Using the already-installed com_err) 7109else 7110 COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et" 7111 DIR_com_err="com_err" 7112 LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" 7113 LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" 7114 LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" 7115 AC_MSG_NOTICE(Using our own com_err) 7116fi 7117AC_SUBST(DIR_com_err) 7118AC_SUBST(LIB_com_err) 7119AC_SUBST(LIB_com_err_a) 7120AC_SUBST(LIB_com_err_so) 7121 7122]) 7123 7124dnl $Id: auth-modules.m4,v 1.5 2002/09/09 13:31:45 joda Exp $ 7125dnl 7126dnl Figure what authentication modules should be built 7127dnl 7128dnl rk_AUTH_MODULES(module-list) 7129 7130AC_DEFUN(rk_AUTH_MODULES,[ 7131AC_MSG_CHECKING([which authentication modules should be built]) 7132 7133z='m4_ifval([$1], $1, [sia pam afskauthlib])' 7134LIB_AUTH_SUBDIRS= 7135for i in $z; do 7136case $i in 7137sia) 7138if test "$ac_cv_header_siad_h" = yes; then 7139 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia" 7140fi 7141;; 7142pam) 7143case "${host}" in 7144*-*-freebsd*) ac_cv_want_pam_krb4=no ;; 7145*) ac_cv_want_pam_krb4=yes ;; 7146esac 7147 7148if test "$ac_cv_want_pam_krb4" = yes -a \ 7149 "$ac_cv_header_security_pam_modules_h" = yes -a \ 7150 "$enable_shared" = yes; then 7151 LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam" 7152fi 7153;; 7154afskauthlib) 7155case "${host}" in 7156*-*-irix[[56]]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;; 7157esac 7158;; 7159esac 7160done 7161if test "$LIB_AUTH_SUBDIRS"; then 7162 AC_MSG_RESULT($LIB_AUTH_SUBDIRS) 7163else 7164 AC_MSG_RESULT(none) 7165fi 7166 7167AC_SUBST(LIB_AUTH_SUBDIRS)dnl 7168]) 7169 7170dnl 7171dnl $Id: destdirs.m4,v 1.2 2002/08/12 15:12:50 joda Exp $ 7172dnl 7173 7174AC_DEFUN([rk_DESTDIRS], [ 7175# This is done by AC_OUTPUT but we need the result here. 7176test "x$prefix" = xNONE && prefix=$ac_default_prefix 7177test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 7178 7179AC_FOREACH([rk_dir], [bin lib libexec localstate sbin sysconf], [ 7180 x="${rk_dir[]dir}" 7181 eval y="$x" 7182 while test "x$y" != "x$x"; do 7183 x="$y" 7184 eval y="$x" 7185 done 7186 AC_DEFINE_UNQUOTED(AS_TR_CPP(rk_dir[]dir), "$x", [path to ]rk_dir[])]) 7187]) 7188 7189