cannam@86: # generated automatically by aclocal 1.7.9 -*- Autoconf -*- cannam@86: cannam@86: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 cannam@86: # Free Software Foundation, Inc. cannam@86: # This file is free software; the Free Software Foundation cannam@86: # gives unlimited permission to copy and/or distribute it, cannam@86: # with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without cannam@86: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A cannam@86: # PARTICULAR PURPOSE. cannam@86: cannam@86: # Do all the work for Automake. -*- Autoconf -*- cannam@86: cannam@86: # This macro actually does too much some checks are only needed if cannam@86: # your package does certain things. But this isn't really a big deal. cannam@86: cannam@86: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 cannam@86: # Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 10 cannam@86: cannam@86: AC_PREREQ([2.54]) cannam@86: cannam@86: # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow cannam@86: # the ones we care about. cannam@86: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl cannam@86: cannam@86: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) cannam@86: # AM_INIT_AUTOMAKE([OPTIONS]) cannam@86: # ----------------------------------------------- cannam@86: # The call with PACKAGE and VERSION arguments is the old style cannam@86: # call (pre autoconf-2.50), which is being phased out. PACKAGE cannam@86: # and VERSION should now be passed to AC_INIT and removed from cannam@86: # the call to AM_INIT_AUTOMAKE. cannam@86: # We support both call styles for the transition. After cannam@86: # the next Automake release, Autoconf can make the AC_INIT cannam@86: # arguments mandatory, and then we can depend on a new Autoconf cannam@86: # release and drop the old call support. cannam@86: AC_DEFUN([AM_INIT_AUTOMAKE], cannam@86: [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl cannam@86: AC_REQUIRE([AC_PROG_INSTALL])dnl cannam@86: # test to see if srcdir already configured cannam@86: if test "`cd $srcdir && pwd`" != "`pwd`" && cannam@86: test -f $srcdir/config.status; then cannam@86: AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) cannam@86: fi cannam@86: cannam@86: # test whether we have cygpath cannam@86: if test -z "$CYGPATH_W"; then cannam@86: if (cygpath --version) >/dev/null 2>/dev/null; then cannam@86: CYGPATH_W='cygpath -w' cannam@86: else cannam@86: CYGPATH_W=echo cannam@86: fi cannam@86: fi cannam@86: AC_SUBST([CYGPATH_W]) cannam@86: cannam@86: # Define the identity of the package. cannam@86: dnl Distinguish between old-style and new-style calls. cannam@86: m4_ifval([$2], cannam@86: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl cannam@86: AC_SUBST([PACKAGE], [$1])dnl cannam@86: AC_SUBST([VERSION], [$2])], cannam@86: [_AM_SET_OPTIONS([$1])dnl cannam@86: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl cannam@86: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl cannam@86: cannam@86: _AM_IF_OPTION([no-define],, cannam@86: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) cannam@86: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl cannam@86: cannam@86: # Some tools Automake needs. cannam@86: AC_REQUIRE([AM_SANITY_CHECK])dnl cannam@86: AC_REQUIRE([AC_ARG_PROGRAM])dnl cannam@86: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) cannam@86: AM_MISSING_PROG(AUTOCONF, autoconf) cannam@86: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) cannam@86: AM_MISSING_PROG(AUTOHEADER, autoheader) cannam@86: AM_MISSING_PROG(MAKEINFO, makeinfo) cannam@86: AM_MISSING_PROG(AMTAR, tar) cannam@86: AM_PROG_INSTALL_SH cannam@86: AM_PROG_INSTALL_STRIP cannam@86: # We need awk for the "check" target. The system "awk" is bad on cannam@86: # some platforms. cannam@86: AC_REQUIRE([AC_PROG_AWK])dnl cannam@86: AC_REQUIRE([AC_PROG_MAKE_SET])dnl cannam@86: AC_REQUIRE([AM_SET_LEADING_DOT])dnl cannam@86: cannam@86: _AM_IF_OPTION([no-dependencies],, cannam@86: [AC_PROVIDE_IFELSE([AC_PROG_CC], cannam@86: [_AM_DEPENDENCIES(CC)], cannam@86: [define([AC_PROG_CC], cannam@86: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl cannam@86: AC_PROVIDE_IFELSE([AC_PROG_CXX], cannam@86: [_AM_DEPENDENCIES(CXX)], cannam@86: [define([AC_PROG_CXX], cannam@86: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl cannam@86: ]) cannam@86: ]) cannam@86: cannam@86: cannam@86: # When config.status generates a header, we must update the stamp-h file. cannam@86: # This file resides in the same directory as the config header cannam@86: # that is generated. The stamp files are numbered to have different names. cannam@86: cannam@86: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the cannam@86: # loop where config.status creates the headers, so we can generate cannam@86: # our stamp files there. cannam@86: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], cannam@86: [# Compute $1's index in $config_headers. cannam@86: _am_stamp_count=1 cannam@86: for _am_header in $config_headers :; do cannam@86: case $_am_header in cannam@86: $1 | $1:* ) cannam@86: break ;; cannam@86: * ) cannam@86: _am_stamp_count=`expr $_am_stamp_count + 1` ;; cannam@86: esac cannam@86: done cannam@86: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) cannam@86: cannam@86: # Copyright 2002 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: cannam@86: # AM_AUTOMAKE_VERSION(VERSION) cannam@86: # ---------------------------- cannam@86: # Automake X.Y traces this macro to ensure aclocal.m4 has been cannam@86: # generated from the m4 files accompanying Automake X.Y. cannam@86: AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) cannam@86: cannam@86: # AM_SET_CURRENT_AUTOMAKE_VERSION cannam@86: # ------------------------------- cannam@86: # Call AM_AUTOMAKE_VERSION so it can be traced. cannam@86: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. cannam@86: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], cannam@86: [AM_AUTOMAKE_VERSION([1.7.9])]) cannam@86: cannam@86: # Helper functions for option handling. -*- Autoconf -*- cannam@86: cannam@86: # Copyright 2001, 2002 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 2 cannam@86: cannam@86: # _AM_MANGLE_OPTION(NAME) cannam@86: # ----------------------- cannam@86: AC_DEFUN([_AM_MANGLE_OPTION], cannam@86: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) cannam@86: cannam@86: # _AM_SET_OPTION(NAME) cannam@86: # ------------------------------ cannam@86: # Set option NAME. Presently that only means defining a flag for this option. cannam@86: AC_DEFUN([_AM_SET_OPTION], cannam@86: [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) cannam@86: cannam@86: # _AM_SET_OPTIONS(OPTIONS) cannam@86: # ---------------------------------- cannam@86: # OPTIONS is a space-separated list of Automake options. cannam@86: AC_DEFUN([_AM_SET_OPTIONS], cannam@86: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) cannam@86: cannam@86: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) cannam@86: # ------------------------------------------- cannam@86: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. cannam@86: AC_DEFUN([_AM_IF_OPTION], cannam@86: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) cannam@86: cannam@86: # cannam@86: # Check to make sure that the build environment is sane. cannam@86: # cannam@86: cannam@86: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 3 cannam@86: cannam@86: # AM_SANITY_CHECK cannam@86: # --------------- cannam@86: AC_DEFUN([AM_SANITY_CHECK], cannam@86: [AC_MSG_CHECKING([whether build environment is sane]) cannam@86: # Just in case cannam@86: sleep 1 cannam@86: echo timestamp > conftest.file cannam@86: # Do `set' in a subshell so we don't clobber the current shell's cannam@86: # arguments. Must try -L first in case configure is actually a cannam@86: # symlink; some systems play weird games with the mod time of symlinks cannam@86: # (eg FreeBSD returns the mod time of the symlink's containing cannam@86: # directory). cannam@86: if ( cannam@86: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` cannam@86: if test "$[*]" = "X"; then cannam@86: # -L didn't work. cannam@86: set X `ls -t $srcdir/configure conftest.file` cannam@86: fi cannam@86: rm -f conftest.file cannam@86: if test "$[*]" != "X $srcdir/configure conftest.file" \ cannam@86: && test "$[*]" != "X conftest.file $srcdir/configure"; then cannam@86: cannam@86: # If neither matched, then we have a broken ls. This can happen cannam@86: # if, for instance, CONFIG_SHELL is bash and it inherits a cannam@86: # broken ls alias from the environment. This has actually cannam@86: # happened. Such a system could not be considered "sane". cannam@86: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken cannam@86: alias in your environment]) cannam@86: fi cannam@86: cannam@86: test "$[2]" = conftest.file cannam@86: ) cannam@86: then cannam@86: # Ok. cannam@86: : cannam@86: else cannam@86: AC_MSG_ERROR([newly created file is older than distributed files! cannam@86: Check your system clock]) cannam@86: fi cannam@86: AC_MSG_RESULT(yes)]) cannam@86: cannam@86: # -*- Autoconf -*- cannam@86: cannam@86: cannam@86: # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 3 cannam@86: cannam@86: # AM_MISSING_PROG(NAME, PROGRAM) cannam@86: # ------------------------------ cannam@86: AC_DEFUN([AM_MISSING_PROG], cannam@86: [AC_REQUIRE([AM_MISSING_HAS_RUN]) cannam@86: $1=${$1-"${am_missing_run}$2"} cannam@86: AC_SUBST($1)]) cannam@86: cannam@86: cannam@86: # AM_MISSING_HAS_RUN cannam@86: # ------------------ cannam@86: # Define MISSING if not defined so far and test if it supports --run. cannam@86: # If it does, set am_missing_run to use it, otherwise, to nothing. cannam@86: AC_DEFUN([AM_MISSING_HAS_RUN], cannam@86: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl cannam@86: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" cannam@86: # Use eval to expand $SHELL cannam@86: if eval "$MISSING --run true"; then cannam@86: am_missing_run="$MISSING --run " cannam@86: else cannam@86: am_missing_run= cannam@86: AC_MSG_WARN([`missing' script is too old or missing]) cannam@86: fi cannam@86: ]) cannam@86: cannam@86: # AM_AUX_DIR_EXPAND cannam@86: cannam@86: # Copyright 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets cannam@86: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to cannam@86: # `$srcdir', `$srcdir/..', or `$srcdir/../..'. cannam@86: # cannam@86: # Of course, Automake must honor this variable whenever it calls a cannam@86: # tool from the auxiliary directory. The problem is that $srcdir (and cannam@86: # therefore $ac_aux_dir as well) can be either absolute or relative, cannam@86: # depending on how configure is run. This is pretty annoying, since cannam@86: # it makes $ac_aux_dir quite unusable in subdirectories: in the top cannam@86: # source directory, any form will work fine, but in subdirectories a cannam@86: # relative path needs to be adjusted first. cannam@86: # cannam@86: # $ac_aux_dir/missing cannam@86: # fails when called from a subdirectory if $ac_aux_dir is relative cannam@86: # $top_srcdir/$ac_aux_dir/missing cannam@86: # fails if $ac_aux_dir is absolute, cannam@86: # fails when called from a subdirectory in a VPATH build with cannam@86: # a relative $ac_aux_dir cannam@86: # cannam@86: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir cannam@86: # are both prefixed by $srcdir. In an in-source build this is usually cannam@86: # harmless because $srcdir is `.', but things will broke when you cannam@86: # start a VPATH build or use an absolute $srcdir. cannam@86: # cannam@86: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, cannam@86: # iff we strip the leading $srcdir from $ac_aux_dir. That would be: cannam@86: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` cannam@86: # and then we would define $MISSING as cannam@86: # MISSING="\${SHELL} $am_aux_dir/missing" cannam@86: # This will work as long as MISSING is not called from configure, because cannam@86: # unfortunately $(top_srcdir) has no meaning in configure. cannam@86: # However there are other variables, like CC, which are often used in cannam@86: # configure, and could therefore not use this "fixed" $ac_aux_dir. cannam@86: # cannam@86: # Another solution, used here, is to always expand $ac_aux_dir to an cannam@86: # absolute PATH. The drawback is that using absolute paths prevent a cannam@86: # configured tree to be moved without reconfiguration. cannam@86: cannam@86: # Rely on autoconf to set up CDPATH properly. cannam@86: AC_PREREQ([2.50]) cannam@86: cannam@86: AC_DEFUN([AM_AUX_DIR_EXPAND], [ cannam@86: # expand $ac_aux_dir to an absolute path cannam@86: am_aux_dir=`cd $ac_aux_dir && pwd` cannam@86: ]) cannam@86: cannam@86: # AM_PROG_INSTALL_SH cannam@86: # ------------------ cannam@86: # Define $install_sh. cannam@86: cannam@86: # Copyright 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: AC_DEFUN([AM_PROG_INSTALL_SH], cannam@86: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl cannam@86: install_sh=${install_sh-"$am_aux_dir/install-sh"} cannam@86: AC_SUBST(install_sh)]) cannam@86: cannam@86: # AM_PROG_INSTALL_STRIP cannam@86: cannam@86: # Copyright 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # One issue with vendor `install' (even GNU) is that you can't cannam@86: # specify the program used to strip binaries. This is especially cannam@86: # annoying in cross-compiling environments, where the build's strip cannam@86: # is unlikely to handle the host's binaries. cannam@86: # Fortunately install-sh will honor a STRIPPROG variable, so we cannam@86: # always use install-sh in `make install-strip', and initialize cannam@86: # STRIPPROG with the value of the STRIP variable (set by the user). cannam@86: AC_DEFUN([AM_PROG_INSTALL_STRIP], cannam@86: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl cannam@86: # Installed binaries are usually stripped using `strip' when the user cannam@86: # run `make install-strip'. However `strip' might not be the right cannam@86: # tool to use in cross-compilation environments, therefore Automake cannam@86: # will honor the `STRIP' environment variable to overrule this program. cannam@86: dnl Don't test for $cross_compiling = yes, because it might be `maybe'. cannam@86: if test "$cross_compiling" != no; then cannam@86: AC_CHECK_TOOL([STRIP], [strip], :) cannam@86: fi cannam@86: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" cannam@86: AC_SUBST([INSTALL_STRIP_PROGRAM])]) cannam@86: cannam@86: # -*- Autoconf -*- cannam@86: # Copyright (C) 2003 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 1 cannam@86: cannam@86: # Check whether the underlying file-system supports filenames cannam@86: # with a leading dot. For instance MS-DOS doesn't. cannam@86: AC_DEFUN([AM_SET_LEADING_DOT], cannam@86: [rm -rf .tst 2>/dev/null cannam@86: mkdir .tst 2>/dev/null cannam@86: if test -d .tst; then cannam@86: am__leading_dot=. cannam@86: else cannam@86: am__leading_dot=_ cannam@86: fi cannam@86: rmdir .tst 2>/dev/null cannam@86: AC_SUBST([am__leading_dot])]) cannam@86: cannam@86: # serial 5 -*- Autoconf -*- cannam@86: cannam@86: # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: cannam@86: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be cannam@86: # written in clear, in which case automake, when reading aclocal.m4, cannam@86: # will think it sees a *use*, and therefore will trigger all it's cannam@86: # C support machinery. Also note that it means that autoscan, seeing cannam@86: # CC etc. in the Makefile, will ask for an AC_PROG_CC use... cannam@86: cannam@86: cannam@86: cannam@86: # _AM_DEPENDENCIES(NAME) cannam@86: # ---------------------- cannam@86: # See how the compiler implements dependency checking. cannam@86: # NAME is "CC", "CXX", "GCJ", or "OBJC". cannam@86: # We try a few techniques and use that to set a single cache variable. cannam@86: # cannam@86: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was cannam@86: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular cannam@86: # dependency, and given that the user is not expected to run this macro, cannam@86: # just rely on AC_PROG_CC. cannam@86: AC_DEFUN([_AM_DEPENDENCIES], cannam@86: [AC_REQUIRE([AM_SET_DEPDIR])dnl cannam@86: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl cannam@86: AC_REQUIRE([AM_MAKE_INCLUDE])dnl cannam@86: AC_REQUIRE([AM_DEP_TRACK])dnl cannam@86: cannam@86: ifelse([$1], CC, [depcc="$CC" am_compiler_list=], cannam@86: [$1], CXX, [depcc="$CXX" am_compiler_list=], cannam@86: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], cannam@86: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], cannam@86: [depcc="$$1" am_compiler_list=]) cannam@86: cannam@86: AC_CACHE_CHECK([dependency style of $depcc], cannam@86: [am_cv_$1_dependencies_compiler_type], cannam@86: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then cannam@86: # We make a subdir and do the tests there. Otherwise we can end up cannam@86: # making bogus files that we don't know about and never remove. For cannam@86: # instance it was reported that on HP-UX the gcc test will end up cannam@86: # making a dummy file named `D' -- because `-MD' means `put the output cannam@86: # in D'. cannam@86: mkdir conftest.dir cannam@86: # Copy depcomp to subdir because otherwise we won't find it if we're cannam@86: # using a relative directory. cannam@86: cp "$am_depcomp" conftest.dir cannam@86: cd conftest.dir cannam@86: # We will build objects and dependencies in a subdirectory because cannam@86: # it helps to detect inapplicable dependency modes. For instance cannam@86: # both Tru64's cc and ICC support -MD to output dependencies as a cannam@86: # side effect of compilation, but ICC will put the dependencies in cannam@86: # the current directory while Tru64 will put them in the object cannam@86: # directory. cannam@86: mkdir sub cannam@86: cannam@86: am_cv_$1_dependencies_compiler_type=none cannam@86: if test "$am_compiler_list" = ""; then cannam@86: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` cannam@86: fi cannam@86: for depmode in $am_compiler_list; do cannam@86: # Setup a source with many dependencies, because some compilers cannam@86: # like to wrap large dependency lists on column 80 (with \), and cannam@86: # we should not choose a depcomp mode which is confused by this. cannam@86: # cannam@86: # We need to recreate these files for each test, as the compiler may cannam@86: # overwrite some of them when testing with obscure command lines. cannam@86: # This happens at least with the AIX C compiler. cannam@86: : > sub/conftest.c cannam@86: for i in 1 2 3 4 5 6; do cannam@86: echo '#include "conftst'$i'.h"' >> sub/conftest.c cannam@86: : > sub/conftst$i.h cannam@86: done cannam@86: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf cannam@86: cannam@86: case $depmode in cannam@86: nosideeffect) cannam@86: # after this tag, mechanisms are not by side-effect, so they'll cannam@86: # only be used when explicitly requested cannam@86: if test "x$enable_dependency_tracking" = xyes; then cannam@86: continue cannam@86: else cannam@86: break cannam@86: fi cannam@86: ;; cannam@86: none) break ;; cannam@86: esac cannam@86: # We check with `-c' and `-o' for the sake of the "dashmstdout" cannam@86: # mode. It turns out that the SunPro C++ compiler does not properly cannam@86: # handle `-M -o', and we need to detect this. cannam@86: if depmode=$depmode \ cannam@86: source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ cannam@86: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ cannam@86: $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ cannam@86: >/dev/null 2>conftest.err && cannam@86: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && cannam@86: grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && cannam@86: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then cannam@86: # icc doesn't choke on unknown options, it will just issue warnings cannam@86: # (even with -Werror). So we grep stderr for any message cannam@86: # that says an option was ignored. cannam@86: if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else cannam@86: am_cv_$1_dependencies_compiler_type=$depmode cannam@86: break cannam@86: fi cannam@86: fi cannam@86: done cannam@86: cannam@86: cd .. cannam@86: rm -rf conftest.dir cannam@86: else cannam@86: am_cv_$1_dependencies_compiler_type=none cannam@86: fi cannam@86: ]) cannam@86: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) cannam@86: AM_CONDITIONAL([am__fastdep$1], [ cannam@86: test "x$enable_dependency_tracking" != xno \ cannam@86: && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) cannam@86: ]) cannam@86: cannam@86: cannam@86: # AM_SET_DEPDIR cannam@86: # ------------- cannam@86: # Choose a directory name for dependency files. cannam@86: # This macro is AC_REQUIREd in _AM_DEPENDENCIES cannam@86: AC_DEFUN([AM_SET_DEPDIR], cannam@86: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl cannam@86: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl cannam@86: ]) cannam@86: cannam@86: cannam@86: # AM_DEP_TRACK cannam@86: # ------------ cannam@86: AC_DEFUN([AM_DEP_TRACK], cannam@86: [AC_ARG_ENABLE(dependency-tracking, cannam@86: [ --disable-dependency-tracking Speeds up one-time builds cannam@86: --enable-dependency-tracking Do not reject slow dependency extractors]) cannam@86: if test "x$enable_dependency_tracking" != xno; then cannam@86: am_depcomp="$ac_aux_dir/depcomp" cannam@86: AMDEPBACKSLASH='\' cannam@86: fi cannam@86: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) cannam@86: AC_SUBST([AMDEPBACKSLASH]) cannam@86: ]) cannam@86: cannam@86: # Generate code to set up dependency tracking. -*- Autoconf -*- cannam@86: cannam@86: # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: #serial 2 cannam@86: cannam@86: # _AM_OUTPUT_DEPENDENCY_COMMANDS cannam@86: # ------------------------------ cannam@86: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], cannam@86: [for mf in $CONFIG_FILES; do cannam@86: # Strip MF so we end up with the name of the file. cannam@86: mf=`echo "$mf" | sed -e 's/:.*$//'` cannam@86: # Check whether this is an Automake generated Makefile or not. cannam@86: # We used to match only the files named `Makefile.in', but cannam@86: # some people rename them; so instead we look at the file content. cannam@86: # Grep'ing the first line is not enough: some people post-process cannam@86: # each Makefile.in and add a new line on top of each file to say so. cannam@86: # So let's grep whole file. cannam@86: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then cannam@86: dirpart=`AS_DIRNAME("$mf")` cannam@86: else cannam@86: continue cannam@86: fi cannam@86: grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue cannam@86: # Extract the definition of DEP_FILES from the Makefile without cannam@86: # running `make'. cannam@86: DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` cannam@86: test -z "$DEPDIR" && continue cannam@86: # When using ansi2knr, U may be empty or an underscore; expand it cannam@86: U=`sed -n -e '/^U = / s///p' < "$mf"` cannam@86: test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" cannam@86: # We invoke sed twice because it is the simplest approach to cannam@86: # changing $(DEPDIR) to its actual value in the expansion. cannam@86: for file in `sed -n -e ' cannam@86: /^DEP_FILES = .*\\\\$/ { cannam@86: s/^DEP_FILES = // cannam@86: :loop cannam@86: s/\\\\$// cannam@86: p cannam@86: n cannam@86: /\\\\$/ b loop cannam@86: p cannam@86: } cannam@86: /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ cannam@86: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do cannam@86: # Make sure the directory exists. cannam@86: test -f "$dirpart/$file" && continue cannam@86: fdir=`AS_DIRNAME(["$file"])` cannam@86: AS_MKDIR_P([$dirpart/$fdir]) cannam@86: # echo "creating $dirpart/$file" cannam@86: echo '# dummy' > "$dirpart/$file" cannam@86: done cannam@86: done cannam@86: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS cannam@86: cannam@86: cannam@86: # AM_OUTPUT_DEPENDENCY_COMMANDS cannam@86: # ----------------------------- cannam@86: # This macro should only be invoked once -- use via AC_REQUIRE. cannam@86: # cannam@86: # This code is only required when automatic dependency tracking cannam@86: # is enabled. FIXME. This creates each `.P' file that we will cannam@86: # need in order to bootstrap the dependency handling code. cannam@86: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], cannam@86: [AC_CONFIG_COMMANDS([depfiles], cannam@86: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], cannam@86: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) cannam@86: ]) cannam@86: cannam@86: # Check to see how 'make' treats includes. -*- Autoconf -*- cannam@86: cannam@86: # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 2 cannam@86: cannam@86: # AM_MAKE_INCLUDE() cannam@86: # ----------------- cannam@86: # Check to see how make treats includes. cannam@86: AC_DEFUN([AM_MAKE_INCLUDE], cannam@86: [am_make=${MAKE-make} cannam@86: cat > confinc << 'END' cannam@86: am__doit: cannam@86: @echo done cannam@86: .PHONY: am__doit cannam@86: END cannam@86: # If we don't find an include directive, just comment out the code. cannam@86: AC_MSG_CHECKING([for style of include used by $am_make]) cannam@86: am__include="#" cannam@86: am__quote= cannam@86: _am_result=none cannam@86: # First try GNU make style include. cannam@86: echo "include confinc" > confmf cannam@86: # We grep out `Entering directory' and `Leaving directory' cannam@86: # messages which can occur if `w' ends up in MAKEFLAGS. cannam@86: # In particular we don't look at `^make:' because GNU make might cannam@86: # be invoked under some other name (usually "gmake"), in which cannam@86: # case it prints its new name instead of `make'. cannam@86: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then cannam@86: am__include=include cannam@86: am__quote= cannam@86: _am_result=GNU cannam@86: fi cannam@86: # Now try BSD make style include. cannam@86: if test "$am__include" = "#"; then cannam@86: echo '.include "confinc"' > confmf cannam@86: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then cannam@86: am__include=.include cannam@86: am__quote="\"" cannam@86: _am_result=BSD cannam@86: fi cannam@86: fi cannam@86: AC_SUBST([am__include]) cannam@86: AC_SUBST([am__quote]) cannam@86: AC_MSG_RESULT([$_am_result]) cannam@86: rm -f confinc confmf cannam@86: ]) cannam@86: cannam@86: # AM_CONDITIONAL -*- Autoconf -*- cannam@86: cannam@86: # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 5 cannam@86: cannam@86: AC_PREREQ(2.52) cannam@86: cannam@86: # AM_CONDITIONAL(NAME, SHELL-CONDITION) cannam@86: # ------------------------------------- cannam@86: # Define a conditional. cannam@86: AC_DEFUN([AM_CONDITIONAL], cannam@86: [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], cannam@86: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl cannam@86: AC_SUBST([$1_TRUE]) cannam@86: AC_SUBST([$1_FALSE]) cannam@86: if $2; then cannam@86: $1_TRUE= cannam@86: $1_FALSE='#' cannam@86: else cannam@86: $1_TRUE='#' cannam@86: $1_FALSE= cannam@86: fi cannam@86: AC_CONFIG_COMMANDS_PRE( cannam@86: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then cannam@86: AC_MSG_ERROR([conditional "$1" was never defined. cannam@86: Usually this means the macro was only invoked conditionally.]) cannam@86: fi])]) cannam@86: cannam@86: # Add --enable-maintainer-mode option to configure. cannam@86: # From Jim Meyering cannam@86: cannam@86: # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # serial 2 cannam@86: cannam@86: AC_DEFUN([AM_MAINTAINER_MODE], cannam@86: [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) cannam@86: dnl maintainer-mode is disabled by default cannam@86: AC_ARG_ENABLE(maintainer-mode, cannam@86: [ --enable-maintainer-mode enable make rules and dependencies not useful cannam@86: (and sometimes confusing) to the casual installer], cannam@86: USE_MAINTAINER_MODE=$enableval, cannam@86: USE_MAINTAINER_MODE=no) cannam@86: AC_MSG_RESULT([$USE_MAINTAINER_MODE]) cannam@86: AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) cannam@86: MAINT=$MAINTAINER_MODE_TRUE cannam@86: AC_SUBST(MAINT)dnl cannam@86: ] cannam@86: ) cannam@86: cannam@86: AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) cannam@86: cannam@86: # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- cannam@86: cannam@86: # serial 47 AC_PROG_LIBTOOL cannam@86: cannam@86: cannam@86: # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) cannam@86: # ----------------------------------------------------------- cannam@86: # If this macro is not defined by Autoconf, define it here. cannam@86: m4_ifdef([AC_PROVIDE_IFELSE], cannam@86: [], cannam@86: [m4_define([AC_PROVIDE_IFELSE], cannam@86: [m4_ifdef([AC_PROVIDE_$1], cannam@86: [$2], [$3])])]) cannam@86: cannam@86: cannam@86: # AC_PROG_LIBTOOL cannam@86: # --------------- cannam@86: AC_DEFUN([AC_PROG_LIBTOOL], cannam@86: [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl cannam@86: dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX cannam@86: dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. cannam@86: AC_PROVIDE_IFELSE([AC_PROG_CXX], cannam@86: [AC_LIBTOOL_CXX], cannam@86: [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX cannam@86: ])]) cannam@86: dnl And a similar setup for Fortran 77 support cannam@86: AC_PROVIDE_IFELSE([AC_PROG_F77], cannam@86: [AC_LIBTOOL_F77], cannam@86: [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 cannam@86: ])]) cannam@86: cannam@86: dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. cannam@86: dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run cannam@86: dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. cannam@86: AC_PROVIDE_IFELSE([AC_PROG_GCJ], cannam@86: [AC_LIBTOOL_GCJ], cannam@86: [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], cannam@86: [AC_LIBTOOL_GCJ], cannam@86: [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], cannam@86: [AC_LIBTOOL_GCJ], cannam@86: [ifdef([AC_PROG_GCJ], cannam@86: [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) cannam@86: ifdef([A][M_PROG_GCJ], cannam@86: [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) cannam@86: ifdef([LT_AC_PROG_GCJ], cannam@86: [define([LT_AC_PROG_GCJ], cannam@86: defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) cannam@86: ])])# AC_PROG_LIBTOOL cannam@86: cannam@86: cannam@86: # _AC_PROG_LIBTOOL cannam@86: # ---------------- cannam@86: AC_DEFUN([_AC_PROG_LIBTOOL], cannam@86: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl cannam@86: AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl cannam@86: AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl cannam@86: AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl cannam@86: cannam@86: # This can be used to rebuild libtool when needed cannam@86: LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" cannam@86: cannam@86: # Always use our own libtool. cannam@86: LIBTOOL='$(SHELL) $(top_builddir)/libtool' cannam@86: AC_SUBST(LIBTOOL)dnl cannam@86: cannam@86: # Prevent multiple expansion cannam@86: define([AC_PROG_LIBTOOL], []) cannam@86: ])# _AC_PROG_LIBTOOL cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SETUP cannam@86: # ---------------- cannam@86: AC_DEFUN([AC_LIBTOOL_SETUP], cannam@86: [AC_PREREQ(2.50)dnl cannam@86: AC_REQUIRE([AC_ENABLE_SHARED])dnl cannam@86: AC_REQUIRE([AC_ENABLE_STATIC])dnl cannam@86: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl cannam@86: AC_REQUIRE([AC_CANONICAL_HOST])dnl cannam@86: AC_REQUIRE([AC_CANONICAL_BUILD])dnl cannam@86: AC_REQUIRE([AC_PROG_CC])dnl cannam@86: AC_REQUIRE([AC_PROG_LD])dnl cannam@86: AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl cannam@86: AC_REQUIRE([AC_PROG_NM])dnl cannam@86: cannam@86: AC_REQUIRE([AC_PROG_LN_S])dnl cannam@86: AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl cannam@86: # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! cannam@86: AC_REQUIRE([AC_OBJEXT])dnl cannam@86: AC_REQUIRE([AC_EXEEXT])dnl cannam@86: dnl cannam@86: cannam@86: AC_LIBTOOL_SYS_MAX_CMD_LEN cannam@86: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE cannam@86: AC_LIBTOOL_OBJDIR cannam@86: cannam@86: AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl cannam@86: _LT_AC_PROG_ECHO_BACKSLASH cannam@86: cannam@86: case $host_os in cannam@86: aix3*) cannam@86: # AIX sometimes has problems with the GCC collect2 program. For some cannam@86: # reason, if we set the COLLECT_NAMES environment variable, the problems cannam@86: # vanish in a puff of smoke. cannam@86: if test "X${COLLECT_NAMES+set}" != Xset; then cannam@86: COLLECT_NAMES= cannam@86: export COLLECT_NAMES cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # Sed substitution that helps us do robust quoting. It backslashifies cannam@86: # metacharacters that are still active within double-quoted strings. cannam@86: Xsed='sed -e 1s/^X//' cannam@86: [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] cannam@86: cannam@86: # Same as above, but do not quote variable references. cannam@86: [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] cannam@86: cannam@86: # Sed substitution to delay expansion of an escaped shell variable in a cannam@86: # double_quote_subst'ed string. cannam@86: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' cannam@86: cannam@86: # Sed substitution to avoid accidental globbing in evaled expressions cannam@86: no_glob_subst='s/\*/\\\*/g' cannam@86: cannam@86: # Constants: cannam@86: rm="rm -f" cannam@86: cannam@86: # Global variables: cannam@86: default_ofile=libtool cannam@86: can_build_shared=yes cannam@86: cannam@86: # All known linkers require a `.a' archive for static linking (except M$VC, cannam@86: # which needs '.lib'). cannam@86: libext=a cannam@86: ltmain="$ac_aux_dir/ltmain.sh" cannam@86: ofile="$default_ofile" cannam@86: with_gnu_ld="$lt_cv_prog_gnu_ld" cannam@86: cannam@86: AC_CHECK_TOOL(AR, ar, false) cannam@86: AC_CHECK_TOOL(RANLIB, ranlib, :) cannam@86: AC_CHECK_TOOL(STRIP, strip, :) cannam@86: cannam@86: old_CC="$CC" cannam@86: old_CFLAGS="$CFLAGS" cannam@86: cannam@86: # Set sane defaults for various variables cannam@86: test -z "$AR" && AR=ar cannam@86: test -z "$AR_FLAGS" && AR_FLAGS=cru cannam@86: test -z "$AS" && AS=as cannam@86: test -z "$CC" && CC=cc cannam@86: test -z "$LTCC" && LTCC=$CC cannam@86: test -z "$DLLTOOL" && DLLTOOL=dlltool cannam@86: test -z "$LD" && LD=ld cannam@86: test -z "$LN_S" && LN_S="ln -s" cannam@86: test -z "$MAGIC_CMD" && MAGIC_CMD=file cannam@86: test -z "$NM" && NM=nm cannam@86: test -z "$SED" && SED=sed cannam@86: test -z "$OBJDUMP" && OBJDUMP=objdump cannam@86: test -z "$RANLIB" && RANLIB=: cannam@86: test -z "$STRIP" && STRIP=: cannam@86: test -z "$ac_objext" && ac_objext=o cannam@86: cannam@86: # Determine commands to create old-style static archives. cannam@86: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' cannam@86: old_postinstall_cmds='chmod 644 $oldlib' cannam@86: old_postuninstall_cmds= cannam@86: cannam@86: if test -n "$RANLIB"; then cannam@86: case $host_os in cannam@86: openbsd*) cannam@86: old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" cannam@86: ;; cannam@86: *) cannam@86: old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" cannam@86: ;; cannam@86: esac cannam@86: old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" cannam@86: fi cannam@86: cannam@86: _LT_CC_BASENAME([$compiler]) cannam@86: cannam@86: # Only perform the check for file, if the check method requires it cannam@86: case $deplibs_check_method in cannam@86: file_magic*) cannam@86: if test "$file_magic_cmd" = '$MAGIC_CMD'; then cannam@86: AC_PATH_MAGIC cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: cannam@86: AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) cannam@86: AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], cannam@86: enable_win32_dll=yes, enable_win32_dll=no) cannam@86: cannam@86: AC_ARG_ENABLE([libtool-lock], cannam@86: [AC_HELP_STRING([--disable-libtool-lock], cannam@86: [avoid locking (might break parallel builds)])]) cannam@86: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes cannam@86: cannam@86: AC_ARG_WITH([pic], cannam@86: [AC_HELP_STRING([--with-pic], cannam@86: [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], cannam@86: [pic_mode="$withval"], cannam@86: [pic_mode=default]) cannam@86: test -z "$pic_mode" && pic_mode=default cannam@86: cannam@86: # Use C for the default configuration in the libtool script cannam@86: tagname= cannam@86: AC_LIBTOOL_LANG_C_CONFIG cannam@86: _LT_AC_TAGCONFIG cannam@86: ])# AC_LIBTOOL_SETUP cannam@86: cannam@86: cannam@86: # _LT_AC_SYS_COMPILER cannam@86: # ------------------- cannam@86: AC_DEFUN([_LT_AC_SYS_COMPILER], cannam@86: [AC_REQUIRE([AC_PROG_CC])dnl cannam@86: cannam@86: # If no C compiler was specified, use CC. cannam@86: LTCC=${LTCC-"$CC"} cannam@86: cannam@86: # Allow CC to be a program name with arguments. cannam@86: compiler=$CC cannam@86: ])# _LT_AC_SYS_COMPILER cannam@86: cannam@86: cannam@86: # _LT_CC_BASENAME(CC) cannam@86: # ------------------- cannam@86: # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. cannam@86: AC_DEFUN([_LT_CC_BASENAME], cannam@86: [for cc_temp in $1""; do cannam@86: case $cc_temp in cannam@86: compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; cannam@86: distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; cannam@86: \-*) ;; cannam@86: *) break;; cannam@86: esac cannam@86: done cannam@86: cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` cannam@86: ]) cannam@86: cannam@86: cannam@86: # _LT_COMPILER_BOILERPLATE cannam@86: # ------------------------ cannam@86: # Check for compiler boilerplate output or warnings with cannam@86: # the simple compiler test code. cannam@86: AC_DEFUN([_LT_COMPILER_BOILERPLATE], cannam@86: [ac_outfile=conftest.$ac_objext cannam@86: printf "$lt_simple_compile_test_code" >conftest.$ac_ext cannam@86: eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err cannam@86: _lt_compiler_boilerplate=`cat conftest.err` cannam@86: $rm conftest* cannam@86: ])# _LT_COMPILER_BOILERPLATE cannam@86: cannam@86: cannam@86: # _LT_LINKER_BOILERPLATE cannam@86: # ---------------------- cannam@86: # Check for linker boilerplate output or warnings with cannam@86: # the simple link test code. cannam@86: AC_DEFUN([_LT_LINKER_BOILERPLATE], cannam@86: [ac_outfile=conftest.$ac_objext cannam@86: printf "$lt_simple_link_test_code" >conftest.$ac_ext cannam@86: eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err cannam@86: _lt_linker_boilerplate=`cat conftest.err` cannam@86: $rm conftest* cannam@86: ])# _LT_LINKER_BOILERPLATE cannam@86: cannam@86: cannam@86: # _LT_AC_SYS_LIBPATH_AIX cannam@86: # ---------------------- cannam@86: # Links a minimal program and checks the executable cannam@86: # for the system default hardcoded library path. In most cases, cannam@86: # this is /usr/lib:/lib, but when the MPI compilers are used cannam@86: # the location of the communication and MPI libs are included too. cannam@86: # If we don't find anything, use the default library path according cannam@86: # to the aix ld manual. cannam@86: AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], cannam@86: [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ cannam@86: aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } cannam@86: }'` cannam@86: # Check for a 64-bit object if we didn't find anything. cannam@86: if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } cannam@86: }'`; fi],[]) cannam@86: if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi cannam@86: ])# _LT_AC_SYS_LIBPATH_AIX cannam@86: cannam@86: cannam@86: # _LT_AC_SHELL_INIT(ARG) cannam@86: # ---------------------- cannam@86: AC_DEFUN([_LT_AC_SHELL_INIT], cannam@86: [ifdef([AC_DIVERSION_NOTICE], cannam@86: [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], cannam@86: [AC_DIVERT_PUSH(NOTICE)]) cannam@86: $1 cannam@86: AC_DIVERT_POP cannam@86: ])# _LT_AC_SHELL_INIT cannam@86: cannam@86: cannam@86: # _LT_AC_PROG_ECHO_BACKSLASH cannam@86: # -------------------------- cannam@86: # Add some code to the start of the generated configure script which cannam@86: # will find an echo command which doesn't interpret backslashes. cannam@86: AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], cannam@86: [_LT_AC_SHELL_INIT([ cannam@86: # Check that we are running under the correct shell. cannam@86: SHELL=${CONFIG_SHELL-/bin/sh} cannam@86: cannam@86: case X$ECHO in cannam@86: X*--fallback-echo) cannam@86: # Remove one level of quotation (which was required for Make). cannam@86: ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` cannam@86: ;; cannam@86: esac cannam@86: cannam@86: echo=${ECHO-echo} cannam@86: if test "X[$]1" = X--no-reexec; then cannam@86: # Discard the --no-reexec flag, and continue. cannam@86: shift cannam@86: elif test "X[$]1" = X--fallback-echo; then cannam@86: # Avoid inline document here, it may be left over cannam@86: : cannam@86: elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then cannam@86: # Yippee, $echo works! cannam@86: : cannam@86: else cannam@86: # Restart under the correct shell. cannam@86: exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} cannam@86: fi cannam@86: cannam@86: if test "X[$]1" = X--fallback-echo; then cannam@86: # used as fallback echo cannam@86: shift cannam@86: cat </dev/null 2>&1 && unset CDPATH cannam@86: cannam@86: if test -z "$ECHO"; then cannam@86: if test "X${echo_test_string+set}" != Xset; then cannam@86: # find a string as large as possible, as long as the shell can cope with it cannam@86: for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do cannam@86: # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... cannam@86: if (echo_test_string="`eval $cmd`") 2>/dev/null && cannam@86: echo_test_string="`eval $cmd`" && cannam@86: (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null cannam@86: then cannam@86: break cannam@86: fi cannam@86: done cannam@86: fi cannam@86: cannam@86: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && cannam@86: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: : cannam@86: else cannam@86: # The Solaris, AIX, and Digital Unix default echo programs unquote cannam@86: # backslashes. This makes it impossible to quote backslashes using cannam@86: # echo "$something" | sed 's/\\/\\\\/g' cannam@86: # cannam@86: # So, first we look for a working echo in the user's PATH. cannam@86: cannam@86: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR cannam@86: for dir in $PATH /usr/ucb; do cannam@86: IFS="$lt_save_ifs" cannam@86: if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && cannam@86: test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && cannam@86: echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: echo="$dir/echo" cannam@86: break cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: cannam@86: if test "X$echo" = Xecho; then cannam@86: # We didn't find a better echo, so look for alternatives. cannam@86: if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && cannam@86: echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: # This shell has a builtin print -r that does the trick. cannam@86: echo='print -r' cannam@86: elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && cannam@86: test "X$CONFIG_SHELL" != X/bin/ksh; then cannam@86: # If we have ksh, try running configure again with it. cannam@86: ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} cannam@86: export ORIGINAL_CONFIG_SHELL cannam@86: CONFIG_SHELL=/bin/ksh cannam@86: export CONFIG_SHELL cannam@86: exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} cannam@86: else cannam@86: # Try using printf. cannam@86: echo='printf %s\n' cannam@86: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && cannam@86: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: # Cool, printf works cannam@86: : cannam@86: elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && cannam@86: test "X$echo_testing_string" = 'X\t' && cannam@86: echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL cannam@86: export CONFIG_SHELL cannam@86: SHELL="$CONFIG_SHELL" cannam@86: export SHELL cannam@86: echo="$CONFIG_SHELL [$]0 --fallback-echo" cannam@86: elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && cannam@86: test "X$echo_testing_string" = 'X\t' && cannam@86: echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && cannam@86: test "X$echo_testing_string" = "X$echo_test_string"; then cannam@86: echo="$CONFIG_SHELL [$]0 --fallback-echo" cannam@86: else cannam@86: # maybe with a smaller string... cannam@86: prev=: cannam@86: cannam@86: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do cannam@86: if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null cannam@86: then cannam@86: break cannam@86: fi cannam@86: prev="$cmd" cannam@86: done cannam@86: cannam@86: if test "$prev" != 'sed 50q "[$]0"'; then cannam@86: echo_test_string=`eval $prev` cannam@86: export echo_test_string cannam@86: exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} cannam@86: else cannam@86: # Oops. We lost completely, so just stick with echo. cannam@86: echo=echo cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: cannam@86: # Copy echo and quote the copy suitably for passing to libtool from cannam@86: # the Makefile, instead of quoting the original, which is used later. cannam@86: ECHO=$echo cannam@86: if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then cannam@86: ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" cannam@86: fi cannam@86: cannam@86: AC_SUBST(ECHO) cannam@86: ])])# _LT_AC_PROG_ECHO_BACKSLASH cannam@86: cannam@86: cannam@86: # _LT_AC_LOCK cannam@86: # ----------- cannam@86: AC_DEFUN([_LT_AC_LOCK], cannam@86: [AC_ARG_ENABLE([libtool-lock], cannam@86: [AC_HELP_STRING([--disable-libtool-lock], cannam@86: [avoid locking (might break parallel builds)])]) cannam@86: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes cannam@86: cannam@86: # Some flags need to be propagated to the compiler or linker for good cannam@86: # libtool support. cannam@86: case $host in cannam@86: ia64-*-hpux*) cannam@86: # Find out which ABI we are using. cannam@86: echo 'int i;' > conftest.$ac_ext cannam@86: if AC_TRY_EVAL(ac_compile); then cannam@86: case `/usr/bin/file conftest.$ac_objext` in cannam@86: *ELF-32*) cannam@86: HPUX_IA64_MODE="32" cannam@86: ;; cannam@86: *ELF-64*) cannam@86: HPUX_IA64_MODE="64" cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: rm -rf conftest* cannam@86: ;; cannam@86: *-*-irix6*) cannam@86: # Find out which ABI we are using. cannam@86: echo '[#]line __oline__ "configure"' > conftest.$ac_ext cannam@86: if AC_TRY_EVAL(ac_compile); then cannam@86: if test "$lt_cv_prog_gnu_ld" = yes; then cannam@86: case `/usr/bin/file conftest.$ac_objext` in cannam@86: *32-bit*) cannam@86: LD="${LD-ld} -melf32bsmip" cannam@86: ;; cannam@86: *N32*) cannam@86: LD="${LD-ld} -melf32bmipn32" cannam@86: ;; cannam@86: *64-bit*) cannam@86: LD="${LD-ld} -melf64bmip" cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: case `/usr/bin/file conftest.$ac_objext` in cannam@86: *32-bit*) cannam@86: LD="${LD-ld} -32" cannam@86: ;; cannam@86: *N32*) cannam@86: LD="${LD-ld} -n32" cannam@86: ;; cannam@86: *64-bit*) cannam@86: LD="${LD-ld} -64" cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: fi cannam@86: rm -rf conftest* cannam@86: ;; cannam@86: cannam@86: x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) cannam@86: # Find out which ABI we are using. cannam@86: echo 'int i;' > conftest.$ac_ext cannam@86: if AC_TRY_EVAL(ac_compile); then cannam@86: case "`/usr/bin/file conftest.o`" in cannam@86: *32-bit*) cannam@86: case $host in cannam@86: x86_64-*linux*) cannam@86: LD="${LD-ld} -m elf_i386" cannam@86: ;; cannam@86: ppc64-*linux*|powerpc64-*linux*) cannam@86: LD="${LD-ld} -m elf32ppclinux" cannam@86: ;; cannam@86: s390x-*linux*) cannam@86: LD="${LD-ld} -m elf_s390" cannam@86: ;; cannam@86: sparc64-*linux*) cannam@86: LD="${LD-ld} -m elf32_sparc" cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: *64-bit*) cannam@86: case $host in cannam@86: x86_64-*linux*) cannam@86: LD="${LD-ld} -m elf_x86_64" cannam@86: ;; cannam@86: ppc*-*linux*|powerpc*-*linux*) cannam@86: LD="${LD-ld} -m elf64ppc" cannam@86: ;; cannam@86: s390*-*linux*) cannam@86: LD="${LD-ld} -m elf64_s390" cannam@86: ;; cannam@86: sparc*-*linux*) cannam@86: LD="${LD-ld} -m elf64_sparc" cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: rm -rf conftest* cannam@86: ;; cannam@86: cannam@86: *-*-sco3.2v5*) cannam@86: # On SCO OpenServer 5, we need -belf to get full-featured binaries. cannam@86: SAVE_CFLAGS="$CFLAGS" cannam@86: CFLAGS="$CFLAGS -belf" cannam@86: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, cannam@86: [AC_LANG_PUSH(C) cannam@86: AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) cannam@86: AC_LANG_POP]) cannam@86: if test x"$lt_cv_cc_needs_belf" != x"yes"; then cannam@86: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf cannam@86: CFLAGS="$SAVE_CFLAGS" cannam@86: fi cannam@86: ;; cannam@86: AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], cannam@86: [*-*-cygwin* | *-*-mingw* | *-*-pw32*) cannam@86: AC_CHECK_TOOL(DLLTOOL, dlltool, false) cannam@86: AC_CHECK_TOOL(AS, as, false) cannam@86: AC_CHECK_TOOL(OBJDUMP, objdump, false) cannam@86: ;; cannam@86: ]) cannam@86: esac cannam@86: cannam@86: need_locks="$enable_libtool_lock" cannam@86: cannam@86: ])# _LT_AC_LOCK cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, cannam@86: # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) cannam@86: # ---------------------------------------------------------------- cannam@86: # Check whether the given compiler option works cannam@86: AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], cannam@86: [AC_REQUIRE([LT_AC_PROG_SED]) cannam@86: AC_CACHE_CHECK([$1], [$2], cannam@86: [$2=no cannam@86: ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) cannam@86: printf "$lt_simple_compile_test_code" > conftest.$ac_ext cannam@86: lt_compiler_flag="$3" cannam@86: # Insert the option either (1) after the last *FLAGS variable, or cannam@86: # (2) before a word containing "conftest.", or (3) at the end. cannam@86: # Note that $ac_compile itself does not contain backslashes and begins cannam@86: # with a dollar sign (not a hyphen), so the echo should work correctly. cannam@86: # The option is referenced via a variable to avoid confusing sed. cannam@86: lt_compile=`echo "$ac_compile" | $SED \ cannam@86: -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ cannam@86: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ cannam@86: -e 's:$: $lt_compiler_flag:'` cannam@86: (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) cannam@86: (eval "$lt_compile" 2>conftest.err) cannam@86: ac_status=$? cannam@86: cat conftest.err >&AS_MESSAGE_LOG_FD cannam@86: echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD cannam@86: if (exit $ac_status) && test -s "$ac_outfile"; then cannam@86: # The compiler can only warn and ignore the option if not recognized cannam@86: # So say no if there are warnings other than the usual output. cannam@86: $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp cannam@86: $SED '/^$/d' conftest.err >conftest.er2 cannam@86: if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then cannam@86: $2=yes cannam@86: fi cannam@86: fi cannam@86: $rm conftest* cannam@86: ]) cannam@86: cannam@86: if test x"[$]$2" = xyes; then cannam@86: ifelse([$5], , :, [$5]) cannam@86: else cannam@86: ifelse([$6], , :, [$6]) cannam@86: fi cannam@86: ])# AC_LIBTOOL_COMPILER_OPTION cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, cannam@86: # [ACTION-SUCCESS], [ACTION-FAILURE]) cannam@86: # ------------------------------------------------------------ cannam@86: # Check whether the given compiler option works cannam@86: AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], cannam@86: [AC_CACHE_CHECK([$1], [$2], cannam@86: [$2=no cannam@86: save_LDFLAGS="$LDFLAGS" cannam@86: LDFLAGS="$LDFLAGS $3" cannam@86: printf "$lt_simple_link_test_code" > conftest.$ac_ext cannam@86: if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then cannam@86: # The compiler can only warn and ignore the option if not recognized cannam@86: # So say no if there are warnings cannam@86: if test -s conftest.err; then cannam@86: # Append any errors to the config.log. cannam@86: cat conftest.err 1>&AS_MESSAGE_LOG_FD cannam@86: $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp cannam@86: $SED '/^$/d' conftest.err >conftest.er2 cannam@86: if diff conftest.exp conftest.er2 >/dev/null; then cannam@86: $2=yes cannam@86: fi cannam@86: else cannam@86: $2=yes cannam@86: fi cannam@86: fi cannam@86: $rm conftest* cannam@86: LDFLAGS="$save_LDFLAGS" cannam@86: ]) cannam@86: cannam@86: if test x"[$]$2" = xyes; then cannam@86: ifelse([$4], , :, [$4]) cannam@86: else cannam@86: ifelse([$5], , :, [$5]) cannam@86: fi cannam@86: ])# AC_LIBTOOL_LINKER_OPTION cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SYS_MAX_CMD_LEN cannam@86: # -------------------------- cannam@86: AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], cannam@86: [# find the maximum length of command line arguments cannam@86: AC_MSG_CHECKING([the maximum length of command line arguments]) cannam@86: AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl cannam@86: i=0 cannam@86: teststring="ABCD" cannam@86: cannam@86: case $build_os in cannam@86: msdosdjgpp*) cannam@86: # On DJGPP, this test can blow up pretty badly due to problems in libc cannam@86: # (any single argument exceeding 2000 bytes causes a buffer overrun cannam@86: # during glob expansion). Even if it were fixed, the result of this cannam@86: # check would be larger than it should be. cannam@86: lt_cv_sys_max_cmd_len=12288; # 12K is about right cannam@86: ;; cannam@86: cannam@86: gnu*) cannam@86: # Under GNU Hurd, this test is not required because there is cannam@86: # no limit to the length of command line arguments. cannam@86: # Libtool will interpret -1 as no limit whatsoever cannam@86: lt_cv_sys_max_cmd_len=-1; cannam@86: ;; cannam@86: cannam@86: cygwin* | mingw*) cannam@86: # On Win9x/ME, this test blows up -- it succeeds, but takes cannam@86: # about 5 minutes as the teststring grows exponentially. cannam@86: # Worse, since 9x/ME are not pre-emptively multitasking, cannam@86: # you end up with a "frozen" computer, even though with patience cannam@86: # the test eventually succeeds (with a max line length of 256k). cannam@86: # Instead, let's just punt: use the minimum linelength reported by cannam@86: # all of the supported platforms: 8192 (on NT/2K/XP). cannam@86: lt_cv_sys_max_cmd_len=8192; cannam@86: ;; cannam@86: cannam@86: amigaos*) cannam@86: # On AmigaOS with pdksh, this test takes hours, literally. cannam@86: # So we just punt and use a minimum line length of 8192. cannam@86: lt_cv_sys_max_cmd_len=8192; cannam@86: ;; cannam@86: cannam@86: netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) cannam@86: # This has been around since 386BSD, at least. Likely further. cannam@86: if test -x /sbin/sysctl; then cannam@86: lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` cannam@86: elif test -x /usr/sbin/sysctl; then cannam@86: lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` cannam@86: else cannam@86: lt_cv_sys_max_cmd_len=65536 # usable default for *BSD cannam@86: fi cannam@86: # And add a safety zone cannam@86: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` cannam@86: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` cannam@86: ;; cannam@86: osf*) cannam@86: # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure cannam@86: # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not cannam@86: # nice to cause kernel panics so lets avoid the loop below. cannam@86: # First set a reasonable default. cannam@86: lt_cv_sys_max_cmd_len=16384 cannam@86: # cannam@86: if test -x /sbin/sysconfig; then cannam@86: case `/sbin/sysconfig -q proc exec_disable_arg_limit` in cannam@86: *1*) lt_cv_sys_max_cmd_len=-1 ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: *) cannam@86: # If test is not a shell built-in, we'll probably end up computing a cannam@86: # maximum length that is only half of the actual maximum length, but cannam@86: # we can't tell. cannam@86: SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} cannam@86: while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ cannam@86: = "XX$teststring") >/dev/null 2>&1 && cannam@86: new_result=`expr "X$teststring" : ".*" 2>&1` && cannam@86: lt_cv_sys_max_cmd_len=$new_result && cannam@86: test $i != 17 # 1/2 MB should be enough cannam@86: do cannam@86: i=`expr $i + 1` cannam@86: teststring=$teststring$teststring cannam@86: done cannam@86: teststring= cannam@86: # Add a significant safety factor because C++ compilers can tack on massive cannam@86: # amounts of additional arguments before passing them to the linker. cannam@86: # It appears as though 1/2 is a usable value. cannam@86: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` cannam@86: ;; cannam@86: esac cannam@86: ]) cannam@86: if test -n $lt_cv_sys_max_cmd_len ; then cannam@86: AC_MSG_RESULT($lt_cv_sys_max_cmd_len) cannam@86: else cannam@86: AC_MSG_RESULT(none) cannam@86: fi cannam@86: ])# AC_LIBTOOL_SYS_MAX_CMD_LEN cannam@86: cannam@86: cannam@86: # _LT_AC_CHECK_DLFCN cannam@86: # -------------------- cannam@86: AC_DEFUN([_LT_AC_CHECK_DLFCN], cannam@86: [AC_CHECK_HEADERS(dlfcn.h)dnl cannam@86: ])# _LT_AC_CHECK_DLFCN cannam@86: cannam@86: cannam@86: # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, cannam@86: # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) cannam@86: # ------------------------------------------------------------------ cannam@86: AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], cannam@86: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl cannam@86: if test "$cross_compiling" = yes; then : cannam@86: [$4] cannam@86: else cannam@86: lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 cannam@86: lt_status=$lt_dlunknown cannam@86: cat > conftest.$ac_ext < cannam@86: #endif cannam@86: cannam@86: #include cannam@86: cannam@86: #ifdef RTLD_GLOBAL cannam@86: # define LT_DLGLOBAL RTLD_GLOBAL cannam@86: #else cannam@86: # ifdef DL_GLOBAL cannam@86: # define LT_DLGLOBAL DL_GLOBAL cannam@86: # else cannam@86: # define LT_DLGLOBAL 0 cannam@86: # endif cannam@86: #endif cannam@86: cannam@86: /* We may have to define LT_DLLAZY_OR_NOW in the command line if we cannam@86: find out it does not work in some platform. */ cannam@86: #ifndef LT_DLLAZY_OR_NOW cannam@86: # ifdef RTLD_LAZY cannam@86: # define LT_DLLAZY_OR_NOW RTLD_LAZY cannam@86: # else cannam@86: # ifdef DL_LAZY cannam@86: # define LT_DLLAZY_OR_NOW DL_LAZY cannam@86: # else cannam@86: # ifdef RTLD_NOW cannam@86: # define LT_DLLAZY_OR_NOW RTLD_NOW cannam@86: # else cannam@86: # ifdef DL_NOW cannam@86: # define LT_DLLAZY_OR_NOW DL_NOW cannam@86: # else cannam@86: # define LT_DLLAZY_OR_NOW 0 cannam@86: # endif cannam@86: # endif cannam@86: # endif cannam@86: # endif cannam@86: #endif cannam@86: cannam@86: #ifdef __cplusplus cannam@86: extern "C" void exit (int); cannam@86: #endif cannam@86: cannam@86: void fnord() { int i=42;} cannam@86: int main () cannam@86: { cannam@86: void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); cannam@86: int status = $lt_dlunknown; cannam@86: cannam@86: if (self) cannam@86: { cannam@86: if (dlsym (self,"fnord")) status = $lt_dlno_uscore; cannam@86: else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; cannam@86: /* dlclose (self); */ cannam@86: } cannam@86: cannam@86: exit (status); cannam@86: }] cannam@86: EOF cannam@86: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then cannam@86: (./conftest; exit; ) 2>/dev/null cannam@86: lt_status=$? cannam@86: case x$lt_status in cannam@86: x$lt_dlno_uscore) $1 ;; cannam@86: x$lt_dlneed_uscore) $2 ;; cannam@86: x$lt_unknown|x*) $3 ;; cannam@86: esac cannam@86: else : cannam@86: # compilation failed cannam@86: $3 cannam@86: fi cannam@86: fi cannam@86: rm -fr conftest* cannam@86: ])# _LT_AC_TRY_DLOPEN_SELF cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_DLOPEN_SELF cannam@86: # ------------------- cannam@86: AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], cannam@86: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl cannam@86: if test "x$enable_dlopen" != xyes; then cannam@86: enable_dlopen=unknown cannam@86: enable_dlopen_self=unknown cannam@86: enable_dlopen_self_static=unknown cannam@86: else cannam@86: lt_cv_dlopen=no cannam@86: lt_cv_dlopen_libs= cannam@86: cannam@86: case $host_os in cannam@86: beos*) cannam@86: lt_cv_dlopen="load_add_on" cannam@86: lt_cv_dlopen_libs= cannam@86: lt_cv_dlopen_self=yes cannam@86: ;; cannam@86: cannam@86: mingw* | pw32*) cannam@86: lt_cv_dlopen="LoadLibrary" cannam@86: lt_cv_dlopen_libs= cannam@86: ;; cannam@86: cannam@86: cygwin*) cannam@86: lt_cv_dlopen="dlopen" cannam@86: lt_cv_dlopen_libs= cannam@86: ;; cannam@86: cannam@86: darwin*) cannam@86: # if libdl is installed we need to link against it cannam@86: AC_CHECK_LIB([dl], [dlopen], cannam@86: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ cannam@86: lt_cv_dlopen="dyld" cannam@86: lt_cv_dlopen_libs= cannam@86: lt_cv_dlopen_self=yes cannam@86: ]) cannam@86: ;; cannam@86: cannam@86: *) cannam@86: AC_CHECK_FUNC([shl_load], cannam@86: [lt_cv_dlopen="shl_load"], cannam@86: [AC_CHECK_LIB([dld], [shl_load], cannam@86: [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], cannam@86: [AC_CHECK_FUNC([dlopen], cannam@86: [lt_cv_dlopen="dlopen"], cannam@86: [AC_CHECK_LIB([dl], [dlopen], cannam@86: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], cannam@86: [AC_CHECK_LIB([svld], [dlopen], cannam@86: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], cannam@86: [AC_CHECK_LIB([dld], [dld_link], cannam@86: [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) cannam@86: ]) cannam@86: ]) cannam@86: ]) cannam@86: ]) cannam@86: ]) cannam@86: ;; cannam@86: esac cannam@86: cannam@86: if test "x$lt_cv_dlopen" != xno; then cannam@86: enable_dlopen=yes cannam@86: else cannam@86: enable_dlopen=no cannam@86: fi cannam@86: cannam@86: case $lt_cv_dlopen in cannam@86: dlopen) cannam@86: save_CPPFLAGS="$CPPFLAGS" cannam@86: test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" cannam@86: cannam@86: save_LDFLAGS="$LDFLAGS" cannam@86: eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" cannam@86: cannam@86: save_LIBS="$LIBS" cannam@86: LIBS="$lt_cv_dlopen_libs $LIBS" cannam@86: cannam@86: AC_CACHE_CHECK([whether a program can dlopen itself], cannam@86: lt_cv_dlopen_self, [dnl cannam@86: _LT_AC_TRY_DLOPEN_SELF( cannam@86: lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, cannam@86: lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) cannam@86: ]) cannam@86: cannam@86: if test "x$lt_cv_dlopen_self" = xyes; then cannam@86: LDFLAGS="$LDFLAGS $link_static_flag" cannam@86: AC_CACHE_CHECK([whether a statically linked program can dlopen itself], cannam@86: lt_cv_dlopen_self_static, [dnl cannam@86: _LT_AC_TRY_DLOPEN_SELF( cannam@86: lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, cannam@86: lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) cannam@86: ]) cannam@86: fi cannam@86: cannam@86: CPPFLAGS="$save_CPPFLAGS" cannam@86: LDFLAGS="$save_LDFLAGS" cannam@86: LIBS="$save_LIBS" cannam@86: ;; cannam@86: esac cannam@86: cannam@86: case $lt_cv_dlopen_self in cannam@86: yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; cannam@86: *) enable_dlopen_self=unknown ;; cannam@86: esac cannam@86: cannam@86: case $lt_cv_dlopen_self_static in cannam@86: yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; cannam@86: *) enable_dlopen_self_static=unknown ;; cannam@86: esac cannam@86: fi cannam@86: ])# AC_LIBTOOL_DLOPEN_SELF cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) cannam@86: # --------------------------------- cannam@86: # Check to see if options -c and -o are simultaneously supported by compiler cannam@86: AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], cannam@86: [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl cannam@86: AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], cannam@86: [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], cannam@86: [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no cannam@86: $rm -r conftest 2>/dev/null cannam@86: mkdir conftest cannam@86: cd conftest cannam@86: mkdir out cannam@86: printf "$lt_simple_compile_test_code" > conftest.$ac_ext cannam@86: cannam@86: lt_compiler_flag="-o out/conftest2.$ac_objext" cannam@86: # Insert the option either (1) after the last *FLAGS variable, or cannam@86: # (2) before a word containing "conftest.", or (3) at the end. cannam@86: # Note that $ac_compile itself does not contain backslashes and begins cannam@86: # with a dollar sign (not a hyphen), so the echo should work correctly. cannam@86: lt_compile=`echo "$ac_compile" | $SED \ cannam@86: -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ cannam@86: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ cannam@86: -e 's:$: $lt_compiler_flag:'` cannam@86: (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) cannam@86: (eval "$lt_compile" 2>out/conftest.err) cannam@86: ac_status=$? cannam@86: cat out/conftest.err >&AS_MESSAGE_LOG_FD cannam@86: echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD cannam@86: if (exit $ac_status) && test -s out/conftest2.$ac_objext cannam@86: then cannam@86: # The compiler can only warn and ignore the option if not recognized cannam@86: # So say no if there are warnings cannam@86: $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp cannam@86: $SED '/^$/d' out/conftest.err >out/conftest.er2 cannam@86: if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then cannam@86: _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes cannam@86: fi cannam@86: fi cannam@86: chmod u+w . cannam@86: $rm conftest* cannam@86: # SGI C++ compiler will create directory out/ii_files/ for cannam@86: # template instantiation cannam@86: test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files cannam@86: $rm out/* && rmdir out cannam@86: cd .. cannam@86: rmdir conftest cannam@86: $rm conftest* cannam@86: ]) cannam@86: ])# AC_LIBTOOL_PROG_CC_C_O cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) cannam@86: # ----------------------------------------- cannam@86: # Check to see if we can do hard links to lock some files if needed cannam@86: AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], cannam@86: [AC_REQUIRE([_LT_AC_LOCK])dnl cannam@86: cannam@86: hard_links="nottested" cannam@86: if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then cannam@86: # do not overwrite the value of need_locks provided by the user cannam@86: AC_MSG_CHECKING([if we can lock with hard links]) cannam@86: hard_links=yes cannam@86: $rm conftest* cannam@86: ln conftest.a conftest.b 2>/dev/null && hard_links=no cannam@86: touch conftest.a cannam@86: ln conftest.a conftest.b 2>&5 || hard_links=no cannam@86: ln conftest.a conftest.b 2>/dev/null && hard_links=no cannam@86: AC_MSG_RESULT([$hard_links]) cannam@86: if test "$hard_links" = no; then cannam@86: AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) cannam@86: need_locks=warn cannam@86: fi cannam@86: else cannam@86: need_locks=no cannam@86: fi cannam@86: ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_OBJDIR cannam@86: # ----------------- cannam@86: AC_DEFUN([AC_LIBTOOL_OBJDIR], cannam@86: [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], cannam@86: [rm -f .libs 2>/dev/null cannam@86: mkdir .libs 2>/dev/null cannam@86: if test -d .libs; then cannam@86: lt_cv_objdir=.libs cannam@86: else cannam@86: # MS-DOS does not allow filenames that begin with a dot. cannam@86: lt_cv_objdir=_libs cannam@86: fi cannam@86: rmdir .libs 2>/dev/null]) cannam@86: objdir=$lt_cv_objdir cannam@86: ])# AC_LIBTOOL_OBJDIR cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) cannam@86: # ---------------------------------------------- cannam@86: # Check hardcoding attributes. cannam@86: AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], cannam@86: [AC_MSG_CHECKING([how to hardcode library paths into programs]) cannam@86: _LT_AC_TAGVAR(hardcode_action, $1)= cannam@86: if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ cannam@86: test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ cannam@86: test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then cannam@86: cannam@86: # We can hardcode non-existant directories. cannam@86: if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && cannam@86: # If the only mechanism to avoid hardcoding is shlibpath_var, we cannam@86: # have to relink, otherwise we might link with an installed library cannam@86: # when we should be linking with a yet-to-be-installed one cannam@86: ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && cannam@86: test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then cannam@86: # Linking always hardcodes the temporary library directory. cannam@86: _LT_AC_TAGVAR(hardcode_action, $1)=relink cannam@86: else cannam@86: # We can link without hardcoding, and we can hardcode nonexisting dirs. cannam@86: _LT_AC_TAGVAR(hardcode_action, $1)=immediate cannam@86: fi cannam@86: else cannam@86: # We cannot hardcode anything, or else we can only hardcode existing cannam@86: # directories. cannam@86: _LT_AC_TAGVAR(hardcode_action, $1)=unsupported cannam@86: fi cannam@86: AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) cannam@86: cannam@86: if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then cannam@86: # Fast installation is not supported cannam@86: enable_fast_install=no cannam@86: elif test "$shlibpath_overrides_runpath" = yes || cannam@86: test "$enable_shared" = no; then cannam@86: # Fast installation is not necessary cannam@86: enable_fast_install=needless cannam@86: fi cannam@86: ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SYS_LIB_STRIP cannam@86: # ------------------------ cannam@86: AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], cannam@86: [striplib= cannam@86: old_striplib= cannam@86: AC_MSG_CHECKING([whether stripping libraries is possible]) cannam@86: if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then cannam@86: test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" cannam@86: test -z "$striplib" && striplib="$STRIP --strip-unneeded" cannam@86: AC_MSG_RESULT([yes]) cannam@86: else cannam@86: # FIXME - insert some real tests, host_os isn't really good enough cannam@86: case $host_os in cannam@86: darwin*) cannam@86: if test -n "$STRIP" ; then cannam@86: striplib="$STRIP -x" cannam@86: AC_MSG_RESULT([yes]) cannam@86: else cannam@86: AC_MSG_RESULT([no]) cannam@86: fi cannam@86: ;; cannam@86: *) cannam@86: AC_MSG_RESULT([no]) cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ])# AC_LIBTOOL_SYS_LIB_STRIP cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SYS_DYNAMIC_LINKER cannam@86: # ----------------------------- cannam@86: # PORTME Fill in your ld.so characteristics cannam@86: AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], cannam@86: [AC_MSG_CHECKING([dynamic linker characteristics]) cannam@86: library_names_spec= cannam@86: libname_spec='lib$name' cannam@86: soname_spec= cannam@86: shrext_cmds=".so" cannam@86: postinstall_cmds= cannam@86: postuninstall_cmds= cannam@86: finish_cmds= cannam@86: finish_eval= cannam@86: shlibpath_var= cannam@86: shlibpath_overrides_runpath=unknown cannam@86: version_type=none cannam@86: dynamic_linker="$host_os ld.so" cannam@86: sys_lib_dlsearch_path_spec="/lib /usr/lib" cannam@86: if test "$GCC" = yes; then cannam@86: sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` cannam@86: if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then cannam@86: # if the path contains ";" then we assume it to be the separator cannam@86: # otherwise default to the standard path separator (i.e. ":") - it is cannam@86: # assumed that no part of a normal pathname contains ";" but that should cannam@86: # okay in the real world where ";" in dirpaths is itself problematic. cannam@86: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` cannam@86: else cannam@86: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` cannam@86: fi cannam@86: else cannam@86: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" cannam@86: fi cannam@86: need_lib_prefix=unknown cannam@86: hardcode_into_libs=no cannam@86: cannam@86: # when you set need_version to no, make sure it does not cause -set_version cannam@86: # flags to be left without arguments cannam@86: need_version=unknown cannam@86: cannam@86: case $host_os in cannam@86: aix3*) cannam@86: version_type=linux cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' cannam@86: shlibpath_var=LIBPATH cannam@86: cannam@86: # AIX 3 has no versioning support, so we append a major version to the name. cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: ;; cannam@86: cannam@86: aix4* | aix5*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: hardcode_into_libs=yes cannam@86: if test "$host_cpu" = ia64; then cannam@86: # AIX 5 supports IA64 cannam@86: library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: else cannam@86: # With GCC up to 2.95.x, collect2 would create an import file cannam@86: # for dependence libraries. The import file would start with cannam@86: # the line `#! .'. This would cause the generated library to cannam@86: # depend on `.', always an invalid library. This was fixed in cannam@86: # development snapshots of GCC prior to 3.0. cannam@86: case $host_os in cannam@86: aix4 | aix4.[[01]] | aix4.[[01]].*) cannam@86: if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' cannam@86: echo ' yes ' cannam@86: echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then cannam@86: : cannam@86: else cannam@86: can_build_shared=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: # AIX (on Power*) has no versioning support, so currently we can not hardcode correct cannam@86: # soname into executable. Probably we can add versioning support to cannam@86: # collect2, so additional links can be useful in future. cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: # If using run time linking (on AIX 4.2 or later) use lib.so cannam@86: # instead of lib.a to let people know that these are not cannam@86: # typical AIX shared libraries. cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: else cannam@86: # We preserve .a as extension for shared libraries through AIX4.2 cannam@86: # and later when we are not doing run time linking. cannam@86: library_names_spec='${libname}${release}.a $libname.a' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: fi cannam@86: shlibpath_var=LIBPATH cannam@86: fi cannam@86: ;; cannam@86: cannam@86: amigaos*) cannam@86: library_names_spec='$libname.ixlibrary $libname.a' cannam@86: # Create ${libname}_ixlibrary.a entries in /sys/libs. cannam@86: 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' cannam@86: ;; cannam@86: cannam@86: beos*) cannam@86: library_names_spec='${libname}${shared_ext}' cannam@86: dynamic_linker="$host_os ld.so" cannam@86: shlibpath_var=LIBRARY_PATH cannam@86: ;; cannam@86: cannam@86: bsdi[[45]]*) cannam@86: version_type=linux cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" cannam@86: sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" cannam@86: # the default ld.so.conf also contains /usr/contrib/lib and cannam@86: # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow cannam@86: # libtool to hard-code these into programs cannam@86: ;; cannam@86: cannam@86: cygwin* | mingw* | pw32*) cannam@86: version_type=windows cannam@86: shrext_cmds=".dll" cannam@86: need_version=no cannam@86: need_lib_prefix=no cannam@86: cannam@86: case $GCC,$host_os in cannam@86: yes,cygwin* | yes,mingw* | yes,pw32*) cannam@86: library_names_spec='$libname.dll.a' cannam@86: # DLL is installed to $(libdir)/../bin by postinstall_cmds cannam@86: postinstall_cmds='base_file=`basename \${file}`~ cannam@86: dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ cannam@86: dldir=$destdir/`dirname \$dlpath`~ cannam@86: test -d \$dldir || mkdir -p \$dldir~ cannam@86: $install_prog $dir/$dlname \$dldir/$dlname' cannam@86: postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ cannam@86: dlpath=$dir/\$dldll~ cannam@86: $rm \$dlpath' cannam@86: shlibpath_overrides_runpath=yes cannam@86: cannam@86: case $host_os in cannam@86: cygwin*) cannam@86: # Cygwin DLLs use 'cyg' prefix rather than 'lib' cannam@86: soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' cannam@86: sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" cannam@86: ;; cannam@86: mingw*) cannam@86: # MinGW DLLs use traditional 'lib' prefix cannam@86: soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' cannam@86: sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` cannam@86: if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then cannam@86: # It is most probably a Windows format PATH printed by cannam@86: # mingw gcc, but we are running on Cygwin. Gcc prints its search cannam@86: # path with ; separators, and with drive letters. We can handle the cannam@86: # drive letters (cygwin fileutils understands them), so leave them, cannam@86: # especially as we might pass files found there to a mingw objdump, cannam@86: # which wouldn't understand a cygwinified path. Ahh. cannam@86: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` cannam@86: else cannam@86: sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` cannam@86: fi cannam@86: ;; cannam@86: pw32*) cannam@86: # pw32 DLLs use 'pw' prefix rather than 'lib' cannam@86: library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: *) cannam@86: library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' cannam@86: ;; cannam@86: esac cannam@86: dynamic_linker='Win32 ld.exe' cannam@86: # FIXME: first we should search . and the directory the executable is in cannam@86: shlibpath_var=PATH cannam@86: ;; cannam@86: cannam@86: darwin* | rhapsody*) cannam@86: dynamic_linker="$host_os dyld" cannam@86: version_type=darwin cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' cannam@86: soname_spec='${libname}${release}${major}$shared_ext' cannam@86: shlibpath_overrides_runpath=yes cannam@86: shlibpath_var=DYLD_LIBRARY_PATH cannam@86: shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' cannam@86: # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. cannam@86: if test "$GCC" = yes; then cannam@86: sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` cannam@86: else cannam@86: sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' cannam@86: fi cannam@86: sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' cannam@86: ;; cannam@86: cannam@86: dgux*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: ;; cannam@86: cannam@86: freebsd1*) cannam@86: dynamic_linker=no cannam@86: ;; cannam@86: cannam@86: kfreebsd*-gnu) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=no cannam@86: hardcode_into_libs=yes cannam@86: dynamic_linker='GNU ld.so' cannam@86: ;; cannam@86: cannam@86: freebsd* | dragonfly*) cannam@86: # DragonFly does not have aout. When/if they implement a new cannam@86: # versioning mechanism, adjust this. cannam@86: objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` cannam@86: version_type=freebsd-$objformat cannam@86: case $version_type in cannam@86: freebsd-elf*) cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' cannam@86: need_version=no cannam@86: need_lib_prefix=no cannam@86: ;; cannam@86: freebsd-*) cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' cannam@86: need_version=yes cannam@86: ;; cannam@86: esac cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: case $host_os in cannam@86: freebsd2*) cannam@86: shlibpath_overrides_runpath=yes cannam@86: ;; cannam@86: freebsd3.[[01]]* | freebsdelf3.[[01]]*) cannam@86: shlibpath_overrides_runpath=yes cannam@86: hardcode_into_libs=yes cannam@86: ;; cannam@86: *) # from 3.2 on cannam@86: shlibpath_overrides_runpath=no cannam@86: hardcode_into_libs=yes cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: gnu*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: hardcode_into_libs=yes cannam@86: ;; cannam@86: cannam@86: hpux9* | hpux10* | hpux11*) cannam@86: # Give a soname corresponding to the major version so that dld.sl refuses to cannam@86: # link against other versions. cannam@86: version_type=sunos cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: case "$host_cpu" in cannam@86: ia64*) cannam@86: shrext_cmds='.so' cannam@86: hardcode_into_libs=yes cannam@86: dynamic_linker="$host_os dld.so" cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: if test "X$HPUX_IA64_MODE" = X32; then cannam@86: sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" cannam@86: else cannam@86: sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" cannam@86: fi cannam@86: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec cannam@86: ;; cannam@86: hppa*64*) cannam@86: shrext_cmds='.sl' cannam@86: hardcode_into_libs=yes cannam@86: dynamic_linker="$host_os dld.sl" cannam@86: shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH cannam@86: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" cannam@86: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec cannam@86: ;; cannam@86: *) cannam@86: shrext_cmds='.sl' cannam@86: dynamic_linker="$host_os dld.sl" cannam@86: shlibpath_var=SHLIB_PATH cannam@86: shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: ;; cannam@86: esac cannam@86: # HP-UX runs *really* slowly unless shared libraries are mode 555. cannam@86: postinstall_cmds='chmod 555 $lib' cannam@86: ;; cannam@86: cannam@86: irix5* | irix6* | nonstopux*) cannam@86: case $host_os in cannam@86: nonstopux*) version_type=nonstopux ;; cannam@86: *) cannam@86: if test "$lt_cv_prog_gnu_ld" = yes; then cannam@86: version_type=linux cannam@86: else cannam@86: version_type=irix cannam@86: fi ;; cannam@86: esac cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' cannam@86: case $host_os in cannam@86: irix5* | nonstopux*) cannam@86: libsuff= shlibsuff= cannam@86: ;; cannam@86: *) cannam@86: case $LD in # libtool.m4 will add one of these switches to LD cannam@86: *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") cannam@86: libsuff= shlibsuff= libmagic=32-bit;; cannam@86: *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") cannam@86: libsuff=32 shlibsuff=N32 libmagic=N32;; cannam@86: *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") cannam@86: libsuff=64 shlibsuff=64 libmagic=64-bit;; cannam@86: *) libsuff= shlibsuff= libmagic=never-match;; cannam@86: esac cannam@86: ;; cannam@86: esac cannam@86: shlibpath_var=LD_LIBRARY${shlibsuff}_PATH cannam@86: shlibpath_overrides_runpath=no cannam@86: sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" cannam@86: sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" cannam@86: hardcode_into_libs=yes cannam@86: ;; cannam@86: cannam@86: # No shared lib support for Linux oldld, aout, or coff. cannam@86: linux*oldld* | linux*aout* | linux*coff*) cannam@86: dynamic_linker=no cannam@86: ;; cannam@86: cannam@86: # This must be Linux ELF. cannam@86: linux*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=no cannam@86: # This implies no fast_install, which is unacceptable. cannam@86: # Some rework will be needed to allow for fast_install cannam@86: # before this can be enabled. cannam@86: hardcode_into_libs=yes cannam@86: cannam@86: # find out which ABI we are using cannam@86: libsuff= cannam@86: case "$host_cpu" in cannam@86: x86_64*|s390x*|powerpc64*) cannam@86: echo '[#]line __oline__ "configure"' > conftest.$ac_ext cannam@86: if AC_TRY_EVAL(ac_compile); then cannam@86: case `/usr/bin/file conftest.$ac_objext` in cannam@86: *64-bit*) cannam@86: libsuff=64 cannam@86: sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: rm -rf conftest* cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # Append ld.so.conf contents to the search path cannam@86: if test -f /etc/ld.so.conf; then cannam@86: lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` cannam@86: sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" cannam@86: fi cannam@86: cannam@86: # We used to test for /lib/ld.so.1 and disable shared libraries on cannam@86: # powerpc, because MkLinux only supported shared libraries with the cannam@86: # GNU dynamic linker. Since this was broken with cross compilers, cannam@86: # most powerpc-linux boxes support dynamic linking these days and cannam@86: # people can always --disable-shared, the test was removed, and we cannam@86: # assume the GNU/Linux dynamic linker is in use. cannam@86: dynamic_linker='GNU/Linux ld.so' cannam@86: ;; cannam@86: cannam@86: knetbsd*-gnu) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=no cannam@86: hardcode_into_libs=yes cannam@86: dynamic_linker='GNU ld.so' cannam@86: ;; cannam@86: cannam@86: netbsd*) cannam@86: version_type=sunos cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' cannam@86: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' cannam@86: dynamic_linker='NetBSD (a.out) ld.so' cannam@86: else cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: dynamic_linker='NetBSD ld.elf_so' cannam@86: fi cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes cannam@86: hardcode_into_libs=yes cannam@86: ;; cannam@86: cannam@86: newsos6) cannam@86: version_type=linux cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes cannam@86: ;; cannam@86: cannam@86: nto-qnx*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes cannam@86: ;; cannam@86: cannam@86: openbsd*) cannam@86: version_type=sunos cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' cannam@86: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then cannam@86: case $host_os in cannam@86: openbsd2.[[89]] | openbsd2.[[89]].*) cannam@86: shlibpath_overrides_runpath=no cannam@86: ;; cannam@86: *) cannam@86: shlibpath_overrides_runpath=yes cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: shlibpath_overrides_runpath=yes cannam@86: fi cannam@86: ;; cannam@86: cannam@86: os2*) cannam@86: libname_spec='$name' cannam@86: shrext_cmds=".dll" cannam@86: need_lib_prefix=no cannam@86: library_names_spec='$libname${shared_ext} $libname.a' cannam@86: dynamic_linker='OS/2 ld.exe' cannam@86: shlibpath_var=LIBPATH cannam@86: ;; cannam@86: cannam@86: osf3* | osf4* | osf5*) cannam@86: version_type=osf cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" cannam@86: sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" cannam@86: ;; cannam@86: cannam@86: sco3.2v5*) cannam@86: version_type=osf cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: ;; cannam@86: cannam@86: solaris*) cannam@86: version_type=linux cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes cannam@86: hardcode_into_libs=yes cannam@86: # ldd complains unless libraries are executable cannam@86: postinstall_cmds='chmod +x $lib' cannam@86: ;; cannam@86: cannam@86: sunos4*) cannam@86: version_type=sunos cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' cannam@86: finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: shlibpath_overrides_runpath=yes cannam@86: if test "$with_gnu_ld" = yes; then cannam@86: need_lib_prefix=no cannam@86: fi cannam@86: need_version=yes cannam@86: ;; cannam@86: cannam@86: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) cannam@86: version_type=linux cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: case $host_vendor in cannam@86: sni) cannam@86: shlibpath_overrides_runpath=no cannam@86: need_lib_prefix=no cannam@86: export_dynamic_flag_spec='${wl}-Blargedynsym' cannam@86: runpath_var=LD_RUN_PATH cannam@86: ;; cannam@86: siemens) cannam@86: need_lib_prefix=no cannam@86: ;; cannam@86: motorola) cannam@86: need_lib_prefix=no cannam@86: need_version=no cannam@86: shlibpath_overrides_runpath=no cannam@86: sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: sysv4*MP*) cannam@86: if test -d /usr/nec ;then cannam@86: version_type=linux cannam@86: library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' cannam@86: soname_spec='$libname${shared_ext}.$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: fi cannam@86: ;; cannam@86: cannam@86: uts4*) cannam@86: version_type=linux cannam@86: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' cannam@86: soname_spec='${libname}${release}${shared_ext}$major' cannam@86: shlibpath_var=LD_LIBRARY_PATH cannam@86: ;; cannam@86: cannam@86: *) cannam@86: dynamic_linker=no cannam@86: ;; cannam@86: esac cannam@86: AC_MSG_RESULT([$dynamic_linker]) cannam@86: test "$dynamic_linker" = no && can_build_shared=no cannam@86: ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER cannam@86: cannam@86: cannam@86: # _LT_AC_TAGCONFIG cannam@86: # ---------------- cannam@86: AC_DEFUN([_LT_AC_TAGCONFIG], cannam@86: [AC_ARG_WITH([tags], cannam@86: [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], cannam@86: [include additional configurations @<:@automatic@:>@])], cannam@86: [tagnames="$withval"]) cannam@86: cannam@86: if test -f "$ltmain" && test -n "$tagnames"; then cannam@86: if test ! -f "${ofile}"; then cannam@86: AC_MSG_WARN([output file `$ofile' does not exist]) cannam@86: fi cannam@86: cannam@86: if test -z "$LTCC"; then cannam@86: eval "`$SHELL ${ofile} --config | grep '^LTCC='`" cannam@86: if test -z "$LTCC"; then cannam@86: AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) cannam@86: else cannam@86: AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) cannam@86: fi cannam@86: fi cannam@86: cannam@86: # Extract list of available tagged configurations in $ofile. cannam@86: # Note that this assumes the entire list is on one line. cannam@86: available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` cannam@86: cannam@86: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," cannam@86: for tagname in $tagnames; do cannam@86: IFS="$lt_save_ifs" cannam@86: # Check whether tagname contains only valid characters cannam@86: case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in cannam@86: "") ;; cannam@86: *) AC_MSG_ERROR([invalid tag name: $tagname]) cannam@86: ;; cannam@86: esac cannam@86: cannam@86: if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null cannam@86: then cannam@86: AC_MSG_ERROR([tag name \"$tagname\" already exists]) cannam@86: fi cannam@86: cannam@86: # Update the list of available tags. cannam@86: if test -n "$tagname"; then cannam@86: echo appending configuration tag \"$tagname\" to $ofile cannam@86: cannam@86: case $tagname in cannam@86: CXX) cannam@86: if test -n "$CXX" && ( test "X$CXX" != "Xno" && cannam@86: ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || cannam@86: (test "X$CXX" != "Xg++"))) ; then cannam@86: AC_LIBTOOL_LANG_CXX_CONFIG cannam@86: else cannam@86: tagname="" cannam@86: fi cannam@86: ;; cannam@86: cannam@86: F77) cannam@86: if test -n "$F77" && test "X$F77" != "Xno"; then cannam@86: AC_LIBTOOL_LANG_F77_CONFIG cannam@86: else cannam@86: tagname="" cannam@86: fi cannam@86: ;; cannam@86: cannam@86: GCJ) cannam@86: if test -n "$GCJ" && test "X$GCJ" != "Xno"; then cannam@86: AC_LIBTOOL_LANG_GCJ_CONFIG cannam@86: else cannam@86: tagname="" cannam@86: fi cannam@86: ;; cannam@86: cannam@86: RC) cannam@86: AC_LIBTOOL_LANG_RC_CONFIG cannam@86: ;; cannam@86: cannam@86: *) cannam@86: AC_MSG_ERROR([Unsupported tag name: $tagname]) cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # Append the new tag name to the list of available tags. cannam@86: if test -n "$tagname" ; then cannam@86: available_tags="$available_tags $tagname" cannam@86: fi cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: cannam@86: # Now substitute the updated list of available tags. cannam@86: if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then cannam@86: mv "${ofile}T" "$ofile" cannam@86: chmod +x "$ofile" cannam@86: else cannam@86: rm -f "${ofile}T" cannam@86: AC_MSG_ERROR([unable to update list of available tagged configurations.]) cannam@86: fi cannam@86: fi cannam@86: ])# _LT_AC_TAGCONFIG cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_DLOPEN cannam@86: # ----------------- cannam@86: # enable checks for dlopen support cannam@86: AC_DEFUN([AC_LIBTOOL_DLOPEN], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) cannam@86: ])# AC_LIBTOOL_DLOPEN cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_WIN32_DLL cannam@86: # -------------------- cannam@86: # declare package support for building win32 dll's cannam@86: AC_DEFUN([AC_LIBTOOL_WIN32_DLL], cannam@86: [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) cannam@86: ])# AC_LIBTOOL_WIN32_DLL cannam@86: cannam@86: cannam@86: # AC_ENABLE_SHARED([DEFAULT]) cannam@86: # --------------------------- cannam@86: # implement the --enable-shared flag cannam@86: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. cannam@86: AC_DEFUN([AC_ENABLE_SHARED], cannam@86: [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl cannam@86: AC_ARG_ENABLE([shared], cannam@86: [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], cannam@86: [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], cannam@86: [p=${PACKAGE-default} cannam@86: case $enableval in cannam@86: yes) enable_shared=yes ;; cannam@86: no) enable_shared=no ;; cannam@86: *) cannam@86: enable_shared=no cannam@86: # Look at the argument we got. We use all the common list separators. cannam@86: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," cannam@86: for pkg in $enableval; do cannam@86: IFS="$lt_save_ifs" cannam@86: if test "X$pkg" = "X$p"; then cannam@86: enable_shared=yes cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: ;; cannam@86: esac], cannam@86: [enable_shared=]AC_ENABLE_SHARED_DEFAULT) cannam@86: ])# AC_ENABLE_SHARED cannam@86: cannam@86: cannam@86: # AC_DISABLE_SHARED cannam@86: # ----------------- cannam@86: #- set the default shared flag to --disable-shared cannam@86: AC_DEFUN([AC_DISABLE_SHARED], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: AC_ENABLE_SHARED(no) cannam@86: ])# AC_DISABLE_SHARED cannam@86: cannam@86: cannam@86: # AC_ENABLE_STATIC([DEFAULT]) cannam@86: # --------------------------- cannam@86: # implement the --enable-static flag cannam@86: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. cannam@86: AC_DEFUN([AC_ENABLE_STATIC], cannam@86: [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl cannam@86: AC_ARG_ENABLE([static], cannam@86: [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], cannam@86: [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], cannam@86: [p=${PACKAGE-default} cannam@86: case $enableval in cannam@86: yes) enable_static=yes ;; cannam@86: no) enable_static=no ;; cannam@86: *) cannam@86: enable_static=no cannam@86: # Look at the argument we got. We use all the common list separators. cannam@86: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," cannam@86: for pkg in $enableval; do cannam@86: IFS="$lt_save_ifs" cannam@86: if test "X$pkg" = "X$p"; then cannam@86: enable_static=yes cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: ;; cannam@86: esac], cannam@86: [enable_static=]AC_ENABLE_STATIC_DEFAULT) cannam@86: ])# AC_ENABLE_STATIC cannam@86: cannam@86: cannam@86: # AC_DISABLE_STATIC cannam@86: # ----------------- cannam@86: # set the default static flag to --disable-static cannam@86: AC_DEFUN([AC_DISABLE_STATIC], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: AC_ENABLE_STATIC(no) cannam@86: ])# AC_DISABLE_STATIC cannam@86: cannam@86: cannam@86: # AC_ENABLE_FAST_INSTALL([DEFAULT]) cannam@86: # --------------------------------- cannam@86: # implement the --enable-fast-install flag cannam@86: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. cannam@86: AC_DEFUN([AC_ENABLE_FAST_INSTALL], cannam@86: [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl cannam@86: AC_ARG_ENABLE([fast-install], cannam@86: [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], cannam@86: [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], cannam@86: [p=${PACKAGE-default} cannam@86: case $enableval in cannam@86: yes) enable_fast_install=yes ;; cannam@86: no) enable_fast_install=no ;; cannam@86: *) cannam@86: enable_fast_install=no cannam@86: # Look at the argument we got. We use all the common list separators. cannam@86: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," cannam@86: for pkg in $enableval; do cannam@86: IFS="$lt_save_ifs" cannam@86: if test "X$pkg" = "X$p"; then cannam@86: enable_fast_install=yes cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: ;; cannam@86: esac], cannam@86: [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) cannam@86: ])# AC_ENABLE_FAST_INSTALL cannam@86: cannam@86: cannam@86: # AC_DISABLE_FAST_INSTALL cannam@86: # ----------------------- cannam@86: # set the default to --disable-fast-install cannam@86: AC_DEFUN([AC_DISABLE_FAST_INSTALL], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: AC_ENABLE_FAST_INSTALL(no) cannam@86: ])# AC_DISABLE_FAST_INSTALL cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PICMODE([MODE]) cannam@86: # -------------------------- cannam@86: # implement the --with-pic flag cannam@86: # MODE is either `yes' or `no'. If omitted, it defaults to `both'. cannam@86: AC_DEFUN([AC_LIBTOOL_PICMODE], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: pic_mode=ifelse($#,1,$1,default) cannam@86: ])# AC_LIBTOOL_PICMODE cannam@86: cannam@86: cannam@86: # AC_PROG_EGREP cannam@86: # ------------- cannam@86: # This is predefined starting with Autoconf 2.54, so this conditional cannam@86: # definition can be removed once we require Autoconf 2.54 or later. cannam@86: m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], cannam@86: [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], cannam@86: [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 cannam@86: then ac_cv_prog_egrep='grep -E' cannam@86: else ac_cv_prog_egrep='egrep' cannam@86: fi]) cannam@86: EGREP=$ac_cv_prog_egrep cannam@86: AC_SUBST([EGREP]) cannam@86: ])]) cannam@86: cannam@86: cannam@86: # AC_PATH_TOOL_PREFIX cannam@86: # ------------------- cannam@86: # find a file program which can recognise shared library cannam@86: AC_DEFUN([AC_PATH_TOOL_PREFIX], cannam@86: [AC_REQUIRE([AC_PROG_EGREP])dnl cannam@86: AC_MSG_CHECKING([for $1]) cannam@86: AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, cannam@86: [case $MAGIC_CMD in cannam@86: [[\\/*] | ?:[\\/]*]) cannam@86: lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. cannam@86: ;; cannam@86: *) cannam@86: lt_save_MAGIC_CMD="$MAGIC_CMD" cannam@86: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR cannam@86: dnl $ac_dummy forces splitting on constant user-supplied paths. cannam@86: dnl POSIX.2 word splitting is done only on the output of word expansions, cannam@86: dnl not every word. This closes a longstanding sh security hole. cannam@86: ac_dummy="ifelse([$2], , $PATH, [$2])" cannam@86: for ac_dir in $ac_dummy; do cannam@86: IFS="$lt_save_ifs" cannam@86: test -z "$ac_dir" && ac_dir=. cannam@86: if test -f $ac_dir/$1; then cannam@86: lt_cv_path_MAGIC_CMD="$ac_dir/$1" cannam@86: if test -n "$file_magic_test_file"; then cannam@86: case $deplibs_check_method in cannam@86: "file_magic "*) cannam@86: file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" cannam@86: MAGIC_CMD="$lt_cv_path_MAGIC_CMD" cannam@86: if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | cannam@86: $EGREP "$file_magic_regex" > /dev/null; then cannam@86: : cannam@86: else cannam@86: cat <&2 cannam@86: cannam@86: *** Warning: the command libtool uses to detect shared libraries, cannam@86: *** $file_magic_cmd, produces output that libtool cannot recognize. cannam@86: *** The result is that libtool may fail to recognize shared libraries cannam@86: *** as such. This will affect the creation of libtool libraries that cannam@86: *** depend on shared libraries, but programs linked with such libtool cannam@86: *** libraries will work regardless of this problem. Nevertheless, you cannam@86: *** may want to report the problem to your system manager and/or to cannam@86: *** bug-libtool@gnu.org cannam@86: cannam@86: EOF cannam@86: fi ;; cannam@86: esac cannam@86: fi cannam@86: break cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: MAGIC_CMD="$lt_save_MAGIC_CMD" cannam@86: ;; cannam@86: esac]) cannam@86: MAGIC_CMD="$lt_cv_path_MAGIC_CMD" cannam@86: if test -n "$MAGIC_CMD"; then cannam@86: AC_MSG_RESULT($MAGIC_CMD) cannam@86: else cannam@86: AC_MSG_RESULT(no) cannam@86: fi cannam@86: ])# AC_PATH_TOOL_PREFIX cannam@86: cannam@86: cannam@86: # AC_PATH_MAGIC cannam@86: # ------------- cannam@86: # find a file program which can recognise a shared library cannam@86: AC_DEFUN([AC_PATH_MAGIC], cannam@86: [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) cannam@86: if test -z "$lt_cv_path_MAGIC_CMD"; then cannam@86: if test -n "$ac_tool_prefix"; then cannam@86: AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) cannam@86: else cannam@86: MAGIC_CMD=: cannam@86: fi cannam@86: fi cannam@86: ])# AC_PATH_MAGIC cannam@86: cannam@86: cannam@86: # AC_PROG_LD cannam@86: # ---------- cannam@86: # find the pathname to the GNU or non-GNU linker cannam@86: AC_DEFUN([AC_PROG_LD], cannam@86: [AC_ARG_WITH([gnu-ld], cannam@86: [AC_HELP_STRING([--with-gnu-ld], cannam@86: [assume the C compiler uses GNU ld @<:@default=no@:>@])], cannam@86: [test "$withval" = no || with_gnu_ld=yes], cannam@86: [with_gnu_ld=no]) cannam@86: AC_REQUIRE([LT_AC_PROG_SED])dnl cannam@86: AC_REQUIRE([AC_PROG_CC])dnl cannam@86: AC_REQUIRE([AC_CANONICAL_HOST])dnl cannam@86: AC_REQUIRE([AC_CANONICAL_BUILD])dnl cannam@86: ac_prog=ld cannam@86: if test "$GCC" = yes; then cannam@86: # Check if gcc -print-prog-name=ld gives a path. cannam@86: AC_MSG_CHECKING([for ld used by $CC]) cannam@86: case $host in cannam@86: *-*-mingw*) cannam@86: # gcc leaves a trailing carriage return which upsets mingw cannam@86: ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; cannam@86: *) cannam@86: ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; cannam@86: esac cannam@86: case $ac_prog in cannam@86: # Accept absolute paths. cannam@86: [[\\/]]* | ?:[[\\/]]*) cannam@86: re_direlt='/[[^/]][[^/]]*/\.\./' cannam@86: # Canonicalize the pathname of ld cannam@86: ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` cannam@86: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do cannam@86: ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` cannam@86: done cannam@86: test -z "$LD" && LD="$ac_prog" cannam@86: ;; cannam@86: "") cannam@86: # If it fails, then pretend we aren't using GCC. cannam@86: ac_prog=ld cannam@86: ;; cannam@86: *) cannam@86: # If it is relative, then search for the first ld in PATH. cannam@86: with_gnu_ld=unknown cannam@86: ;; cannam@86: esac cannam@86: elif test "$with_gnu_ld" = yes; then cannam@86: AC_MSG_CHECKING([for GNU ld]) cannam@86: else cannam@86: AC_MSG_CHECKING([for non-GNU ld]) cannam@86: fi cannam@86: AC_CACHE_VAL(lt_cv_path_LD, cannam@86: [if test -z "$LD"; then cannam@86: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR cannam@86: for ac_dir in $PATH; do cannam@86: IFS="$lt_save_ifs" cannam@86: test -z "$ac_dir" && ac_dir=. cannam@86: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then cannam@86: lt_cv_path_LD="$ac_dir/$ac_prog" cannam@86: # Check to see if the program is GNU ld. I'd rather use --version, cannam@86: # but apparently some GNU ld's only accept -v. cannam@86: # Break only if it was the GNU/non-GNU ld that we prefer. cannam@86: case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then cannam@86: case $host_cpu in cannam@86: i*86 ) cannam@86: # Not sure whether the presence of OpenBSD here was a mistake. cannam@86: # Let's accept both of them until this is cleared up. cannam@86: lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' cannam@86: lt_cv_file_magic_cmd=/usr/bin/file cannam@86: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: fi cannam@86: ;; cannam@86: cannam@86: gnu*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: hpux10.20* | hpux11*) cannam@86: lt_cv_file_magic_cmd=/usr/bin/file cannam@86: case "$host_cpu" in cannam@86: ia64*) cannam@86: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' cannam@86: lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so cannam@86: ;; cannam@86: hppa*64*) cannam@86: [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] cannam@86: lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl cannam@86: ;; cannam@86: *) cannam@86: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' cannam@86: lt_cv_file_magic_test_file=/usr/lib/libc.sl cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: irix5* | irix6* | nonstopux*) cannam@86: case $LD in cannam@86: *-32|*"-32 ") libmagic=32-bit;; cannam@86: *-n32|*"-n32 ") libmagic=N32;; cannam@86: *-64|*"-64 ") libmagic=64-bit;; cannam@86: *) libmagic=never-match;; cannam@86: esac cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: # This must be Linux ELF. cannam@86: linux*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: netbsd*) cannam@86: if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then cannam@86: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' cannam@86: else cannam@86: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: newos6*) cannam@86: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' cannam@86: lt_cv_file_magic_cmd=/usr/bin/file cannam@86: lt_cv_file_magic_test_file=/usr/lib/libnls.so cannam@86: ;; cannam@86: cannam@86: nto-qnx*) cannam@86: lt_cv_deplibs_check_method=unknown cannam@86: ;; cannam@86: cannam@86: openbsd*) cannam@86: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then cannam@86: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' cannam@86: else cannam@86: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: osf3* | osf4* | osf5*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: sco3.2v5*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: solaris*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: cannam@86: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) cannam@86: case $host_vendor in cannam@86: motorola) cannam@86: 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]]' cannam@86: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` cannam@86: ;; cannam@86: ncr) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: sequent) cannam@86: lt_cv_file_magic_cmd='/bin/file' cannam@86: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' cannam@86: ;; cannam@86: sni) cannam@86: lt_cv_file_magic_cmd='/bin/file' cannam@86: lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" cannam@86: lt_cv_file_magic_test_file=/lib/libc.so cannam@86: ;; cannam@86: siemens) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) cannam@86: lt_cv_deplibs_check_method=pass_all cannam@86: ;; cannam@86: esac cannam@86: ]) cannam@86: file_magic_cmd=$lt_cv_file_magic_cmd cannam@86: deplibs_check_method=$lt_cv_deplibs_check_method cannam@86: test -z "$deplibs_check_method" && deplibs_check_method=unknown cannam@86: ])# AC_DEPLIBS_CHECK_METHOD cannam@86: cannam@86: cannam@86: # AC_PROG_NM cannam@86: # ---------- cannam@86: # find the pathname to a BSD-compatible name lister cannam@86: AC_DEFUN([AC_PROG_NM], cannam@86: [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, cannam@86: [if test -n "$NM"; then cannam@86: # Let the user override the test. cannam@86: lt_cv_path_NM="$NM" cannam@86: else cannam@86: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR cannam@86: for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do cannam@86: IFS="$lt_save_ifs" cannam@86: test -z "$ac_dir" && ac_dir=. cannam@86: tmp_nm="$ac_dir/${ac_tool_prefix}nm" cannam@86: if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then cannam@86: # Check to see if the nm accepts a BSD-compat flag. cannam@86: # Adding the `sed 1q' prevents false positives on HP-UX, which says: cannam@86: # nm: unknown option "B" ignored cannam@86: # Tru64's nm complains that /dev/null is an invalid object file cannam@86: case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in cannam@86: */dev/null* | *'Invalid file or object type'*) cannam@86: lt_cv_path_NM="$tmp_nm -B" cannam@86: break cannam@86: ;; cannam@86: *) cannam@86: case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in cannam@86: */dev/null*) cannam@86: lt_cv_path_NM="$tmp_nm -p" cannam@86: break cannam@86: ;; cannam@86: *) cannam@86: lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but cannam@86: continue # so that we can try to find one that supports BSD flags cannam@86: ;; cannam@86: esac cannam@86: esac cannam@86: fi cannam@86: done cannam@86: IFS="$lt_save_ifs" cannam@86: test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm cannam@86: fi]) cannam@86: NM="$lt_cv_path_NM" cannam@86: ])# AC_PROG_NM cannam@86: cannam@86: cannam@86: # AC_CHECK_LIBM cannam@86: # ------------- cannam@86: # check for math library cannam@86: AC_DEFUN([AC_CHECK_LIBM], cannam@86: [AC_REQUIRE([AC_CANONICAL_HOST])dnl cannam@86: LIBM= cannam@86: case $host in cannam@86: *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) cannam@86: # These system don't have libm, or don't need it cannam@86: ;; cannam@86: *-ncr-sysv4.3*) cannam@86: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") cannam@86: AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") cannam@86: ;; cannam@86: *) cannam@86: AC_CHECK_LIB(m, cos, LIBM="-lm") cannam@86: ;; cannam@86: esac cannam@86: ])# AC_CHECK_LIBM cannam@86: cannam@86: cannam@86: # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) cannam@86: # ----------------------------------- cannam@86: # sets LIBLTDL to the link flags for the libltdl convenience library and cannam@86: # LTDLINCL to the include flags for the libltdl header and adds cannam@86: # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL cannam@86: # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If cannam@86: # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will cannam@86: # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with cannam@86: # '${top_srcdir}/' (note the single quotes!). If your package is not cannam@86: # flat and you're not using automake, define top_builddir and cannam@86: # top_srcdir appropriately in the Makefiles. cannam@86: AC_DEFUN([AC_LIBLTDL_CONVENIENCE], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: case $enable_ltdl_convenience in cannam@86: no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; cannam@86: "") enable_ltdl_convenience=yes cannam@86: ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; cannam@86: esac cannam@86: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la cannam@86: LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) cannam@86: # For backwards non-gettext consistent compatibility... cannam@86: INCLTDL="$LTDLINCL" cannam@86: ])# AC_LIBLTDL_CONVENIENCE cannam@86: cannam@86: cannam@86: # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) cannam@86: # ----------------------------------- cannam@86: # sets LIBLTDL to the link flags for the libltdl installable library and cannam@86: # LTDLINCL to the include flags for the libltdl header and adds cannam@86: # --enable-ltdl-install to the configure arguments. Note that LIBLTDL cannam@86: # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If cannam@86: # DIRECTORY is not provided and an installed libltdl is not found, it is cannam@86: # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' cannam@86: # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single cannam@86: # quotes!). If your package is not flat and you're not using automake, cannam@86: # define top_builddir and top_srcdir appropriately in the Makefiles. cannam@86: # In the future, this macro may have to be called after AC_PROG_LIBTOOL. cannam@86: AC_DEFUN([AC_LIBLTDL_INSTALLABLE], cannam@86: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl cannam@86: AC_CHECK_LIB(ltdl, lt_dlinit, cannam@86: [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], cannam@86: [if test x"$enable_ltdl_install" = xno; then cannam@86: AC_MSG_WARN([libltdl not installed, but installation disabled]) cannam@86: else cannam@86: enable_ltdl_install=yes cannam@86: fi cannam@86: ]) cannam@86: if test x"$enable_ltdl_install" = x"yes"; then cannam@86: ac_configure_args="$ac_configure_args --enable-ltdl-install" cannam@86: LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la cannam@86: LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) cannam@86: else cannam@86: ac_configure_args="$ac_configure_args --enable-ltdl-install=no" cannam@86: LIBLTDL="-lltdl" cannam@86: LTDLINCL= cannam@86: fi cannam@86: # For backwards non-gettext consistent compatibility... cannam@86: INCLTDL="$LTDLINCL" cannam@86: ])# AC_LIBLTDL_INSTALLABLE cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_CXX cannam@86: # -------------- cannam@86: # enable support for C++ libraries cannam@86: AC_DEFUN([AC_LIBTOOL_CXX], cannam@86: [AC_REQUIRE([_LT_AC_LANG_CXX]) cannam@86: ])# AC_LIBTOOL_CXX cannam@86: cannam@86: cannam@86: # _LT_AC_LANG_CXX cannam@86: # --------------- cannam@86: AC_DEFUN([_LT_AC_LANG_CXX], cannam@86: [AC_REQUIRE([AC_PROG_CXX]) cannam@86: AC_REQUIRE([_LT_AC_PROG_CXXCPP]) cannam@86: _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) cannam@86: ])# _LT_AC_LANG_CXX cannam@86: cannam@86: # _LT_AC_PROG_CXXCPP cannam@86: # --------------- cannam@86: AC_DEFUN([_LT_AC_PROG_CXXCPP], cannam@86: [ cannam@86: AC_REQUIRE([AC_PROG_CXX]) cannam@86: if test -n "$CXX" && ( test "X$CXX" != "Xno" && cannam@86: ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || cannam@86: (test "X$CXX" != "Xg++"))) ; then cannam@86: AC_PROG_CXXCPP cannam@86: fi cannam@86: ])# _LT_AC_PROG_CXXCPP cannam@86: cannam@86: # AC_LIBTOOL_F77 cannam@86: # -------------- cannam@86: # enable support for Fortran 77 libraries cannam@86: AC_DEFUN([AC_LIBTOOL_F77], cannam@86: [AC_REQUIRE([_LT_AC_LANG_F77]) cannam@86: ])# AC_LIBTOOL_F77 cannam@86: cannam@86: cannam@86: # _LT_AC_LANG_F77 cannam@86: # --------------- cannam@86: AC_DEFUN([_LT_AC_LANG_F77], cannam@86: [AC_REQUIRE([AC_PROG_F77]) cannam@86: _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) cannam@86: ])# _LT_AC_LANG_F77 cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_GCJ cannam@86: # -------------- cannam@86: # enable support for GCJ libraries cannam@86: AC_DEFUN([AC_LIBTOOL_GCJ], cannam@86: [AC_REQUIRE([_LT_AC_LANG_GCJ]) cannam@86: ])# AC_LIBTOOL_GCJ cannam@86: cannam@86: cannam@86: # _LT_AC_LANG_GCJ cannam@86: # --------------- cannam@86: AC_DEFUN([_LT_AC_LANG_GCJ], cannam@86: [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], cannam@86: [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], cannam@86: [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], cannam@86: [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], cannam@86: [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], cannam@86: [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) cannam@86: _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) cannam@86: ])# _LT_AC_LANG_GCJ cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_RC cannam@86: # -------------- cannam@86: # enable support for Windows resource files cannam@86: AC_DEFUN([AC_LIBTOOL_RC], cannam@86: [AC_REQUIRE([LT_AC_PROG_RC]) cannam@86: _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) cannam@86: ])# AC_LIBTOOL_RC cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_LANG_C_CONFIG cannam@86: # ------------------------ cannam@86: # Ensure that the configuration vars for the C compiler are cannam@86: # suitably defined. Those variables are subsequently used by cannam@86: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. cannam@86: AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) cannam@86: AC_DEFUN([_LT_AC_LANG_C_CONFIG], cannam@86: [lt_save_CC="$CC" cannam@86: AC_LANG_PUSH(C) cannam@86: cannam@86: # Source file extension for C test sources. cannam@86: ac_ext=c cannam@86: cannam@86: # Object file extension for compiled C test sources. cannam@86: objext=o cannam@86: _LT_AC_TAGVAR(objext, $1)=$objext cannam@86: cannam@86: # Code to be used in simple compile tests cannam@86: lt_simple_compile_test_code="int some_variable = 0;\n" cannam@86: cannam@86: # Code to be used in simple link tests cannam@86: lt_simple_link_test_code='int main(){return(0);}\n' cannam@86: cannam@86: _LT_AC_SYS_COMPILER cannam@86: cannam@86: # save warnings/boilerplate of simple test code cannam@86: _LT_COMPILER_BOILERPLATE cannam@86: _LT_LINKER_BOILERPLATE cannam@86: cannam@86: # cannam@86: # Check for any special shared library compilation flags. cannam@86: # cannam@86: _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= cannam@86: if test "$GCC" = no; then cannam@86: case $host_os in cannam@86: sco3.2v5*) cannam@86: _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then cannam@86: AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) cannam@86: if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : cannam@86: else cannam@86: AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) cannam@86: _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no cannam@86: fi cannam@86: fi cannam@86: cannam@86: cannam@86: # cannam@86: # Check to make sure the static flag actually works. cannam@86: # cannam@86: AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), cannam@86: $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), cannam@86: [], cannam@86: [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) cannam@86: cannam@86: cannam@86: AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) cannam@86: AC_LIBTOOL_PROG_COMPILER_PIC($1) cannam@86: AC_LIBTOOL_PROG_CC_C_O($1) cannam@86: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) cannam@86: AC_LIBTOOL_PROG_LD_SHLIBS($1) cannam@86: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) cannam@86: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) cannam@86: AC_LIBTOOL_SYS_LIB_STRIP cannam@86: AC_LIBTOOL_DLOPEN_SELF($1) cannam@86: cannam@86: # Report which librarie types wil actually be built cannam@86: AC_MSG_CHECKING([if libtool supports shared libraries]) cannam@86: AC_MSG_RESULT([$can_build_shared]) cannam@86: cannam@86: AC_MSG_CHECKING([whether to build shared libraries]) cannam@86: test "$can_build_shared" = "no" && enable_shared=no cannam@86: cannam@86: # On AIX, shared libraries and static libraries use the same namespace, and cannam@86: # are all built from PIC. cannam@86: case "$host_os" in cannam@86: aix3*) cannam@86: test "$enable_shared" = yes && enable_static=no cannam@86: if test -n "$RANLIB"; then cannam@86: archive_cmds="$archive_cmds~\$RANLIB \$lib" cannam@86: postinstall_cmds='$RANLIB $lib' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: aix4* | aix5*) cannam@86: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then cannam@86: test "$enable_shared" = yes && enable_static=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: AC_MSG_RESULT([$enable_shared]) cannam@86: cannam@86: AC_MSG_CHECKING([whether to build static libraries]) cannam@86: # Make sure either enable_shared or enable_static is yes. cannam@86: test "$enable_shared" = yes || enable_static=yes cannam@86: AC_MSG_RESULT([$enable_static]) cannam@86: cannam@86: AC_LIBTOOL_CONFIG($1) cannam@86: cannam@86: AC_LANG_POP cannam@86: CC="$lt_save_CC" cannam@86: ])# AC_LIBTOOL_LANG_C_CONFIG cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_LANG_CXX_CONFIG cannam@86: # -------------------------- cannam@86: # Ensure that the configuration vars for the C compiler are cannam@86: # suitably defined. Those variables are subsequently used by cannam@86: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. cannam@86: AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) cannam@86: AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], cannam@86: [AC_LANG_PUSH(C++) cannam@86: AC_REQUIRE([AC_PROG_CXX]) cannam@86: AC_REQUIRE([_LT_AC_PROG_CXXCPP]) cannam@86: cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)= cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=no cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)= cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_automatic, $1)=no cannam@86: _LT_AC_TAGVAR(module_cmds, $1)= cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)= cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)= cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no cannam@86: cannam@86: # Dependencies to place before and after the object being linked: cannam@86: _LT_AC_TAGVAR(predep_objects, $1)= cannam@86: _LT_AC_TAGVAR(postdep_objects, $1)= cannam@86: _LT_AC_TAGVAR(predeps, $1)= cannam@86: _LT_AC_TAGVAR(postdeps, $1)= cannam@86: _LT_AC_TAGVAR(compiler_lib_search_path, $1)= cannam@86: cannam@86: # Source file extension for C++ test sources. cannam@86: ac_ext=cc cannam@86: cannam@86: # Object file extension for compiled C++ test sources. cannam@86: objext=o cannam@86: _LT_AC_TAGVAR(objext, $1)=$objext cannam@86: cannam@86: # Code to be used in simple compile tests cannam@86: lt_simple_compile_test_code="int some_variable = 0;\n" cannam@86: cannam@86: # Code to be used in simple link tests cannam@86: lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' cannam@86: cannam@86: # ltmain only uses $CC for tagged configurations so make sure $CC is set. cannam@86: _LT_AC_SYS_COMPILER cannam@86: cannam@86: # save warnings/boilerplate of simple test code cannam@86: _LT_COMPILER_BOILERPLATE cannam@86: _LT_LINKER_BOILERPLATE cannam@86: cannam@86: # Allow CC to be a program name with arguments. cannam@86: lt_save_CC=$CC cannam@86: lt_save_LD=$LD cannam@86: lt_save_GCC=$GCC cannam@86: GCC=$GXX cannam@86: lt_save_with_gnu_ld=$with_gnu_ld cannam@86: lt_save_path_LD=$lt_cv_path_LD cannam@86: if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then cannam@86: lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx cannam@86: else cannam@86: unset lt_cv_prog_gnu_ld cannam@86: fi cannam@86: if test -n "${lt_cv_path_LDCXX+set}"; then cannam@86: lt_cv_path_LD=$lt_cv_path_LDCXX cannam@86: else cannam@86: unset lt_cv_path_LD cannam@86: fi cannam@86: test -z "${LDCXX+set}" || LD=$LDCXX cannam@86: CC=${CXX-"c++"} cannam@86: compiler=$CC cannam@86: _LT_AC_TAGVAR(compiler, $1)=$CC cannam@86: _LT_CC_BASENAME([$compiler]) cannam@86: cannam@86: # We don't want -fno-exception wen compiling C++ code, so set the cannam@86: # no_builtin_flag separately cannam@86: if test "$GXX" = yes; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' cannam@86: else cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= cannam@86: fi cannam@86: cannam@86: if test "$GXX" = yes; then cannam@86: # Set up default GNU C++ configuration cannam@86: cannam@86: AC_PROG_LD cannam@86: cannam@86: # Check if GNU C++ uses GNU ld as the underlying linker, since the cannam@86: # archiving commands below assume that GNU ld is being used. cannam@86: if test "$with_gnu_ld" = yes; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' cannam@86: cannam@86: # If archive_cmds runs LD, not CC, wlarc should be empty cannam@86: # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to cannam@86: # investigate it a little bit more. (MM) cannam@86: wlarc='${wl}' cannam@86: cannam@86: # ancient GNU ld didn't support --whole-archive et. al. cannam@86: if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ cannam@86: grep 'no-whole-archive' > /dev/null; then cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' cannam@86: else cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: fi cannam@86: else cannam@86: with_gnu_ld=no cannam@86: wlarc= cannam@86: cannam@86: # A generic and very simple default shared library creation cannam@86: # command for GNU C++ for the case where it uses the native cannam@86: # linker, instead of GNU ld. If possible, this setting should cannam@86: # overridden to take advantage of the native linker features on cannam@86: # the platform it is being used on. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' cannam@86: fi cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' cannam@86: cannam@86: else cannam@86: GXX=no cannam@86: with_gnu_ld=no cannam@86: wlarc= cannam@86: fi cannam@86: cannam@86: # PORTME: fill in a description of your system's C++ link characteristics cannam@86: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=yes cannam@86: case $host_os in cannam@86: aix3*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: aix4* | aix5*) cannam@86: if test "$host_cpu" = ia64; then cannam@86: # On IA64, the linker does run time linking by default, so we don't cannam@86: # have to do anything special. cannam@86: aix_use_runtimelinking=no cannam@86: exp_sym_flag='-Bexport' cannam@86: no_entry_flag="" cannam@86: else cannam@86: aix_use_runtimelinking=no cannam@86: cannam@86: # Test if we are trying to use run time linking or normal cannam@86: # AIX style linking. If -brtl is somewhere in LDFLAGS, we cannam@86: # need to do runtime linking. cannam@86: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) cannam@86: for ld_flag in $LDFLAGS; do cannam@86: case $ld_flag in cannam@86: *-brtl*) cannam@86: aix_use_runtimelinking=yes cannam@86: break cannam@86: ;; cannam@86: esac cannam@86: done cannam@86: esac cannam@86: cannam@86: exp_sym_flag='-bexport' cannam@86: no_entry_flag='-bnoentry' cannam@86: fi cannam@86: cannam@86: # When large executables or shared objects are built, AIX ld can cannam@86: # have problems creating the table of contents. If linking a library cannam@86: # or program results in "error TOC overflow" add -mminimal-toc to cannam@86: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not cannam@86: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. cannam@86: cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: cannam@86: if test "$GXX" = yes; then cannam@86: case $host_os in aix4.[[012]]|aix4.[[012]].*) cannam@86: # We only want to do this on AIX 4.2 and lower, the check cannam@86: # below for broken collect2 doesn't work under 4.3+ cannam@86: collect2name=`${CC} -print-prog-name=collect2` cannam@86: if test -f "$collect2name" && \ cannam@86: strings "$collect2name" | grep resolve_lib_name >/dev/null cannam@86: then cannam@86: # We have reworked collect2 cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: else cannam@86: # We have old collect2 cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported cannam@86: # It fails to find uninstalled libraries when the uninstalled cannam@86: # path is not listed in the libpath. Setting hardcode_minus_L cannam@86: # to unsupported forces relinking cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= cannam@86: fi cannam@86: esac cannam@86: shared_flag='-shared' cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: shared_flag="$shared_flag "'${wl}-G' cannam@86: fi cannam@86: else cannam@86: # not using gcc cannam@86: if test "$host_cpu" = ia64; then cannam@86: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release cannam@86: # chokes on -Wl,-G. The following line is correct: cannam@86: shared_flag='-G' cannam@86: else cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: shared_flag='${wl}-G' cannam@86: else cannam@86: shared_flag='${wl}-bM:SRE' cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: cannam@86: # It seems that -bexpall does not export symbols beginning with cannam@86: # underscore (_), so it is better to generate a list of symbols to export. cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=yes cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: # Warning - without using the other runtime loading flags (-brtl), cannam@86: # -berok will link without error, but may produce a broken library. cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' cannam@86: # Determine the default libpath from the value encoded in an empty executable. cannam@86: _LT_AC_SYS_LIBPATH_AIX cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" cannam@86: cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" cannam@86: else cannam@86: if test "$host_cpu" = ia64; then cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" cannam@86: else cannam@86: # Determine the default libpath from the value encoded in an empty executable. cannam@86: _LT_AC_SYS_LIBPATH_AIX cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" cannam@86: # Warning - without using the other run time loading flags, cannam@86: # -berok will link without error, but may produce a broken library. cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' cannam@86: # -bexpall does not export symbols beginning with underscore (_) cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=yes cannam@86: # Exported symbols can be pulled into shared objects from archives cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes cannam@86: # This is similar to how AIX traditionally builds it's shared libraries. cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' cannam@86: fi cannam@86: fi cannam@86: ;; cannam@86: chorus*) cannam@86: case $cc_basename in cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: cannam@86: cygwin* | mingw* | pw32*) cannam@86: # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, cannam@86: # as there is no search path for DLLs. cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=no cannam@86: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes cannam@86: cannam@86: if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' cannam@86: # If the export-symbols file already is a .def file (1st line cannam@86: # is EXPORTS), use it as is; otherwise, prepend... cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cannam@86: cp $export_symbols $output_objdir/$soname.def; cannam@86: else cannam@86: echo EXPORTS > $output_objdir/$soname.def; cannam@86: cat $export_symbols >> $output_objdir/$soname.def; cannam@86: fi~ cannam@86: $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: darwin* | rhapsody*) cannam@86: case "$host_os" in cannam@86: rhapsody* | darwin1.[[012]]) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' cannam@86: ;; cannam@86: *) # Darwin 1.3 on cannam@86: if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' cannam@86: else cannam@86: case ${MACOSX_DEPLOYMENT_TARGET} in cannam@86: 10.[[012]]) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' cannam@86: ;; cannam@86: 10.*) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_automatic, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: cannam@86: if test "$GXX" = yes ; then cannam@86: lt_int_apple_cc_single_mod=no cannam@86: output_verbose_link_cmd='echo' cannam@86: if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then cannam@86: lt_int_apple_cc_single_mod=yes cannam@86: fi cannam@86: if test "X$lt_int_apple_cc_single_mod" = Xyes ; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' cannam@86: fi cannam@86: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' cannam@86: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's cannam@86: if test "X$lt_int_apple_cc_single_mod" = Xyes ; then cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: fi cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: else cannam@86: case $cc_basename in cannam@86: xlc*) cannam@86: output_verbose_link_cmd='echo' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' cannam@86: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' cannam@86: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: cannam@86: dgux*) cannam@86: case $cc_basename in cannam@86: ec++*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: ghcx*) cannam@86: # Green Hills C++ Compiler cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: freebsd[[12]]*) cannam@86: # C++ shared libraries reported to be fairly broken before switch to ELF cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: freebsd-elf*) cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: ;; cannam@86: freebsd* | kfreebsd*-gnu | dragonfly*) cannam@86: # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF cannam@86: # conventions cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=yes cannam@86: ;; cannam@86: gnu*) cannam@86: ;; cannam@86: hpux9*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, cannam@86: # but as the default cannam@86: # location of the library. cannam@86: cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: aCC*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: ;; cannam@86: *) cannam@86: if test "$GXX" = yes; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' cannam@86: else cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: hpux10*|hpux11*) cannam@86: if test $with_gnu_ld = no; then cannam@86: case "$host_cpu" in cannam@86: hppa*64*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: ;; cannam@86: ia64*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: case "$host_cpu" in cannam@86: hppa*64*) cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: ia64*) cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, cannam@86: # but as the default cannam@86: # location of the library. cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, cannam@86: # but as the default cannam@86: # location of the library. cannam@86: ;; cannam@86: esac cannam@86: cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: aCC*) cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' cannam@86: ;; cannam@86: esac cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: ;; cannam@86: *) cannam@86: if test "$GXX" = yes; then cannam@86: if test $with_gnu_ld = no; then cannam@86: case "$host_cpu" in cannam@86: ia64*|hppa*64*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: else cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: irix5* | irix6*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # SGI C++ cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' cannam@86: cannam@86: # Archives containing C++ object files must be created using cannam@86: # "CC -ar", where "CC" is the IRIX C++ compiler. This is cannam@86: # necessary to make sure instantiated templates are included cannam@86: # in the archive. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' cannam@86: ;; cannam@86: *) cannam@86: if test "$GXX" = yes; then cannam@86: if test "$with_gnu_ld" = no; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' cannam@86: fi cannam@86: fi cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: ;; cannam@86: linux*) cannam@86: case $cc_basename in cannam@86: KCC*) cannam@86: # Kuck and Associates, Inc. (KAI) C++ Compiler cannam@86: cannam@86: # KCC will only create a shared library if the output file cannam@86: # ends with ".so" (or ".sl" for HP-UX), so rename the library cannam@86: # to its proper name (with version) after linking. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' cannam@86: cannam@86: # Archives containing C++ object files must be created using cannam@86: # "CC -Bstatic", where "CC" is the KAI C++ compiler. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' cannam@86: ;; cannam@86: icpc*) cannam@86: # Intel C++ cannam@86: with_gnu_ld=yes cannam@86: # version 8.0 and above of icpc choke on multiply defined symbols cannam@86: # if we add $predep_objects and $postdep_objects, however 7.1 and cannam@86: # earlier do not add the objects themselves. cannam@86: case `$CC -V 2>&1` in cannam@86: *"Version 7."*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: ;; cannam@86: *) # Version 8.0 or newer cannam@86: tmp_idyn= cannam@86: case $host_cpu in cannam@86: ia64*) tmp_idyn=' -i_dynamic';; cannam@86: esac cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' cannam@86: ;; cannam@86: pgCC*) cannam@86: # Portland Group C++ compiler cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' cannam@86: ;; cannam@86: cxx*) cannam@86: # Compaq C++ cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' cannam@86: cannam@86: runpath_var=LD_RUN_PATH cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: lynxos*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: m88k*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: mvs*) cannam@86: case $cc_basename in cannam@86: cxx*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: netbsd*) cannam@86: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' cannam@86: wlarc= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: fi cannam@86: # Workaround some broken pre-1.5 toolchains cannam@86: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' cannam@86: ;; cannam@86: openbsd2*) cannam@86: # C++ shared libraries are fairly broken cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: openbsd*) cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' cannam@86: fi cannam@86: output_verbose_link_cmd='echo' cannam@86: ;; cannam@86: osf3*) cannam@86: case $cc_basename in cannam@86: KCC*) cannam@86: # Kuck and Associates, Inc. (KAI) C++ Compiler cannam@86: cannam@86: # KCC will only create a shared library if the output file cannam@86: # ends with ".so" (or ".sl" for HP-UX), so rename the library cannam@86: # to its proper name (with version) after linking. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Archives containing C++ object files must be created using cannam@86: # "CC -Bstatic", where "CC" is the KAI C++ compiler. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' cannam@86: cannam@86: ;; cannam@86: RCC*) cannam@86: # Rational C++ 2.4.1 cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: cxx*) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: ;; cannam@86: *) cannam@86: if test "$GXX" = yes && test "$with_gnu_ld" = no; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' cannam@86: cannam@86: else cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: osf4* | osf5*) cannam@86: case $cc_basename in cannam@86: KCC*) cannam@86: # Kuck and Associates, Inc. (KAI) C++ Compiler cannam@86: cannam@86: # KCC will only create a shared library if the output file cannam@86: # ends with ".so" (or ".sl" for HP-UX), so rename the library cannam@86: # to its proper name (with version) after linking. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Archives containing C++ object files must be created using cannam@86: # the KAI C++ compiler. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' cannam@86: ;; cannam@86: RCC*) cannam@86: # Rational C++ 2.4.1 cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: cxx*) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ cannam@86: echo "-hidden">> $lib.exp~ cannam@86: $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ cannam@86: $rm $lib.exp' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: ;; cannam@86: *) cannam@86: if test "$GXX" = yes && test "$with_gnu_ld" = no; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' cannam@86: cannam@86: else cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: psos*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: sco*) cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: sunos4*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # Sun C++ 4.x cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: lcc*) cannam@86: # Lucid cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: solaris*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # Sun C++ 4.2, 5.x and Centerline C++ cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: case $host_os in cannam@86: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; cannam@86: *) cannam@86: # The C++ compiler is used as linker so we must use $wl cannam@86: # flag to pass the commands to the underlying system cannam@86: # linker. We must also pass each convience library through cannam@86: # to the system linker between allextract/defaultextract. cannam@86: # The C++ compiler will combine linker options so we cannam@86: # cannot just pass the convience library names through cannam@86: # without $wl. cannam@86: # Supported since Solaris 2.6 (maybe 2.5.1?) cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' cannam@86: ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: # cannam@86: # There doesn't appear to be a way to prevent this compiler from cannam@86: # explicitly linking system object files so we need to strip them cannam@86: # from the output so that they don't get included in the library cannam@86: # dependencies. cannam@86: output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' cannam@86: cannam@86: # Archives containing C++ object files must be created using cannam@86: # "CC -xar", where "CC" is the Sun C++ compiler. This is cannam@86: # necessary to make sure instantiated templates are included cannam@86: # in the archive. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' cannam@86: ;; cannam@86: gcx*) cannam@86: # Green Hills C++ Compiler cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' cannam@86: cannam@86: # The C++ compiler must be used to create the archive. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' cannam@86: ;; cannam@86: *) cannam@86: # GNU C++ compiler with Solaris linker cannam@86: if test "$GXX" = yes && test "$with_gnu_ld" = no; then cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' cannam@86: if $CC --version | grep -v '^2\.7' > /dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" cannam@86: else cannam@86: # g++ 2.7 appears to require `-G' NOT `-shared' on this cannam@86: # platform. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' cannam@86: cannam@86: # Commands to make compiler produce verbose output that lists cannam@86: # what "hidden" libraries, object files and flags are used when cannam@86: # linking a shared library. cannam@86: output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" cannam@86: fi cannam@86: cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: ;; cannam@86: tandem*) cannam@86: case $cc_basename in cannam@86: NCC*) cannam@86: # NonStop-UX NCC 3.20 cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: vxworks*) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: *) cannam@86: # FIXME: insert proper C++ library support cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) cannam@86: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no cannam@86: cannam@86: _LT_AC_TAGVAR(GCC, $1)="$GXX" cannam@86: _LT_AC_TAGVAR(LD, $1)="$LD" cannam@86: cannam@86: AC_LIBTOOL_POSTDEP_PREDEP($1) cannam@86: AC_LIBTOOL_PROG_COMPILER_PIC($1) cannam@86: AC_LIBTOOL_PROG_CC_C_O($1) cannam@86: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) cannam@86: AC_LIBTOOL_PROG_LD_SHLIBS($1) cannam@86: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) cannam@86: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) cannam@86: AC_LIBTOOL_SYS_LIB_STRIP cannam@86: AC_LIBTOOL_DLOPEN_SELF($1) cannam@86: cannam@86: AC_LIBTOOL_CONFIG($1) cannam@86: cannam@86: AC_LANG_POP cannam@86: CC=$lt_save_CC cannam@86: LDCXX=$LD cannam@86: LD=$lt_save_LD cannam@86: GCC=$lt_save_GCC cannam@86: with_gnu_ldcxx=$with_gnu_ld cannam@86: with_gnu_ld=$lt_save_with_gnu_ld cannam@86: lt_cv_path_LDCXX=$lt_cv_path_LD cannam@86: lt_cv_path_LD=$lt_save_path_LD cannam@86: lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld cannam@86: lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld cannam@86: ])# AC_LIBTOOL_LANG_CXX_CONFIG cannam@86: cannam@86: # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) cannam@86: # ------------------------ cannam@86: # Figure out "hidden" library dependencies from verbose cannam@86: # compiler output when linking a shared library. cannam@86: # Parse the compiler output and extract the necessary cannam@86: # objects, libraries and library flags. cannam@86: AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ cannam@86: dnl we can't use the lt_simple_compile_test_code here, cannam@86: dnl because it contains code intended for an executable, cannam@86: dnl not a library. It's possible we should let each cannam@86: dnl tag define a new lt_????_link_test_code variable, cannam@86: dnl but it's only used here... cannam@86: ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" cannam@86: ifelse([$1], [], cannam@86: [#! $SHELL cannam@86: cannam@86: # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. cannam@86: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) cannam@86: # NOTE: Changes made to this file will be lost: look at ltmain.sh. cannam@86: # cannam@86: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 cannam@86: # Free Software Foundation, Inc. cannam@86: # cannam@86: # This file is part of GNU Libtool: cannam@86: # Originally by Gordon Matzigkeit , 1996 cannam@86: # cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2 of the License, or cannam@86: # (at your option) any later version. cannam@86: # cannam@86: # This program is distributed in the hope that it will be useful, but cannam@86: # WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU cannam@86: # General Public License for more details. cannam@86: # cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. cannam@86: # cannam@86: # As a special exception to the GNU General Public License, if you cannam@86: # distribute this file as part of a program that contains a cannam@86: # configuration script generated by Autoconf, you may include it under cannam@86: # the same distribution terms that you use for the rest of that program. cannam@86: cannam@86: # A sed program that does not truncate output. cannam@86: SED=$lt_SED cannam@86: cannam@86: # Sed that helps us avoid accidentally triggering echo(1) options like -n. cannam@86: Xsed="$SED -e 1s/^X//" cannam@86: cannam@86: # The HP-UX ksh and POSIX shell print the target directory to stdout cannam@86: # if CDPATH is set. cannam@86: (unset CDPATH) >/dev/null 2>&1 && unset CDPATH cannam@86: cannam@86: # The names of the tagged configurations supported by this script. cannam@86: available_tags= cannam@86: cannam@86: # ### BEGIN LIBTOOL CONFIG], cannam@86: [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) cannam@86: cannam@86: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: cannam@86: cannam@86: # Shell to use when invoking shell scripts. cannam@86: SHELL=$lt_SHELL cannam@86: cannam@86: # Whether or not to build shared libraries. cannam@86: build_libtool_libs=$enable_shared cannam@86: cannam@86: # Whether or not to build static libraries. cannam@86: build_old_libs=$enable_static cannam@86: cannam@86: # Whether or not to add -lc for building shared libraries. cannam@86: build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) cannam@86: cannam@86: # Whether or not to disallow shared libs when runtime libs are static cannam@86: allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) cannam@86: cannam@86: # Whether or not to optimize for fast installation. cannam@86: fast_install=$enable_fast_install cannam@86: cannam@86: # The host system. cannam@86: host_alias=$host_alias cannam@86: host=$host cannam@86: host_os=$host_os cannam@86: cannam@86: # The build system. cannam@86: build_alias=$build_alias cannam@86: build=$build cannam@86: build_os=$build_os cannam@86: cannam@86: # An echo program that does not interpret backslashes. cannam@86: echo=$lt_echo cannam@86: cannam@86: # The archiver. cannam@86: AR=$lt_AR cannam@86: AR_FLAGS=$lt_AR_FLAGS cannam@86: cannam@86: # A C compiler. cannam@86: LTCC=$lt_LTCC cannam@86: cannam@86: # A language-specific compiler. cannam@86: CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) cannam@86: cannam@86: # Is the compiler the GNU C compiler? cannam@86: with_gcc=$_LT_AC_TAGVAR(GCC, $1) cannam@86: cannam@86: # An ERE matcher. cannam@86: EGREP=$lt_EGREP cannam@86: cannam@86: # The linker used to build libraries. cannam@86: LD=$lt_[]_LT_AC_TAGVAR(LD, $1) cannam@86: cannam@86: # Whether we need hard or soft links. cannam@86: LN_S=$lt_LN_S cannam@86: cannam@86: # A BSD-compatible nm program. cannam@86: NM=$lt_NM cannam@86: cannam@86: # A symbol stripping program cannam@86: STRIP=$lt_STRIP cannam@86: cannam@86: # Used to examine libraries when file_magic_cmd begins "file" cannam@86: MAGIC_CMD=$MAGIC_CMD cannam@86: cannam@86: # Used on cygwin: DLL creation program. cannam@86: DLLTOOL="$DLLTOOL" cannam@86: cannam@86: # Used on cygwin: object dumper. cannam@86: OBJDUMP="$OBJDUMP" cannam@86: cannam@86: # Used on cygwin: assembler. cannam@86: AS="$AS" cannam@86: cannam@86: # The name of the directory that contains temporary libtool files. cannam@86: objdir=$objdir cannam@86: cannam@86: # How to create reloadable object files. cannam@86: reload_flag=$lt_reload_flag cannam@86: reload_cmds=$lt_reload_cmds cannam@86: cannam@86: # How to pass a linker flag through the compiler. cannam@86: wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) cannam@86: cannam@86: # Object file suffix (normally "o"). cannam@86: objext="$ac_objext" cannam@86: cannam@86: # Old archive suffix (normally "a"). cannam@86: libext="$libext" cannam@86: cannam@86: # Shared library suffix (normally ".so"). cannam@86: shrext_cmds='$shrext_cmds' cannam@86: cannam@86: # Executable file suffix (normally ""). cannam@86: exeext="$exeext" cannam@86: cannam@86: # Additional compiler flags for building library objects. cannam@86: pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) cannam@86: pic_mode=$pic_mode cannam@86: cannam@86: # What is the maximum length of a command? cannam@86: max_cmd_len=$lt_cv_sys_max_cmd_len cannam@86: cannam@86: # Does compiler simultaneously support -c and -o options? cannam@86: compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) cannam@86: cannam@86: # Must we lock files when doing compilation? cannam@86: need_locks=$lt_need_locks cannam@86: cannam@86: # Do we need the lib prefix for modules? cannam@86: need_lib_prefix=$need_lib_prefix cannam@86: cannam@86: # Do we need a version for libraries? cannam@86: need_version=$need_version cannam@86: cannam@86: # Whether dlopen is supported. cannam@86: dlopen_support=$enable_dlopen cannam@86: cannam@86: # Whether dlopen of programs is supported. cannam@86: dlopen_self=$enable_dlopen_self cannam@86: cannam@86: # Whether dlopen of statically linked programs is supported. cannam@86: dlopen_self_static=$enable_dlopen_self_static cannam@86: cannam@86: # Compiler flag to prevent dynamic linking. cannam@86: link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) cannam@86: cannam@86: # Compiler flag to turn off builtin functions. cannam@86: no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) cannam@86: cannam@86: # Compiler flag to allow reflexive dlopens. cannam@86: export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) cannam@86: cannam@86: # Compiler flag to generate shared objects directly from archives. cannam@86: whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) cannam@86: cannam@86: # Compiler flag to generate thread-safe objects. cannam@86: thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) cannam@86: cannam@86: # Library versioning type. cannam@86: version_type=$version_type cannam@86: cannam@86: # Format of library name prefix. cannam@86: libname_spec=$lt_libname_spec cannam@86: cannam@86: # List of archive names. First name is the real one, the rest are links. cannam@86: # The last name is the one that the linker finds with -lNAME. cannam@86: library_names_spec=$lt_library_names_spec cannam@86: cannam@86: # The coded name of the library, if different from the real name. cannam@86: soname_spec=$lt_soname_spec cannam@86: cannam@86: # Commands used to build and install an old-style archive. cannam@86: RANLIB=$lt_RANLIB cannam@86: old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) cannam@86: old_postinstall_cmds=$lt_old_postinstall_cmds cannam@86: old_postuninstall_cmds=$lt_old_postuninstall_cmds cannam@86: cannam@86: # Create an old-style archive from a shared archive. cannam@86: old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) cannam@86: cannam@86: # Create a temporary old-style archive to link instead of a shared archive. cannam@86: old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) cannam@86: cannam@86: # Commands used to build and install a shared archive. cannam@86: archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) cannam@86: archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) cannam@86: postinstall_cmds=$lt_postinstall_cmds cannam@86: postuninstall_cmds=$lt_postuninstall_cmds cannam@86: cannam@86: # Commands used to build a loadable module (assumed same as above if empty) cannam@86: module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) cannam@86: module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) cannam@86: cannam@86: # Commands to strip libraries. cannam@86: old_striplib=$lt_old_striplib cannam@86: striplib=$lt_striplib cannam@86: cannam@86: # Dependencies to place before the objects being linked to create a cannam@86: # shared library. cannam@86: predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) cannam@86: cannam@86: # Dependencies to place after the objects being linked to create a cannam@86: # shared library. cannam@86: postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) cannam@86: cannam@86: # Dependencies to place before the objects being linked to create a cannam@86: # shared library. cannam@86: predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) cannam@86: cannam@86: # Dependencies to place after the objects being linked to create a cannam@86: # shared library. cannam@86: postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) cannam@86: cannam@86: # The library search path used internally by the compiler when linking cannam@86: # a shared library. cannam@86: compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) cannam@86: cannam@86: # Method to check whether dependent libraries are shared objects. cannam@86: deplibs_check_method=$lt_deplibs_check_method cannam@86: cannam@86: # Command to use when deplibs_check_method == file_magic. cannam@86: file_magic_cmd=$lt_file_magic_cmd cannam@86: cannam@86: # Flag that allows shared libraries with undefined symbols to be built. cannam@86: allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) cannam@86: cannam@86: # Flag that forces no undefined symbols. cannam@86: no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) cannam@86: cannam@86: # Commands used to finish a libtool library installation in a directory. cannam@86: finish_cmds=$lt_finish_cmds cannam@86: cannam@86: # Same as above, but a single script fragment to be evaled but not shown. cannam@86: finish_eval=$lt_finish_eval cannam@86: cannam@86: # Take the output of nm and produce a listing of raw symbols and C names. cannam@86: global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe cannam@86: cannam@86: # Transform the output of nm in a proper C declaration cannam@86: global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl cannam@86: cannam@86: # Transform the output of nm in a C name address pair cannam@86: global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address cannam@86: cannam@86: # This is the shared library runtime path variable. cannam@86: runpath_var=$runpath_var cannam@86: cannam@86: # This is the shared library path variable. cannam@86: shlibpath_var=$shlibpath_var cannam@86: cannam@86: # Is shlibpath searched before the hard-coded library search path? cannam@86: shlibpath_overrides_runpath=$shlibpath_overrides_runpath cannam@86: cannam@86: # How to hardcode a shared library path into an executable. cannam@86: hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) cannam@86: cannam@86: # Whether we should hardcode library paths into libraries. cannam@86: hardcode_into_libs=$hardcode_into_libs cannam@86: cannam@86: # Flag to hardcode \$libdir into a binary during linking. cannam@86: # This must work even if \$libdir does not exist. cannam@86: hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) cannam@86: cannam@86: # If ld is used when linking, flag to hardcode \$libdir into cannam@86: # a binary during linking. This must work even if \$libdir does cannam@86: # not exist. cannam@86: hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) cannam@86: cannam@86: # Whether we need a single -rpath flag with a separated argument. cannam@86: hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) cannam@86: cannam@86: # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the cannam@86: # resulting binary. cannam@86: hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) cannam@86: cannam@86: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the cannam@86: # resulting binary. cannam@86: hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) cannam@86: cannam@86: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into cannam@86: # the resulting binary. cannam@86: hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) cannam@86: cannam@86: # Set to yes if building a shared library automatically hardcodes DIR into the library cannam@86: # and all subsequent libraries and executables linked against it. cannam@86: hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) cannam@86: cannam@86: # Variables whose values should be saved in libtool wrapper scripts and cannam@86: # restored at relink time. cannam@86: variables_saved_for_relink="$variables_saved_for_relink" cannam@86: cannam@86: # Whether libtool must link a program against all its dependency libraries. cannam@86: link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) cannam@86: cannam@86: # Compile-time system search path for libraries cannam@86: sys_lib_search_path_spec=$lt_sys_lib_search_path_spec cannam@86: cannam@86: # Run-time system search path for libraries cannam@86: sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec cannam@86: cannam@86: # Fix the shell variable \$srcfile for the compiler. cannam@86: fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" cannam@86: cannam@86: # Set to yes if exported symbols are required. cannam@86: always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) cannam@86: cannam@86: # The commands to list exported symbols. cannam@86: export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) cannam@86: cannam@86: # The commands to extract the exported symbol list from a shared archive. cannam@86: extract_expsyms_cmds=$lt_extract_expsyms_cmds cannam@86: cannam@86: # Symbols that should not be listed in the preloaded symbols. cannam@86: exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) cannam@86: cannam@86: # Symbols that must always be exported. cannam@86: include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) cannam@86: cannam@86: ifelse([$1],[], cannam@86: [# ### END LIBTOOL CONFIG], cannam@86: [# ### END LIBTOOL TAG CONFIG: $tagname]) cannam@86: cannam@86: __EOF__ cannam@86: cannam@86: ifelse([$1],[], [ cannam@86: case $host_os in cannam@86: aix3*) cannam@86: cat <<\EOF >> "$cfgfile" cannam@86: cannam@86: # AIX sometimes has problems with the GCC collect2 program. For some cannam@86: # reason, if we set the COLLECT_NAMES environment variable, the problems cannam@86: # vanish in a puff of smoke. cannam@86: if test "X${COLLECT_NAMES+set}" != Xset; then cannam@86: COLLECT_NAMES= cannam@86: export COLLECT_NAMES cannam@86: fi cannam@86: EOF cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # We use sed instead of cat because bash on DJGPP gets confused if cannam@86: # if finds mixed CR/LF and LF-only lines. Since sed operates in cannam@86: # text mode, it properly converts lines to CR/LF. This bash problem cannam@86: # is reportedly fixed, but why not run on old versions too? cannam@86: sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) cannam@86: cannam@86: mv -f "$cfgfile" "$ofile" || \ cannam@86: (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") cannam@86: chmod +x "$ofile" cannam@86: ]) cannam@86: else cannam@86: # If there is no Makefile yet, we rely on a make rule to execute cannam@86: # `config.status --recheck' to rerun these tests and create the cannam@86: # libtool script then. cannam@86: ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` cannam@86: if test -f "$ltmain_in"; then cannam@86: test -f Makefile && make "$ltmain" cannam@86: fi cannam@86: fi cannam@86: ])# AC_LIBTOOL_CONFIG cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) cannam@86: # ------------------------------------------- cannam@86: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], cannam@86: [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl cannam@86: cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= cannam@86: cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' cannam@86: cannam@86: AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], cannam@86: lt_cv_prog_compiler_rtti_exceptions, cannam@86: [-fno-rtti -fno-exceptions], [], cannam@86: [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) cannam@86: fi cannam@86: ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE cannam@86: # --------------------------------- cannam@86: AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], cannam@86: [AC_REQUIRE([AC_CANONICAL_HOST]) cannam@86: AC_REQUIRE([AC_PROG_NM]) cannam@86: AC_REQUIRE([AC_OBJEXT]) cannam@86: # Check for command to grab the raw symbol name followed by C symbol from nm. cannam@86: AC_MSG_CHECKING([command to parse $NM output from $compiler object]) cannam@86: AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], cannam@86: [ cannam@86: # These are sane defaults that work on at least a few old systems. cannam@86: # [They come from Ultrix. What could be older than Ultrix?!! ;)] cannam@86: cannam@86: # Character class describing NM global symbol codes. cannam@86: symcode='[[BCDEGRST]]' cannam@86: cannam@86: # Regexp to match symbols that can be accessed directly from C. cannam@86: sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' cannam@86: cannam@86: # Transform an extracted symbol line into a proper C declaration cannam@86: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" cannam@86: cannam@86: # Transform an extracted symbol line into symbol name and symbol address cannam@86: lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" cannam@86: cannam@86: # Define system-specific variables. cannam@86: case $host_os in cannam@86: aix*) cannam@86: symcode='[[BCDT]]' cannam@86: ;; cannam@86: cygwin* | mingw* | pw32*) cannam@86: symcode='[[ABCDGISTW]]' cannam@86: ;; cannam@86: hpux*) # Its linker distinguishes data from code symbols cannam@86: if test "$host_cpu" = ia64; then cannam@86: symcode='[[ABCDEGRST]]' cannam@86: fi cannam@86: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" cannam@86: lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" cannam@86: ;; cannam@86: linux*) cannam@86: if test "$host_cpu" = ia64; then cannam@86: symcode='[[ABCDGIRSTW]]' cannam@86: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" cannam@86: lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" cannam@86: fi cannam@86: ;; cannam@86: irix* | nonstopux*) cannam@86: symcode='[[BCDEGRST]]' cannam@86: ;; cannam@86: osf*) cannam@86: symcode='[[BCDEGQRST]]' cannam@86: ;; cannam@86: solaris* | sysv5*) cannam@86: symcode='[[BDRT]]' cannam@86: ;; cannam@86: sysv4) cannam@86: symcode='[[DFNSTU]]' cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # Handle CRLF in mingw tool chain cannam@86: opt_cr= cannam@86: case $build_os in cannam@86: mingw*) cannam@86: opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp cannam@86: ;; cannam@86: esac cannam@86: cannam@86: # If we're using GNU nm, then use its standard symbol codes. cannam@86: case `$NM -V 2>&1` in cannam@86: *GNU* | *'with BFD'*) cannam@86: symcode='[[ABCDGIRSTW]]' ;; cannam@86: esac cannam@86: cannam@86: # Try without a prefix undercore, then with it. cannam@86: for ac_symprfx in "" "_"; do cannam@86: cannam@86: # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. cannam@86: symxfrm="\\1 $ac_symprfx\\2 \\2" cannam@86: cannam@86: # Write the raw and C identifiers. cannam@86: lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" cannam@86: cannam@86: # Check to see that the pipe works correctly. cannam@86: pipe_works=no cannam@86: cannam@86: rm -f conftest* cannam@86: cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then cannam@86: # Try sorting and uniquifying the output. cannam@86: if sort "$nlist" | uniq > "$nlist"T; then cannam@86: mv -f "$nlist"T "$nlist" cannam@86: else cannam@86: rm -f "$nlist"T cannam@86: fi cannam@86: cannam@86: # Make sure that we snagged all the symbols we need. cannam@86: if grep ' nm_test_var$' "$nlist" >/dev/null; then cannam@86: if grep ' nm_test_func$' "$nlist" >/dev/null; then cannam@86: cat < conftest.$ac_ext cannam@86: #ifdef __cplusplus cannam@86: extern "C" { cannam@86: #endif cannam@86: cannam@86: EOF cannam@86: # Now generate the symbol file. cannam@86: eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cannam@86: cannam@86: cat <> conftest.$ac_ext cannam@86: #if defined (__STDC__) && __STDC__ cannam@86: # define lt_ptr_t void * cannam@86: #else cannam@86: # define lt_ptr_t char * cannam@86: # define const cannam@86: #endif cannam@86: cannam@86: /* The mapping between symbol names and symbols. */ cannam@86: const struct { cannam@86: const char *name; cannam@86: lt_ptr_t address; cannam@86: } cannam@86: lt_preloaded_symbols[[]] = cannam@86: { cannam@86: EOF cannam@86: $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cannam@86: cat <<\EOF >> conftest.$ac_ext cannam@86: {0, (lt_ptr_t) 0} cannam@86: }; cannam@86: cannam@86: #ifdef __cplusplus cannam@86: } cannam@86: #endif cannam@86: EOF cannam@86: # Now try linking the two files. cannam@86: mv conftest.$ac_objext conftstm.$ac_objext cannam@86: lt_save_LIBS="$LIBS" cannam@86: lt_save_CFLAGS="$CFLAGS" cannam@86: LIBS="conftstm.$ac_objext" cannam@86: CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" cannam@86: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then cannam@86: pipe_works=yes cannam@86: fi cannam@86: LIBS="$lt_save_LIBS" cannam@86: CFLAGS="$lt_save_CFLAGS" cannam@86: else cannam@86: echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD cannam@86: fi cannam@86: else cannam@86: echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD cannam@86: fi cannam@86: else cannam@86: echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD cannam@86: fi cannam@86: else cannam@86: echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cannam@86: cat conftest.$ac_ext >&5 cannam@86: fi cannam@86: rm -f conftest* conftst* cannam@86: cannam@86: # Do not use the global_symbol_pipe unless it works. cannam@86: if test "$pipe_works" = yes; then cannam@86: break cannam@86: else cannam@86: lt_cv_sys_global_symbol_pipe= cannam@86: fi cannam@86: done cannam@86: ]) cannam@86: if test -z "$lt_cv_sys_global_symbol_pipe"; then cannam@86: lt_cv_sys_global_symbol_to_cdecl= cannam@86: fi cannam@86: if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then cannam@86: AC_MSG_RESULT(failed) cannam@86: else cannam@86: AC_MSG_RESULT(ok) cannam@86: fi cannam@86: ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) cannam@86: # --------------------------------------- cannam@86: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], cannam@86: [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= cannam@86: cannam@86: AC_MSG_CHECKING([for $compiler option to produce PIC]) cannam@86: ifelse([$1],[CXX],[ cannam@86: # C++ specific cases for pic, static, wl, etc. cannam@86: if test "$GXX" = yes; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: cannam@86: case $host_os in cannam@86: aix*) cannam@86: # All AIX code is PIC. cannam@86: if test "$host_cpu" = ia64; then cannam@86: # AIX 5 now supports IA64 processor cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: fi cannam@86: ;; cannam@86: amigaos*) cannam@86: # FIXME: we need at least 68020 code to build shared libraries, but cannam@86: # adding the `-m68020' flag to GCC prevents building anything better, cannam@86: # like `-m68040'. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' cannam@86: ;; cannam@86: beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) cannam@86: # PIC is the default for these OSes. cannam@86: ;; cannam@86: mingw* | os2* | pw32*) cannam@86: # This hack is so that the source file can tell whether it is being cannam@86: # built for inclusion in a dll (and should export symbols for example). cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' cannam@86: ;; cannam@86: darwin* | rhapsody*) cannam@86: # PIC is the default on this platform cannam@86: # Common symbols not allowed in MH_DYLIB files cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' cannam@86: ;; cannam@86: *djgpp*) cannam@86: # DJGPP does not support shared libraries at all cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: ;; cannam@86: sysv4*MP*) cannam@86: if test -d /usr/nec; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic cannam@86: fi cannam@86: ;; cannam@86: hpux*) cannam@86: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but cannam@86: # not for PA HP-UX. cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: case $host_os in cannam@86: aix4* | aix5*) cannam@86: # All AIX code is PIC. cannam@86: if test "$host_cpu" = ia64; then cannam@86: # AIX 5 now supports IA64 processor cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: else cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' cannam@86: fi cannam@86: ;; cannam@86: chorus*) cannam@86: case $cc_basename in cannam@86: cxch68*) cannam@86: # Green Hills C++ Compiler cannam@86: # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: darwin*) cannam@86: # PIC is the default on this platform cannam@86: # Common symbols not allowed in MH_DYLIB files cannam@86: case $cc_basename in cannam@86: xlc*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: dgux*) cannam@86: case $cc_basename in cannam@86: ec++*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: ;; cannam@86: ghcx*) cannam@86: # Green Hills C++ Compiler cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: freebsd* | kfreebsd*-gnu | dragonfly*) cannam@86: # FreeBSD uses GNU C++ cannam@86: ;; cannam@86: hpux9* | hpux10* | hpux11*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" cannam@86: if test "$host_cpu" != ia64; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' cannam@86: fi cannam@86: ;; cannam@86: aCC*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: # +Z the default cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: irix5* | irix6* | nonstopux*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: # CC pic flag -KPIC is the default. cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: linux*) cannam@86: case $cc_basename in cannam@86: KCC*) cannam@86: # KAI C++ Compiler cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: icpc* | ecpc*) cannam@86: # Intel C++ cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: ;; cannam@86: pgCC*) cannam@86: # Portland Group C++ compiler. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: ;; cannam@86: cxx*) cannam@86: # Compaq C++ cannam@86: # Make sure the PIC flag is empty. It appears that all Alpha cannam@86: # Linux and Compaq Tru64 Unix objects are PIC. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: lynxos*) cannam@86: ;; cannam@86: m88k*) cannam@86: ;; cannam@86: mvs*) cannam@86: case $cc_basename in cannam@86: cxx*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: netbsd*) cannam@86: ;; cannam@86: osf3* | osf4* | osf5*) cannam@86: case $cc_basename in cannam@86: KCC*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' cannam@86: ;; cannam@86: RCC*) cannam@86: # Rational C++ 2.4.1 cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' cannam@86: ;; cannam@86: cxx*) cannam@86: # Digital/Compaq C++ cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: # Make sure the PIC flag is empty. It appears that all Alpha cannam@86: # Linux and Compaq Tru64 Unix objects are PIC. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: psos*) cannam@86: ;; cannam@86: sco*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: solaris*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # Sun C++ 4.2, 5.x and Centerline C++ cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' cannam@86: ;; cannam@86: gcx*) cannam@86: # Green Hills C++ Compiler cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: sunos4*) cannam@86: case $cc_basename in cannam@86: CC*) cannam@86: # Sun C++ 4.x cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: ;; cannam@86: lcc*) cannam@86: # Lucid cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: tandem*) cannam@86: case $cc_basename in cannam@86: NCC*) cannam@86: # NonStop-UX NCC 3.20 cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: ;; cannam@86: *) cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: unixware*) cannam@86: ;; cannam@86: vxworks*) cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ], cannam@86: [ cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: cannam@86: case $host_os in cannam@86: aix*) cannam@86: # All AIX code is PIC. cannam@86: if test "$host_cpu" = ia64; then cannam@86: # AIX 5 now supports IA64 processor cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: amigaos*) cannam@86: # FIXME: we need at least 68020 code to build shared libraries, but cannam@86: # adding the `-m68020' flag to GCC prevents building anything better, cannam@86: # like `-m68040'. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' cannam@86: ;; cannam@86: cannam@86: beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) cannam@86: # PIC is the default for these OSes. cannam@86: ;; cannam@86: cannam@86: mingw* | pw32* | os2*) cannam@86: # This hack is so that the source file can tell whether it is being cannam@86: # built for inclusion in a dll (and should export symbols for example). cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' cannam@86: ;; cannam@86: cannam@86: darwin* | rhapsody*) cannam@86: # PIC is the default on this platform cannam@86: # Common symbols not allowed in MH_DYLIB files cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' cannam@86: ;; cannam@86: cannam@86: msdosdjgpp*) cannam@86: # Just because we use GCC doesn't mean we suddenly get shared libraries cannam@86: # on systems that don't support them. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no cannam@86: enable_shared=no cannam@86: ;; cannam@86: cannam@86: sysv4*MP*) cannam@86: if test -d /usr/nec; then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic cannam@86: fi cannam@86: ;; cannam@86: cannam@86: hpux*) cannam@86: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but cannam@86: # not for PA HP-UX. cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: # +Z the default cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: # PORTME Check for flag to pass linker flags through the system compiler. cannam@86: case $host_os in cannam@86: aix*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: if test "$host_cpu" = ia64; then cannam@86: # AIX 5 now supports IA64 processor cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: else cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' cannam@86: fi cannam@86: ;; cannam@86: darwin*) cannam@86: # PIC is the default on this platform cannam@86: # Common symbols not allowed in MH_DYLIB files cannam@86: case $cc_basename in cannam@86: xlc*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: mingw* | pw32* | os2*) cannam@86: # This hack is so that the source file can tell whether it is being cannam@86: # built for inclusion in a dll (and should export symbols for example). cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' cannam@86: ;; cannam@86: cannam@86: hpux9* | hpux10* | hpux11*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but cannam@86: # not for PA HP-UX. cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: # +Z the default cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' cannam@86: ;; cannam@86: esac cannam@86: # Is there a better lt_prog_compiler_static that works with the bundled CC? cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' cannam@86: ;; cannam@86: cannam@86: irix5* | irix6* | nonstopux*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: # PIC (with -KPIC) is the default. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: ;; cannam@86: cannam@86: newsos6) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: ;; cannam@86: cannam@86: linux*) cannam@86: case $cc_basename in cannam@86: icc* | ecc*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: ;; cannam@86: pgcc* | pgf77* | pgf90*) cannam@86: # Portland Group compilers (*not* the Pentium gcc compiler, cannam@86: # which looks to be a dead project) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' cannam@86: ;; cannam@86: ccc*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: # All Alpha code is PIC. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: ;; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: osf3* | osf4* | osf5*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: # All OSF/1 code is PIC. cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' cannam@86: ;; cannam@86: cannam@86: sco3.2v5*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' cannam@86: ;; cannam@86: cannam@86: solaris*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: case $cc_basename in cannam@86: f77* | f90* | f95*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; cannam@86: esac cannam@86: ;; cannam@86: cannam@86: sunos4*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: ;; cannam@86: cannam@86: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: ;; cannam@86: cannam@86: sysv4*MP*) cannam@86: if test -d /usr/nec ;then cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: unicos*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no cannam@86: ;; cannam@86: cannam@86: uts4*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' cannam@86: ;; cannam@86: cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ]) cannam@86: AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) cannam@86: cannam@86: # cannam@86: # Check to make sure the PIC flag actually works. cannam@86: # cannam@86: if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then cannam@86: AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), cannam@86: [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], cannam@86: [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in cannam@86: "" | " "*) ;; cannam@86: *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; cannam@86: esac], cannam@86: [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) cannam@86: fi cannam@86: case "$host_os" in cannam@86: # For platforms which do not support PIC, -DPIC is meaningless: cannam@86: *djgpp*) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" cannam@86: ;; cannam@86: esac cannam@86: ]) cannam@86: cannam@86: cannam@86: # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) cannam@86: # ------------------------------------ cannam@86: # See if the linker supports building shared libraries. cannam@86: AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], cannam@86: [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) cannam@86: ifelse([$1],[CXX],[ cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' cannam@86: case $host_os in cannam@86: aix4* | aix5*) cannam@86: # If we're using GNU nm, then we don't want the "-C" option. cannam@86: # -C means demangle to AIX nm, but means don't demangle with GNU nm cannam@86: if $NM -V 2>&1 | grep 'GNU' > /dev/null; then cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' cannam@86: else cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' cannam@86: fi cannam@86: ;; cannam@86: pw32*) cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" cannam@86: ;; cannam@86: cygwin* | mingw*) cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' cannam@86: ;; cannam@86: esac cannam@86: ],[ cannam@86: runpath_var= cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)= cannam@86: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)= cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)= cannam@86: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= cannam@86: _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown cannam@86: _LT_AC_TAGVAR(hardcode_automatic, $1)=no cannam@86: _LT_AC_TAGVAR(module_cmds, $1)= cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)= cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=no cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' cannam@86: # include_expsyms should be a list of space-separated symbols to be *always* cannam@86: # included in the symbol list cannam@86: _LT_AC_TAGVAR(include_expsyms, $1)= cannam@86: # exclude_expsyms can be an extended regexp of symbols to exclude cannam@86: # it will be wrapped by ` (' and `)$', so one must not match beginning or cannam@86: # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', cannam@86: # as well as any symbol that contains `d'. cannam@86: _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" cannam@86: # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out cannam@86: # platforms (ab)use it in PIC code, but their linkers get confused if cannam@86: # the symbol is explicitly referenced. Since portable code cannot cannam@86: # rely on this symbol name, it's probably fine to never include it in cannam@86: # preloaded symbol tables. cannam@86: extract_expsyms_cmds= cannam@86: # Just being paranoid about ensuring that cc_basename is set. cannam@86: _LT_CC_BASENAME([$compiler]) cannam@86: case $host_os in cannam@86: cygwin* | mingw* | pw32*) cannam@86: # FIXME: the MSVC++ port hasn't been tested in a loooong time cannam@86: # When not using gcc, we currently assume that we are using cannam@86: # Microsoft Visual C++. cannam@86: if test "$GCC" != yes; then cannam@86: with_gnu_ld=no cannam@86: fi cannam@86: ;; cannam@86: openbsd*) cannam@86: with_gnu_ld=no cannam@86: ;; cannam@86: esac cannam@86: cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=yes cannam@86: if test "$with_gnu_ld" = yes; then cannam@86: # If archive_cmds runs LD, not CC, wlarc should be empty cannam@86: wlarc='${wl}' cannam@86: cannam@86: # Set some defaults for GNU ld with shared library support. These cannam@86: # are reset later if shared libraries are not supported. Putting them cannam@86: # here allows them to be overridden if necessary. cannam@86: runpath_var=LD_RUN_PATH cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' cannam@86: # ancient GNU ld didn't support --whole-archive et. al. cannam@86: if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' cannam@86: else cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: fi cannam@86: supports_anon_versioning=no cannam@86: case `$LD -v 2>/dev/null` in cannam@86: *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 cannam@86: *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... cannam@86: *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... cannam@86: *\ 2.11.*) ;; # other 2.11 versions cannam@86: *) supports_anon_versioning=yes ;; cannam@86: esac cannam@86: cannam@86: # See if GNU ld supports shared libraries. cannam@86: case $host_os in cannam@86: aix3* | aix4* | aix5*) cannam@86: # On AIX/PPC, the GNU linker is very broken cannam@86: if test "$host_cpu" != ia64; then cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: cat <&2 cannam@86: cannam@86: *** Warning: the GNU linker, at least up to release 2.9.1, is reported cannam@86: *** to be unable to reliably create shared libraries on AIX. cannam@86: *** Therefore, libtool is disabling shared libraries support. If you cannam@86: *** really care for shared libraries, you may want to modify your PATH cannam@86: *** so that a non-GNU linker is found, and then restart. cannam@86: cannam@86: EOF cannam@86: fi cannam@86: ;; cannam@86: cannam@86: amigaos*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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)' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: cannam@86: # Samuel A. Falvo II reports cannam@86: # that the semantics of dynamic libraries on AmigaOS, at least up cannam@86: # to version 4, is to share data among multiple programs linked cannam@86: # with the same dynamic library. Since this doesn't match the cannam@86: # behavior of shared libraries on other platforms, we can't use cannam@86: # them. cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: cannam@86: beos*) cannam@86: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: # Joseph Beckenbach says some releases of gcc cannam@86: # support --undefined. This deserves some investigation. FIXME cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: cannam@86: cygwin* | mingw* | pw32*) cannam@86: # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, cannam@86: # as there is no search path for DLLs. cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=no cannam@86: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' cannam@86: cannam@86: if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' cannam@86: # If the export-symbols file already is a .def file (1st line cannam@86: # is EXPORTS), use it as is; otherwise, prepend... cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cannam@86: cp $export_symbols $output_objdir/$soname.def; cannam@86: else cannam@86: echo EXPORTS > $output_objdir/$soname.def; cannam@86: cat $export_symbols >> $output_objdir/$soname.def; cannam@86: fi~ cannam@86: $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: cannam@86: linux*) cannam@86: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then cannam@86: tmp_addflag= cannam@86: case $cc_basename,$host_cpu in cannam@86: pgcc*) # Portland Group C compiler cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: ;; cannam@86: pgf77* | pgf90* ) # Portland Group f77 and f90 compilers cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: tmp_addflag=' -fpic -Mnomain' ;; cannam@86: ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 cannam@86: tmp_addflag=' -i_dynamic' ;; cannam@86: efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 cannam@86: tmp_addflag=' -i_dynamic -nofor_main' ;; cannam@86: ifc* | ifort*) # Intel Fortran compiler cannam@86: tmp_addflag=' -nofor_main' ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: cannam@86: if test $supports_anon_versioning = yes; then cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cannam@86: cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ cannam@86: $echo "local: *; };" >> $output_objdir/$libname.ver~ cannam@86: $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' cannam@86: fi cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: cannam@86: netbsd*) cannam@86: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' cannam@86: wlarc= cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: fi cannam@86: ;; cannam@86: cannam@86: solaris* | sysv5*) cannam@86: if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: cat <&2 cannam@86: cannam@86: *** Warning: The releases 2.8.* of the GNU linker cannot reliably cannam@86: *** create shared libraries on Solaris systems. Therefore, libtool cannam@86: *** is disabling shared libraries support. We urge you to upgrade GNU cannam@86: *** binutils to release 2.9.1 or newer. Another option is to modify cannam@86: *** your PATH or compiler configuration so that the native linker is cannam@86: *** used, and then restart. cannam@86: cannam@86: EOF cannam@86: elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: cannam@86: sunos4*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' cannam@86: wlarc= cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: *) cannam@86: if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: cannam@86: if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then cannam@86: runpath_var= cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= cannam@86: fi cannam@86: else cannam@86: # PORTME fill in a description of your system's linker (not GNU ld) cannam@86: case $host_os in cannam@86: aix3*) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=yes cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' cannam@86: # Note: this linker hardcodes the directories in LIBPATH if there cannam@86: # are no directories specified by -L. cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: if test "$GCC" = yes && test -z "$link_static_flag"; then cannam@86: # Neither direct hardcoding nor static linking is supported with a cannam@86: # broken collect2. cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported cannam@86: fi cannam@86: ;; cannam@86: cannam@86: aix4* | aix5*) cannam@86: if test "$host_cpu" = ia64; then cannam@86: # On IA64, the linker does run time linking by default, so we don't cannam@86: # have to do anything special. cannam@86: aix_use_runtimelinking=no cannam@86: exp_sym_flag='-Bexport' cannam@86: no_entry_flag="" cannam@86: else cannam@86: # If we're using GNU nm, then we don't want the "-C" option. cannam@86: # -C means demangle to AIX nm, but means don't demangle with GNU nm cannam@86: if $NM -V 2>&1 | grep 'GNU' > /dev/null; then cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' cannam@86: else cannam@86: _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' cannam@86: fi cannam@86: aix_use_runtimelinking=no cannam@86: cannam@86: # Test if we are trying to use run time linking or normal cannam@86: # AIX style linking. If -brtl is somewhere in LDFLAGS, we cannam@86: # need to do runtime linking. cannam@86: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) cannam@86: for ld_flag in $LDFLAGS; do cannam@86: if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then cannam@86: aix_use_runtimelinking=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: esac cannam@86: cannam@86: exp_sym_flag='-bexport' cannam@86: no_entry_flag='-bnoentry' cannam@86: fi cannam@86: cannam@86: # When large executables or shared objects are built, AIX ld can cannam@86: # have problems creating the table of contents. If linking a library cannam@86: # or program results in "error TOC overflow" add -mminimal-toc to cannam@86: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not cannam@86: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. cannam@86: cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: cannam@86: if test "$GCC" = yes; then cannam@86: case $host_os in aix4.[[012]]|aix4.[[012]].*) cannam@86: # We only want to do this on AIX 4.2 and lower, the check cannam@86: # below for broken collect2 doesn't work under 4.3+ cannam@86: collect2name=`${CC} -print-prog-name=collect2` cannam@86: if test -f "$collect2name" && \ cannam@86: strings "$collect2name" | grep resolve_lib_name >/dev/null cannam@86: then cannam@86: # We have reworked collect2 cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: else cannam@86: # We have old collect2 cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported cannam@86: # It fails to find uninstalled libraries when the uninstalled cannam@86: # path is not listed in the libpath. Setting hardcode_minus_L cannam@86: # to unsupported forces relinking cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= cannam@86: fi cannam@86: esac cannam@86: shared_flag='-shared' cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: shared_flag="$shared_flag "'${wl}-G' cannam@86: fi cannam@86: else cannam@86: # not using gcc cannam@86: if test "$host_cpu" = ia64; then cannam@86: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release cannam@86: # chokes on -Wl,-G. The following line is correct: cannam@86: shared_flag='-G' cannam@86: else cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: shared_flag='${wl}-G' cannam@86: else cannam@86: shared_flag='${wl}-bM:SRE' cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: cannam@86: # It seems that -bexpall does not export symbols beginning with cannam@86: # underscore (_), so it is better to generate a list of symbols to export. cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=yes cannam@86: if test "$aix_use_runtimelinking" = yes; then cannam@86: # Warning - without using the other runtime loading flags (-brtl), cannam@86: # -berok will link without error, but may produce a broken library. cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' cannam@86: # Determine the default libpath from the value encoded in an empty executable. cannam@86: _LT_AC_SYS_LIBPATH_AIX cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" cannam@86: else cannam@86: if test "$host_cpu" = ia64; then cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" cannam@86: else cannam@86: # Determine the default libpath from the value encoded in an empty executable. cannam@86: _LT_AC_SYS_LIBPATH_AIX cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" cannam@86: # Warning - without using the other run time loading flags, cannam@86: # -berok will link without error, but may produce a broken library. cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' cannam@86: # -bexpall does not export symbols beginning with underscore (_) cannam@86: _LT_AC_TAGVAR(always_export_symbols, $1)=yes cannam@86: # Exported symbols can be pulled into shared objects from archives cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes cannam@86: # This is similar to how AIX traditionally builds it's shared libraries. cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' cannam@86: fi cannam@86: fi cannam@86: ;; cannam@86: cannam@86: amigaos*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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)' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: # see comment about different semantics on the GNU ld section cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: cannam@86: bsdi[[45]]*) cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic cannam@86: ;; cannam@86: cannam@86: cygwin* | mingw* | pw32*) cannam@86: # When not using gcc, we currently assume that we are using cannam@86: # Microsoft Visual C++. cannam@86: # hardcode_libdir_flag_spec is actually meaningless, as there is cannam@86: # no search path for DLLs. cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: # Tell ltmain to make .lib files, not .a files. cannam@86: libext=lib cannam@86: # Tell ltmain to make .dll files, not .so files. cannam@86: shrext_cmds=".dll" cannam@86: # FIXME: Setting linknames here is a bad hack. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' cannam@86: # The linker will automatically build a .lib file if we build a DLL. cannam@86: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' cannam@86: # FIXME: Should let the user specify the lib program. cannam@86: _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' cannam@86: _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' cannam@86: _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes cannam@86: ;; cannam@86: cannam@86: darwin* | rhapsody*) cannam@86: case "$host_os" in cannam@86: rhapsody* | darwin1.[[012]]) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' cannam@86: ;; cannam@86: *) # Darwin 1.3 on cannam@86: if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' cannam@86: else cannam@86: case ${MACOSX_DEPLOYMENT_TARGET} in cannam@86: 10.[[012]]) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' cannam@86: ;; cannam@86: 10.*) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_automatic, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: if test "$GCC" = yes ; then cannam@86: output_verbose_link_cmd='echo' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' cannam@86: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' cannam@86: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: else cannam@86: case $cc_basename in cannam@86: xlc*) cannam@86: output_verbose_link_cmd='echo' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' cannam@86: _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' cannam@86: # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: cannam@86: dgux*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: freebsd1*) cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: cannam@86: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor cannam@86: # support. Future versions do this automatically, but an explicit c++rt0.o cannam@86: # does not break anything, and helps significantly (at the cost of a little cannam@86: # extra space). cannam@86: freebsd2.2*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: # Unfortunately, older versions of FreeBSD 2 do not have this feature. cannam@86: freebsd2*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: # FreeBSD 3 and greater uses gcc -shared to do shared libraries. cannam@86: freebsd* | kfreebsd*-gnu | dragonfly*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: hpux9*) cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: cannam@86: # hardcode_minus_L: Not really in the search PATH, cannam@86: # but as the default location of the library. cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: ;; cannam@86: cannam@86: hpux10* | hpux11*) cannam@86: if test "$GCC" = yes -a "$with_gnu_ld" = no; then cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' cannam@86: ;; cannam@86: esac cannam@86: else cannam@86: case "$host_cpu" in cannam@86: hppa*64*|ia64*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: if test "$with_gnu_ld" = no; then cannam@86: case "$host_cpu" in cannam@86: hppa*64*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: ia64*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: cannam@86: # hardcode_minus_L: Not really in the search PATH, cannam@86: # but as the default location of the library. cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: cannam@86: # hardcode_minus_L: Not really in the search PATH, cannam@86: # but as the default location of the library. cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: cannam@86: irix5* | irix6* | nonstopux*) cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: ;; cannam@86: cannam@86: netbsd*) cannam@86: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: newsos6) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: openbsd*) cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' cannam@86: else cannam@86: case $host_os in cannam@86: openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: cannam@86: os2*) cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' cannam@86: ;; cannam@86: cannam@86: osf3*) cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: else cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: ;; cannam@86: cannam@86: osf4* | osf5*) # as osf3* with the addition of -msym flag cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' cannam@86: else cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$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' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ cannam@86: $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' cannam@86: cannam@86: # Both c and cxx compiler support -rpath directly cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: cannam@86: ;; cannam@86: cannam@86: sco3.2v5*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' cannam@86: runpath_var=LD_RUN_PATH cannam@86: hardcode_runpath_var=yes cannam@86: ;; cannam@86: cannam@86: solaris*) cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' cannam@86: if test "$GCC" = yes; then cannam@86: wlarc='${wl}' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' cannam@86: else cannam@86: wlarc='' cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: case $host_os in cannam@86: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; cannam@86: *) cannam@86: # The compiler driver will combine linker options so we cannam@86: # cannot just pass the convience library names through cannam@86: # without $wl, iff we do not link with $LD. cannam@86: # Luckily, gcc supports the same syntax we need for Sun Studio. cannam@86: # Supported since Solaris 2.6 (maybe 2.5.1?) cannam@86: case $wlarc in cannam@86: '') cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; cannam@86: *) cannam@86: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; cannam@86: esac ;; cannam@86: esac cannam@86: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes cannam@86: ;; cannam@86: cannam@86: sunos4*) cannam@86: if test "x$host_vendor" = xsequent; then cannam@86: # Use $CC to link under sequent, because it throws in some extra .o cannam@86: # files that make .init and .fini sections work. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' cannam@86: fi cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: sysv4) cannam@86: case $host_vendor in cannam@86: sni) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? cannam@86: ;; cannam@86: siemens) cannam@86: ## LD is ld it makes a PLAMLIB cannam@86: ## CC just makes a GrossModule. cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no cannam@86: ;; cannam@86: motorola) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie cannam@86: ;; cannam@86: esac cannam@86: runpath_var='LD_RUN_PATH' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: sysv4.3*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' cannam@86: ;; cannam@86: cannam@86: sysv4*MP*) cannam@86: if test -d /usr/nec; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: runpath_var=LD_RUN_PATH cannam@86: hardcode_runpath_var=yes cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=yes cannam@86: fi cannam@86: ;; cannam@86: cannam@86: sysv4.2uw2*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_direct, $1)=yes cannam@86: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: hardcode_runpath_var=yes cannam@86: runpath_var=LD_RUN_PATH cannam@86: ;; cannam@86: cannam@86: sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' cannam@86: if test "$GCC" = yes; then cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' cannam@86: fi cannam@86: runpath_var='LD_RUN_PATH' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: sysv5*) cannam@86: _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' cannam@86: # $CC -shared without GNU ld will not create a library from C++ cannam@86: # object files and a static libstdc++, better avoid it by now cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ cannam@86: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: runpath_var='LD_RUN_PATH' cannam@86: ;; cannam@86: cannam@86: uts4*) cannam@86: _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' cannam@86: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' cannam@86: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no cannam@86: ;; cannam@86: cannam@86: *) cannam@86: _LT_AC_TAGVAR(ld_shlibs, $1)=no cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ]) cannam@86: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) cannam@86: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no cannam@86: cannam@86: variables_saved_for_relink="PATH $shlibpath_var $runpath_var" cannam@86: if test "$GCC" = yes; then cannam@86: variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" cannam@86: fi cannam@86: cannam@86: # cannam@86: # Do we need to explicitly link libc? cannam@86: # cannam@86: case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in cannam@86: x|xyes) cannam@86: # Assume -lc should be added cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes cannam@86: cannam@86: if test "$enable_shared" = yes && test "$GCC" = yes; then cannam@86: case $_LT_AC_TAGVAR(archive_cmds, $1) in cannam@86: *'~'*) cannam@86: # FIXME: we may have to deal with multi-command sequences. cannam@86: ;; cannam@86: '$CC '*) cannam@86: # Test whether the compiler implicitly links with -lc since on some cannam@86: # systems, -lgcc has to come before -lc. If gcc already passes -lc cannam@86: # to ld, don't add -lc before -lgcc. cannam@86: AC_MSG_CHECKING([whether -lc should be explicitly linked in]) cannam@86: $rm conftest* cannam@86: printf "$lt_simple_compile_test_code" > conftest.$ac_ext cannam@86: cannam@86: if AC_TRY_EVAL(ac_compile) 2>conftest.err; then cannam@86: soname=conftest cannam@86: lib=conftest cannam@86: libobjs=conftest.$ac_objext cannam@86: deplibs= cannam@86: wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) cannam@86: compiler_flags=-v cannam@86: linker_flags=-v cannam@86: verstring= cannam@86: output_objdir=. cannam@86: libname=conftest cannam@86: lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)= cannam@86: if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) cannam@86: then cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no cannam@86: else cannam@86: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes cannam@86: fi cannam@86: _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag cannam@86: else cannam@86: cat conftest.err 1>&5 cannam@86: fi cannam@86: $rm conftest* cannam@86: AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) cannam@86: ;; cannam@86: esac cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: ])# AC_LIBTOOL_PROG_LD_SHLIBS cannam@86: cannam@86: cannam@86: # _LT_AC_FILE_LTDLL_C cannam@86: # ------------------- cannam@86: # Be careful that the start marker always follows a newline. cannam@86: AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ cannam@86: # /* ltdll.c starts here */ cannam@86: # #define WIN32_LEAN_AND_MEAN cannam@86: # #include cannam@86: # #undef WIN32_LEAN_AND_MEAN cannam@86: # #include cannam@86: # cannam@86: # #ifndef __CYGWIN__ cannam@86: # # ifdef __CYGWIN32__ cannam@86: # # define __CYGWIN__ __CYGWIN32__ cannam@86: # # endif cannam@86: # #endif cannam@86: # cannam@86: # #ifdef __cplusplus cannam@86: # extern "C" { cannam@86: # #endif cannam@86: # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); cannam@86: # #ifdef __cplusplus cannam@86: # } cannam@86: # #endif cannam@86: # cannam@86: # #ifdef __CYGWIN__ cannam@86: # #include cannam@86: # DECLARE_CYGWIN_DLL( DllMain ); cannam@86: # #endif cannam@86: # HINSTANCE __hDllInstance_base; cannam@86: # cannam@86: # BOOL APIENTRY cannam@86: # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) cannam@86: # { cannam@86: # __hDllInstance_base = hInst; cannam@86: # return TRUE; cannam@86: # } cannam@86: # /* ltdll.c ends here */ cannam@86: ])# _LT_AC_FILE_LTDLL_C cannam@86: cannam@86: cannam@86: # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) cannam@86: # --------------------------------- cannam@86: AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) cannam@86: cannam@86: cannam@86: # old names cannam@86: AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) cannam@86: AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) cannam@86: AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) cannam@86: AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) cannam@86: AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) cannam@86: AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) cannam@86: AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) cannam@86: cannam@86: # This is just to silence aclocal about the macro not being used cannam@86: ifelse([AC_DISABLE_FAST_INSTALL]) cannam@86: cannam@86: AC_DEFUN([LT_AC_PROG_GCJ], cannam@86: [AC_CHECK_TOOL(GCJ, gcj, no) cannam@86: test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" cannam@86: AC_SUBST(GCJFLAGS) cannam@86: ]) cannam@86: cannam@86: AC_DEFUN([LT_AC_PROG_RC], cannam@86: [AC_CHECK_TOOL(RC, windres, no) cannam@86: ]) cannam@86: cannam@86: # NOTE: This macro has been submitted for inclusion into # cannam@86: # GNU Autoconf as AC_PROG_SED. When it is available in # cannam@86: # a released version of Autoconf we should remove this # cannam@86: # macro and use it instead. # cannam@86: # LT_AC_PROG_SED cannam@86: # -------------- cannam@86: # Check for a fully-functional sed program, that truncates cannam@86: # as few characters as possible. Prefer GNU sed if found. cannam@86: AC_DEFUN([LT_AC_PROG_SED], cannam@86: [AC_MSG_CHECKING([for a sed that does not truncate output]) cannam@86: AC_CACHE_VAL(lt_cv_path_SED, cannam@86: [# Loop through the user's path and test for sed and gsed. cannam@86: # Then use that list of sed's as ones to test for truncation. cannam@86: as_save_IFS=$IFS; IFS=$PATH_SEPARATOR cannam@86: for as_dir in $PATH cannam@86: do cannam@86: IFS=$as_save_IFS cannam@86: test -z "$as_dir" && as_dir=. cannam@86: for lt_ac_prog in sed gsed; do cannam@86: for ac_exec_ext in '' $ac_executable_extensions; do cannam@86: if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then cannam@86: lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" cannam@86: fi cannam@86: done cannam@86: done cannam@86: done cannam@86: lt_ac_max=0 cannam@86: lt_ac_count=0 cannam@86: # Add /usr/xpg4/bin/sed as it is typically found on Solaris cannam@86: # along with /bin/sed that truncates output. cannam@86: for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do cannam@86: test ! -f $lt_ac_sed && continue cannam@86: cat /dev/null > conftest.in cannam@86: lt_ac_count=0 cannam@86: echo $ECHO_N "0123456789$ECHO_C" >conftest.in cannam@86: # Check for GNU sed and select it if it is found. cannam@86: if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then cannam@86: lt_cv_path_SED=$lt_ac_sed cannam@86: break cannam@86: fi cannam@86: while true; do cannam@86: cat conftest.in conftest.in >conftest.tmp cannam@86: mv conftest.tmp conftest.in cannam@86: cp conftest.in conftest.nl cannam@86: echo >>conftest.nl cannam@86: $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cannam@86: cmp -s conftest.out conftest.nl || break cannam@86: # 10000 chars as input seems more than enough cannam@86: test $lt_ac_count -gt 10 && break cannam@86: lt_ac_count=`expr $lt_ac_count + 1` cannam@86: if test $lt_ac_count -gt $lt_ac_max; then cannam@86: lt_ac_max=$lt_ac_count cannam@86: lt_cv_path_SED=$lt_ac_sed cannam@86: fi cannam@86: done cannam@86: done cannam@86: ]) cannam@86: SED=$lt_cv_path_SED cannam@86: AC_MSG_RESULT([$SED]) cannam@86: ]) cannam@86: cannam@86: # Figure out how to run the assembler. -*- Autoconf -*- cannam@86: cannam@86: # serial 2 cannam@86: cannam@86: # Copyright 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: # AM_PROG_AS cannam@86: # ---------- cannam@86: AC_DEFUN([AM_PROG_AS], cannam@86: [# By default we simply use the C compiler to build assembly code. cannam@86: AC_REQUIRE([AC_PROG_CC]) cannam@86: : ${CCAS='$(CC)'} cannam@86: # Set ASFLAGS if not already set. cannam@86: : ${CCASFLAGS='$(CFLAGS)'} cannam@86: AC_SUBST(CCAS) cannam@86: AC_SUBST(CCASFLAGS)]) cannam@86: cannam@86: # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- cannam@86: cannam@86: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. cannam@86: cannam@86: # This program is free software; you can redistribute it and/or modify cannam@86: # it under the terms of the GNU General Public License as published by cannam@86: # the Free Software Foundation; either version 2, or (at your option) cannam@86: # any later version. cannam@86: cannam@86: # This program is distributed in the hope that it will be useful, cannam@86: # but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@86: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@86: # GNU General Public License for more details. cannam@86: cannam@86: # You should have received a copy of the GNU General Public License cannam@86: # along with this program; if not, write to the Free Software cannam@86: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA cannam@86: # 02111-1307, USA. cannam@86: cannam@86: AC_PREREQ([2.52]) cannam@86: cannam@86: # serial 6 cannam@86: cannam@86: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. cannam@86: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) cannam@86: cannam@86: # CFLAGS and library paths for XMMS cannam@86: # written 15 December 1999 by Ben Gertzfield cannam@86: cannam@86: dnl Usage: cannam@86: dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) cannam@86: dnl cannam@86: dnl Example: cannam@86: dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***])) cannam@86: dnl cannam@86: dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR, cannam@86: dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR, cannam@86: dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR, cannam@86: dnl and XMMS_VERSION for your plugin pleasure. cannam@86: dnl cannam@86: cannam@86: dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]]) cannam@86: AC_DEFUN([XMMS_TEST_VERSION], [ cannam@86: cannam@86: # Determine which version number is greater. Prints 2 to stdout if cannam@86: # the second number is greater, 1 if the first number is greater, cannam@86: # 0 if the numbers are equal. cannam@86: cannam@86: # Written 15 December 1999 by Ben Gertzfield cannam@86: # Revised 15 December 1999 by Jim Monty cannam@86: cannam@86: AC_PROG_AWK cannam@86: xmms_got_version=[` $AWK ' \ cannam@86: BEGIN { \ cannam@86: print vercmp(ARGV[1], ARGV[2]); \ cannam@86: } \ cannam@86: \ cannam@86: function vercmp(ver1, ver2, ver1arr, ver2arr, \ cannam@86: ver1len, ver2len, \ cannam@86: ver1int, ver2int, len, i, p) { \ cannam@86: \ cannam@86: ver1len = split(ver1, ver1arr, /\./); \ cannam@86: ver2len = split(ver2, ver2arr, /\./); \ cannam@86: \ cannam@86: len = ver1len > ver2len ? ver1len : ver2len; \ cannam@86: \ cannam@86: for (i = 1; i <= len; i++) { \ cannam@86: p = 1000 ^ (len - i); \ cannam@86: ver1int += ver1arr[i] * p; \ cannam@86: ver2int += ver2arr[i] * p; \ cannam@86: } \ cannam@86: \ cannam@86: if (ver1int < ver2int) \ cannam@86: return 2; \ cannam@86: else if (ver1int > ver2int) \ cannam@86: return 1; \ cannam@86: else \ cannam@86: return 0; \ cannam@86: }' $1 $2`] cannam@86: cannam@86: if test $xmms_got_version -eq 2; then # failure cannam@86: ifelse([$4], , :, $4) cannam@86: else # success! cannam@86: ifelse([$3], , :, $3) cannam@86: fi cannam@86: ]) cannam@86: cannam@86: AC_DEFUN([AM_PATH_XMMS], cannam@86: [ cannam@86: AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)], cannam@86: xmms_config_prefix="$withval", xmms_config_prefix="") cannam@86: AC_ARG_WITH(xmms-exec-prefix,[ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)], cannam@86: xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="") cannam@86: cannam@86: if test x$xmms_config_exec_prefix != x; then cannam@86: xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix" cannam@86: if test x${XMMS_CONFIG+set} != xset; then cannam@86: XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config cannam@86: fi cannam@86: fi cannam@86: cannam@86: if test x$xmms_config_prefix != x; then cannam@86: xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix" cannam@86: if test x${XMMS_CONFIG+set} != xset; then cannam@86: XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config cannam@86: fi cannam@86: fi cannam@86: cannam@86: AC_PATH_PROG(XMMS_CONFIG, xmms-config, no) cannam@86: min_xmms_version=ifelse([$1], ,0.9.5.1, $1) cannam@86: cannam@86: if test "$XMMS_CONFIG" = "no"; then cannam@86: no_xmms=yes cannam@86: else cannam@86: XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags` cannam@86: XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs` cannam@86: XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version` cannam@86: XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir` cannam@86: XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir` cannam@86: XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \ cannam@86: --visualization-plugin-dir` cannam@86: XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir` cannam@86: XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir` cannam@86: XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir` cannam@86: XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir` cannam@86: cannam@86: XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version) cannam@86: fi cannam@86: cannam@86: AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version) cannam@86: cannam@86: if test "x$no_xmms" = x; then cannam@86: AC_MSG_RESULT(yes) cannam@86: ifelse([$2], , :, [$2]) cannam@86: else cannam@86: AC_MSG_RESULT(no) cannam@86: cannam@86: if test "$XMMS_CONFIG" = "no" ; then cannam@86: echo "*** The xmms-config script installed by XMMS could not be found." cannam@86: echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in" cannam@86: echo "*** your path, or set the XMMS_CONFIG environment variable to the" cannam@86: echo "*** full path to xmms-config." cannam@86: else cannam@86: if test "$no_xmms" = "version"; then cannam@86: echo "*** An old version of XMMS, $XMMS_VERSION, was found." cannam@86: echo "*** You need a version of XMMS newer than $min_xmms_version." cannam@86: echo "*** The latest version of XMMS is always available from" cannam@86: echo "*** http://www.xmms.org/" cannam@86: echo "***" cannam@86: cannam@86: echo "*** If you have already installed a sufficiently new version, this error" cannam@86: echo "*** probably means that the wrong copy of the xmms-config shell script is" cannam@86: echo "*** being found. The easiest way to fix this is to remove the old version" cannam@86: echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the" cannam@86: echo "*** correct copy of xmms-config. (In this case, you will have to" cannam@86: echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf" cannam@86: echo "*** so that the correct libraries are found at run-time)" cannam@86: fi cannam@86: fi cannam@86: XMMS_CFLAGS="" cannam@86: XMMS_LIBS="" cannam@86: ifelse([$3], , :, [$3]) cannam@86: fi cannam@86: AC_SUBST(XMMS_CFLAGS) cannam@86: AC_SUBST(XMMS_LIBS) cannam@86: AC_SUBST(XMMS_VERSION) cannam@86: AC_SUBST(XMMS_DATA_DIR) cannam@86: AC_SUBST(XMMS_PLUGIN_DIR) cannam@86: AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR) cannam@86: AC_SUBST(XMMS_INPUT_PLUGIN_DIR) cannam@86: AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR) cannam@86: AC_SUBST(XMMS_GENERAL_PLUGIN_DIR) cannam@86: AC_SUBST(XMMS_EFFECT_PLUGIN_DIR) cannam@86: ]) cannam@86: cannam@86: # Configure paths for libogg cannam@86: # Jack Moffitt 10-21-2000 cannam@86: # Shamelessly stolen from Owen Taylor and Manish Singh cannam@86: cannam@86: dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) cannam@86: dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS cannam@86: dnl cannam@86: AC_DEFUN([XIPH_PATH_OGG], cannam@86: [dnl cannam@86: dnl Get the cflags and libraries cannam@86: dnl cannam@86: AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="") cannam@86: AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="") cannam@86: AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="") cannam@86: AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes) cannam@86: cannam@86: if test "x$ogg_libraries" != "x" ; then cannam@86: OGG_LIBS="-L$ogg_libraries" cannam@86: elif test "x$ogg_prefix" != "x" ; then cannam@86: OGG_LIBS="-L$ogg_prefix/lib" cannam@86: elif test "x$prefix" != "xNONE" ; then cannam@86: OGG_LIBS="-L$prefix/lib" cannam@86: fi cannam@86: cannam@86: OGG_LIBS="$OGG_LIBS -logg" cannam@86: cannam@86: if test "x$ogg_includes" != "x" ; then cannam@86: OGG_CFLAGS="-I$ogg_includes" cannam@86: elif test "x$ogg_prefix" != "x" ; then cannam@86: OGG_CFLAGS="-I$ogg_prefix/include" cannam@86: elif test "x$prefix" != "xNONE"; then cannam@86: OGG_CFLAGS="-I$prefix/include" cannam@86: fi cannam@86: cannam@86: AC_MSG_CHECKING(for Ogg) cannam@86: no_ogg="" cannam@86: cannam@86: cannam@86: if test "x$enable_oggtest" = "xyes" ; then cannam@86: ac_save_CFLAGS="$CFLAGS" cannam@86: ac_save_LIBS="$LIBS" cannam@86: CFLAGS="$CFLAGS $OGG_CFLAGS" cannam@86: LIBS="$LIBS $OGG_LIBS" cannam@86: dnl cannam@86: dnl Now check if the installed Ogg is sufficiently new. cannam@86: dnl cannam@86: rm -f conf.oggtest cannam@86: AC_TRY_RUN([ cannam@86: #include cannam@86: #include cannam@86: #include cannam@86: #include cannam@86: cannam@86: int main () cannam@86: { cannam@86: system("touch conf.oggtest"); cannam@86: return 0; cannam@86: } cannam@86: cannam@86: ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) cannam@86: CFLAGS="$ac_save_CFLAGS" cannam@86: LIBS="$ac_save_LIBS" cannam@86: fi cannam@86: cannam@86: if test "x$no_ogg" = "x" ; then cannam@86: AC_MSG_RESULT(yes) cannam@86: ifelse([$1], , :, [$1]) cannam@86: else cannam@86: AC_MSG_RESULT(no) cannam@86: if test -f conf.oggtest ; then cannam@86: : cannam@86: else cannam@86: echo "*** Could not run Ogg test program, checking why..." cannam@86: CFLAGS="$CFLAGS $OGG_CFLAGS" cannam@86: LIBS="$LIBS $OGG_LIBS" cannam@86: AC_TRY_LINK([ cannam@86: #include cannam@86: #include cannam@86: ], [ return 0; ], cannam@86: [ echo "*** The test program compiled, but did not run. This usually means" cannam@86: echo "*** that the run-time linker is not finding Ogg or finding the wrong" cannam@86: echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your" cannam@86: echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" cannam@86: echo "*** to the installed location Also, make sure you have run ldconfig if that" cannam@86: echo "*** is required on your system" cannam@86: echo "***" cannam@86: echo "*** If you have an old version installed, it is best to remove it, although" cannam@86: echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], cannam@86: [ echo "*** The test program failed to compile or link. See the file config.log for the" cannam@86: echo "*** exact error that occured. This usually means Ogg was incorrectly installed" cannam@86: echo "*** or that you have moved Ogg since it was installed." ]) cannam@86: CFLAGS="$ac_save_CFLAGS" cannam@86: LIBS="$ac_save_LIBS" cannam@86: fi cannam@86: OGG_CFLAGS="" cannam@86: OGG_LIBS="" cannam@86: ifelse([$2], , :, [$2]) cannam@86: fi cannam@86: AC_SUBST(OGG_CFLAGS) cannam@86: AC_SUBST(OGG_LIBS) cannam@86: rm -f conf.oggtest cannam@86: ]) cannam@86: cannam@86: # iconv.m4 serial AM4 (gettext-0.11.3) cannam@86: dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. cannam@86: dnl This file is free software; the Free Software Foundation cannam@86: dnl gives unlimited permission to copy and/or distribute it, cannam@86: dnl with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: dnl From Bruno Haible. cannam@86: cannam@86: AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], cannam@86: [ cannam@86: dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. cannam@86: AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) cannam@86: AC_REQUIRE([AC_LIB_RPATH]) cannam@86: cannam@86: dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV cannam@86: dnl accordingly. cannam@86: AC_LIB_LINKFLAGS_BODY([iconv]) cannam@86: ]) cannam@86: cannam@86: AC_DEFUN([AM_ICONV_LINK], cannam@86: [ cannam@86: dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and cannam@86: dnl those with the standalone portable GNU libiconv installed). cannam@86: cannam@86: dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV cannam@86: dnl accordingly. cannam@86: AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) cannam@86: cannam@86: dnl Add $INCICONV to CPPFLAGS before performing the following checks, cannam@86: dnl because if the user has installed libiconv and not disabled its use cannam@86: dnl via --without-libiconv-prefix, he wants to use it. The first cannam@86: dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. cannam@86: am_save_CPPFLAGS="$CPPFLAGS" cannam@86: AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) cannam@86: cannam@86: AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ cannam@86: am_cv_func_iconv="no, consider installing GNU libiconv" cannam@86: am_cv_lib_iconv=no cannam@86: AC_TRY_LINK([#include cannam@86: #include ], cannam@86: [iconv_t cd = iconv_open("",""); cannam@86: iconv(cd,NULL,NULL,NULL,NULL); cannam@86: iconv_close(cd);], cannam@86: am_cv_func_iconv=yes) cannam@86: if test "$am_cv_func_iconv" != yes; then cannam@86: am_save_LIBS="$LIBS" cannam@86: LIBS="$LIBS $LIBICONV" cannam@86: AC_TRY_LINK([#include cannam@86: #include ], cannam@86: [iconv_t cd = iconv_open("",""); cannam@86: iconv(cd,NULL,NULL,NULL,NULL); cannam@86: iconv_close(cd);], cannam@86: am_cv_lib_iconv=yes cannam@86: am_cv_func_iconv=yes) cannam@86: LIBS="$am_save_LIBS" cannam@86: fi cannam@86: ]) cannam@86: if test "$am_cv_func_iconv" = yes; then cannam@86: AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) cannam@86: fi cannam@86: if test "$am_cv_lib_iconv" = yes; then cannam@86: AC_MSG_CHECKING([how to link with libiconv]) cannam@86: AC_MSG_RESULT([$LIBICONV]) cannam@86: else cannam@86: dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV cannam@86: dnl either. cannam@86: CPPFLAGS="$am_save_CPPFLAGS" cannam@86: LIBICONV= cannam@86: LTLIBICONV= cannam@86: fi cannam@86: AC_SUBST(LIBICONV) cannam@86: AC_SUBST(LTLIBICONV) cannam@86: ]) cannam@86: cannam@86: AC_DEFUN([AM_ICONV], cannam@86: [ cannam@86: AM_ICONV_LINK cannam@86: if test "$am_cv_func_iconv" = yes; then cannam@86: AC_MSG_CHECKING([for iconv declaration]) cannam@86: AC_CACHE_VAL(am_cv_proto_iconv, [ cannam@86: AC_TRY_COMPILE([ cannam@86: #include cannam@86: #include cannam@86: extern cannam@86: #ifdef __cplusplus cannam@86: "C" cannam@86: #endif cannam@86: #if defined(__STDC__) || defined(__cplusplus) cannam@86: size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); cannam@86: #else cannam@86: size_t iconv(); cannam@86: #endif cannam@86: ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") cannam@86: am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) cannam@86: am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` cannam@86: AC_MSG_RESULT([$]{ac_t:- cannam@86: }[$]am_cv_proto_iconv) cannam@86: AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, cannam@86: [Define as const if the declaration of iconv() needs const.]) cannam@86: fi cannam@86: ]) cannam@86: cannam@86: # lib-prefix.m4 serial 4 (gettext-0.14.2) cannam@86: dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. cannam@86: dnl This file is free software; the Free Software Foundation cannam@86: dnl gives unlimited permission to copy and/or distribute it, cannam@86: dnl with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: dnl From Bruno Haible. cannam@86: cannam@86: dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and cannam@86: dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't cannam@86: dnl require excessive bracketing. cannam@86: ifdef([AC_HELP_STRING], cannam@86: [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], cannam@86: [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) cannam@86: cannam@86: dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed cannam@86: dnl to access previously installed libraries. The basic assumption is that cannam@86: dnl a user will want packages to use other packages he previously installed cannam@86: dnl with the same --prefix option. cannam@86: dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate cannam@86: dnl libraries, but is otherwise very convenient. cannam@86: AC_DEFUN([AC_LIB_PREFIX], cannam@86: [ cannam@86: AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) cannam@86: AC_REQUIRE([AC_PROG_CC]) cannam@86: AC_REQUIRE([AC_CANONICAL_HOST]) cannam@86: AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) cannam@86: dnl By default, look in $includedir and $libdir. cannam@86: use_additional=yes cannam@86: AC_LIB_WITH_FINAL_PREFIX([ cannam@86: eval additional_includedir=\"$includedir\" cannam@86: eval additional_libdir=\"$libdir\" cannam@86: ]) cannam@86: AC_LIB_ARG_WITH([lib-prefix], cannam@86: [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib cannam@86: --without-lib-prefix don't search for libraries in includedir and libdir], cannam@86: [ cannam@86: if test "X$withval" = "Xno"; then cannam@86: use_additional=no cannam@86: else cannam@86: if test "X$withval" = "X"; then cannam@86: AC_LIB_WITH_FINAL_PREFIX([ cannam@86: eval additional_includedir=\"$includedir\" cannam@86: eval additional_libdir=\"$libdir\" cannam@86: ]) cannam@86: else cannam@86: additional_includedir="$withval/include" cannam@86: additional_libdir="$withval/lib" cannam@86: fi cannam@86: fi cannam@86: ]) cannam@86: if test $use_additional = yes; then cannam@86: dnl Potentially add $additional_includedir to $CPPFLAGS. cannam@86: dnl But don't add it cannam@86: dnl 1. if it's the standard /usr/include, cannam@86: dnl 2. if it's already present in $CPPFLAGS, cannam@86: dnl 3. if it's /usr/local/include and we are using GCC on Linux, cannam@86: dnl 4. if it doesn't exist as a directory. cannam@86: if test "X$additional_includedir" != "X/usr/include"; then cannam@86: haveit= cannam@86: for x in $CPPFLAGS; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-I$additional_includedir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: if test "X$additional_includedir" = "X/usr/local/include"; then cannam@86: if test -n "$GCC"; then cannam@86: case $host_os in cannam@86: linux* | gnu* | k*bsd*-gnu) haveit=yes;; cannam@86: esac cannam@86: fi cannam@86: fi cannam@86: if test -z "$haveit"; then cannam@86: if test -d "$additional_includedir"; then cannam@86: dnl Really add $additional_includedir to $CPPFLAGS. cannam@86: CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: dnl Potentially add $additional_libdir to $LDFLAGS. cannam@86: dnl But don't add it cannam@86: dnl 1. if it's the standard /usr/lib, cannam@86: dnl 2. if it's already present in $LDFLAGS, cannam@86: dnl 3. if it's /usr/local/lib and we are using GCC on Linux, cannam@86: dnl 4. if it doesn't exist as a directory. cannam@86: if test "X$additional_libdir" != "X/usr/lib"; then cannam@86: haveit= cannam@86: for x in $LDFLAGS; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-L$additional_libdir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: if test "X$additional_libdir" = "X/usr/local/lib"; then cannam@86: if test -n "$GCC"; then cannam@86: case $host_os in cannam@86: linux*) haveit=yes;; cannam@86: esac cannam@86: fi cannam@86: fi cannam@86: if test -z "$haveit"; then cannam@86: if test -d "$additional_libdir"; then cannam@86: dnl Really add $additional_libdir to $LDFLAGS. cannam@86: LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: ]) cannam@86: cannam@86: dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, cannam@86: dnl acl_final_exec_prefix, containing the values to which $prefix and cannam@86: dnl $exec_prefix will expand at the end of the configure script. cannam@86: AC_DEFUN([AC_LIB_PREPARE_PREFIX], cannam@86: [ cannam@86: dnl Unfortunately, prefix and exec_prefix get only finally determined cannam@86: dnl at the end of configure. cannam@86: if test "X$prefix" = "XNONE"; then cannam@86: acl_final_prefix="$ac_default_prefix" cannam@86: else cannam@86: acl_final_prefix="$prefix" cannam@86: fi cannam@86: if test "X$exec_prefix" = "XNONE"; then cannam@86: acl_final_exec_prefix='${prefix}' cannam@86: else cannam@86: acl_final_exec_prefix="$exec_prefix" cannam@86: fi cannam@86: acl_save_prefix="$prefix" cannam@86: prefix="$acl_final_prefix" cannam@86: eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" cannam@86: prefix="$acl_save_prefix" cannam@86: ]) cannam@86: cannam@86: dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the cannam@86: dnl variables prefix and exec_prefix bound to the values they will have cannam@86: dnl at the end of the configure script. cannam@86: AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], cannam@86: [ cannam@86: acl_save_prefix="$prefix" cannam@86: prefix="$acl_final_prefix" cannam@86: acl_save_exec_prefix="$exec_prefix" cannam@86: exec_prefix="$acl_final_exec_prefix" cannam@86: $1 cannam@86: exec_prefix="$acl_save_exec_prefix" cannam@86: prefix="$acl_save_prefix" cannam@86: ]) cannam@86: cannam@86: # lib-link.m4 serial 6 (gettext-0.14.3) cannam@86: dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. cannam@86: dnl This file is free software; the Free Software Foundation cannam@86: dnl gives unlimited permission to copy and/or distribute it, cannam@86: dnl with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: dnl From Bruno Haible. cannam@86: cannam@86: AC_PREREQ(2.50) cannam@86: cannam@86: dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and cannam@86: dnl the libraries corresponding to explicit and implicit dependencies. cannam@86: dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and cannam@86: dnl augments the CPPFLAGS variable. cannam@86: AC_DEFUN([AC_LIB_LINKFLAGS], cannam@86: [ cannam@86: AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) cannam@86: AC_REQUIRE([AC_LIB_RPATH]) cannam@86: define([Name],[translit([$1],[./-], [___])]) cannam@86: define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], cannam@86: [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) cannam@86: AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ cannam@86: AC_LIB_LINKFLAGS_BODY([$1], [$2]) cannam@86: ac_cv_lib[]Name[]_libs="$LIB[]NAME" cannam@86: ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" cannam@86: ac_cv_lib[]Name[]_cppflags="$INC[]NAME" cannam@86: ]) cannam@86: LIB[]NAME="$ac_cv_lib[]Name[]_libs" cannam@86: LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" cannam@86: INC[]NAME="$ac_cv_lib[]Name[]_cppflags" cannam@86: AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) cannam@86: AC_SUBST([LIB]NAME) cannam@86: AC_SUBST([LTLIB]NAME) cannam@86: dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the cannam@86: dnl results of this search when this library appears as a dependency. cannam@86: HAVE_LIB[]NAME=yes cannam@86: undefine([Name]) cannam@86: undefine([NAME]) cannam@86: ]) cannam@86: cannam@86: dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) cannam@86: dnl searches for libname and the libraries corresponding to explicit and cannam@86: dnl implicit dependencies, together with the specified include files and cannam@86: dnl the ability to compile and link the specified testcode. If found, it cannam@86: dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and cannam@86: dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and cannam@86: dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs cannam@86: dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. cannam@86: AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], cannam@86: [ cannam@86: AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) cannam@86: AC_REQUIRE([AC_LIB_RPATH]) cannam@86: define([Name],[translit([$1],[./-], [___])]) cannam@86: define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], cannam@86: [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) cannam@86: cannam@86: dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME cannam@86: dnl accordingly. cannam@86: AC_LIB_LINKFLAGS_BODY([$1], [$2]) cannam@86: cannam@86: dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, cannam@86: dnl because if the user has installed lib[]Name and not disabled its use cannam@86: dnl via --without-lib[]Name-prefix, he wants to use it. cannam@86: ac_save_CPPFLAGS="$CPPFLAGS" cannam@86: AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) cannam@86: cannam@86: AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ cannam@86: ac_save_LIBS="$LIBS" cannam@86: LIBS="$LIBS $LIB[]NAME" cannam@86: AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) cannam@86: LIBS="$ac_save_LIBS" cannam@86: ]) cannam@86: if test "$ac_cv_lib[]Name" = yes; then cannam@86: HAVE_LIB[]NAME=yes cannam@86: AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) cannam@86: AC_MSG_CHECKING([how to link with lib[]$1]) cannam@86: AC_MSG_RESULT([$LIB[]NAME]) cannam@86: else cannam@86: HAVE_LIB[]NAME=no cannam@86: dnl If $LIB[]NAME didn't lead to a usable library, we don't need cannam@86: dnl $INC[]NAME either. cannam@86: CPPFLAGS="$ac_save_CPPFLAGS" cannam@86: LIB[]NAME= cannam@86: LTLIB[]NAME= cannam@86: fi cannam@86: AC_SUBST([HAVE_LIB]NAME) cannam@86: AC_SUBST([LIB]NAME) cannam@86: AC_SUBST([LTLIB]NAME) cannam@86: undefine([Name]) cannam@86: undefine([NAME]) cannam@86: ]) cannam@86: cannam@86: dnl Determine the platform dependent parameters needed to use rpath: cannam@86: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, cannam@86: dnl hardcode_direct, hardcode_minus_L. cannam@86: AC_DEFUN([AC_LIB_RPATH], cannam@86: [ cannam@86: dnl Tell automake >= 1.10 to complain if config.rpath is missing. cannam@86: m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) cannam@86: AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS cannam@86: AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld cannam@86: AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host cannam@86: AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir cannam@86: AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ cannam@86: CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ cannam@86: ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh cannam@86: . ./conftest.sh cannam@86: rm -f ./conftest.sh cannam@86: acl_cv_rpath=done cannam@86: ]) cannam@86: wl="$acl_cv_wl" cannam@86: libext="$acl_cv_libext" cannam@86: shlibext="$acl_cv_shlibext" cannam@86: hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" cannam@86: hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" cannam@86: hardcode_direct="$acl_cv_hardcode_direct" cannam@86: hardcode_minus_L="$acl_cv_hardcode_minus_L" cannam@86: dnl Determine whether the user wants rpath handling at all. cannam@86: AC_ARG_ENABLE(rpath, cannam@86: [ --disable-rpath do not hardcode runtime library paths], cannam@86: :, enable_rpath=yes) cannam@86: ]) cannam@86: cannam@86: dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and cannam@86: dnl the libraries corresponding to explicit and implicit dependencies. cannam@86: dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. cannam@86: AC_DEFUN([AC_LIB_LINKFLAGS_BODY], cannam@86: [ cannam@86: define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], cannam@86: [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) cannam@86: dnl By default, look in $includedir and $libdir. cannam@86: use_additional=yes cannam@86: AC_LIB_WITH_FINAL_PREFIX([ cannam@86: eval additional_includedir=\"$includedir\" cannam@86: eval additional_libdir=\"$libdir\" cannam@86: ]) cannam@86: AC_LIB_ARG_WITH([lib$1-prefix], cannam@86: [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib cannam@86: --without-lib$1-prefix don't search for lib$1 in includedir and libdir], cannam@86: [ cannam@86: if test "X$withval" = "Xno"; then cannam@86: use_additional=no cannam@86: else cannam@86: if test "X$withval" = "X"; then cannam@86: AC_LIB_WITH_FINAL_PREFIX([ cannam@86: eval additional_includedir=\"$includedir\" cannam@86: eval additional_libdir=\"$libdir\" cannam@86: ]) cannam@86: else cannam@86: additional_includedir="$withval/include" cannam@86: additional_libdir="$withval/lib" cannam@86: fi cannam@86: fi cannam@86: ]) cannam@86: dnl Search the library and its dependencies in $additional_libdir and cannam@86: dnl $LDFLAGS. Using breadth-first-seach. cannam@86: LIB[]NAME= cannam@86: LTLIB[]NAME= cannam@86: INC[]NAME= cannam@86: rpathdirs= cannam@86: ltrpathdirs= cannam@86: names_already_handled= cannam@86: names_next_round='$1 $2' cannam@86: while test -n "$names_next_round"; do cannam@86: names_this_round="$names_next_round" cannam@86: names_next_round= cannam@86: for name in $names_this_round; do cannam@86: already_handled= cannam@86: for n in $names_already_handled; do cannam@86: if test "$n" = "$name"; then cannam@86: already_handled=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$already_handled"; then cannam@86: names_already_handled="$names_already_handled $name" cannam@86: dnl See if it was already located by an earlier AC_LIB_LINKFLAGS cannam@86: dnl or AC_LIB_HAVE_LINKFLAGS call. cannam@86: uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` cannam@86: eval value=\"\$HAVE_LIB$uppername\" cannam@86: if test -n "$value"; then cannam@86: if test "$value" = yes; then cannam@86: eval value=\"\$LIB$uppername\" cannam@86: test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" cannam@86: eval value=\"\$LTLIB$uppername\" cannam@86: test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" cannam@86: else cannam@86: dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined cannam@86: dnl that this library doesn't exist. So just drop it. cannam@86: : cannam@86: fi cannam@86: else cannam@86: dnl Search the library lib$name in $additional_libdir and $LDFLAGS cannam@86: dnl and the already constructed $LIBNAME/$LTLIBNAME. cannam@86: found_dir= cannam@86: found_la= cannam@86: found_so= cannam@86: found_a= cannam@86: if test $use_additional = yes; then cannam@86: if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then cannam@86: found_dir="$additional_libdir" cannam@86: found_so="$additional_libdir/lib$name.$shlibext" cannam@86: if test -f "$additional_libdir/lib$name.la"; then cannam@86: found_la="$additional_libdir/lib$name.la" cannam@86: fi cannam@86: else cannam@86: if test -f "$additional_libdir/lib$name.$libext"; then cannam@86: found_dir="$additional_libdir" cannam@86: found_a="$additional_libdir/lib$name.$libext" cannam@86: if test -f "$additional_libdir/lib$name.la"; then cannam@86: found_la="$additional_libdir/lib$name.la" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: if test "X$found_dir" = "X"; then cannam@86: for x in $LDFLAGS $LTLIB[]NAME; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: case "$x" in cannam@86: -L*) cannam@86: dir=`echo "X$x" | sed -e 's/^X-L//'` cannam@86: if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then cannam@86: found_dir="$dir" cannam@86: found_so="$dir/lib$name.$shlibext" cannam@86: if test -f "$dir/lib$name.la"; then cannam@86: found_la="$dir/lib$name.la" cannam@86: fi cannam@86: else cannam@86: if test -f "$dir/lib$name.$libext"; then cannam@86: found_dir="$dir" cannam@86: found_a="$dir/lib$name.$libext" cannam@86: if test -f "$dir/lib$name.la"; then cannam@86: found_la="$dir/lib$name.la" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: ;; cannam@86: esac cannam@86: if test "X$found_dir" != "X"; then cannam@86: break cannam@86: fi cannam@86: done cannam@86: fi cannam@86: if test "X$found_dir" != "X"; then cannam@86: dnl Found the library. cannam@86: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" cannam@86: if test "X$found_so" != "X"; then cannam@86: dnl Linking with a shared library. We attempt to hardcode its cannam@86: dnl directory into the executable's runpath, unless it's the cannam@86: dnl standard /usr/lib. cannam@86: if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then cannam@86: dnl No hardcoding is needed. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" cannam@86: else cannam@86: dnl Use an explicit option to hardcode DIR into the resulting cannam@86: dnl binary. cannam@86: dnl Potentially add DIR to ltrpathdirs. cannam@86: dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. cannam@86: haveit= cannam@86: for x in $ltrpathdirs; do cannam@86: if test "X$x" = "X$found_dir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: ltrpathdirs="$ltrpathdirs $found_dir" cannam@86: fi cannam@86: dnl The hardcoding into $LIBNAME is system dependent. cannam@86: if test "$hardcode_direct" = yes; then cannam@86: dnl Using DIR/libNAME.so during linking hardcodes DIR into the cannam@86: dnl resulting binary. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" cannam@86: else cannam@86: if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then cannam@86: dnl Use an explicit option to hardcode DIR into the resulting cannam@86: dnl binary. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" cannam@86: dnl Potentially add DIR to rpathdirs. cannam@86: dnl The rpathdirs will be appended to $LIBNAME at the end. cannam@86: haveit= cannam@86: for x in $rpathdirs; do cannam@86: if test "X$x" = "X$found_dir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: rpathdirs="$rpathdirs $found_dir" cannam@86: fi cannam@86: else cannam@86: dnl Rely on "-L$found_dir". cannam@86: dnl But don't add it if it's already contained in the LDFLAGS cannam@86: dnl or the already constructed $LIBNAME cannam@86: haveit= cannam@86: for x in $LDFLAGS $LIB[]NAME; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-L$found_dir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" cannam@86: fi cannam@86: if test "$hardcode_minus_L" != no; then cannam@86: dnl FIXME: Not sure whether we should use cannam@86: dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" cannam@86: dnl here. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" cannam@86: else cannam@86: dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH cannam@86: dnl here, because this doesn't fit in flags passed to the cannam@86: dnl compiler. So give up. No hardcoding. This affects only cannam@86: dnl very old systems. cannam@86: dnl FIXME: Not sure whether we should use cannam@86: dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" cannam@86: dnl here. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: else cannam@86: if test "X$found_a" != "X"; then cannam@86: dnl Linking with a static library. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" cannam@86: else cannam@86: dnl We shouldn't come here, but anyway it's good to have a cannam@86: dnl fallback. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" cannam@86: fi cannam@86: fi cannam@86: dnl Assume the include files are nearby. cannam@86: additional_includedir= cannam@86: case "$found_dir" in cannam@86: */lib | */lib/) cannam@86: basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` cannam@86: additional_includedir="$basedir/include" cannam@86: ;; cannam@86: esac cannam@86: if test "X$additional_includedir" != "X"; then cannam@86: dnl Potentially add $additional_includedir to $INCNAME. cannam@86: dnl But don't add it cannam@86: dnl 1. if it's the standard /usr/include, cannam@86: dnl 2. if it's /usr/local/include and we are using GCC on Linux, cannam@86: dnl 3. if it's already present in $CPPFLAGS or the already cannam@86: dnl constructed $INCNAME, cannam@86: dnl 4. if it doesn't exist as a directory. cannam@86: if test "X$additional_includedir" != "X/usr/include"; then cannam@86: haveit= cannam@86: if test "X$additional_includedir" = "X/usr/local/include"; then cannam@86: if test -n "$GCC"; then cannam@86: case $host_os in cannam@86: linux* | gnu* | k*bsd*-gnu) haveit=yes;; cannam@86: esac cannam@86: fi cannam@86: fi cannam@86: if test -z "$haveit"; then cannam@86: for x in $CPPFLAGS $INC[]NAME; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-I$additional_includedir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: if test -d "$additional_includedir"; then cannam@86: dnl Really add $additional_includedir to $INCNAME. cannam@86: INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: dnl Look for dependencies. cannam@86: if test -n "$found_la"; then cannam@86: dnl Read the .la file. It defines the variables cannam@86: dnl dlname, library_names, old_library, dependency_libs, current, cannam@86: dnl age, revision, installed, dlopen, dlpreopen, libdir. cannam@86: save_libdir="$libdir" cannam@86: case "$found_la" in cannam@86: */* | *\\*) . "$found_la" ;; cannam@86: *) . "./$found_la" ;; cannam@86: esac cannam@86: libdir="$save_libdir" cannam@86: dnl We use only dependency_libs. cannam@86: for dep in $dependency_libs; do cannam@86: case "$dep" in cannam@86: -L*) cannam@86: additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` cannam@86: dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. cannam@86: dnl But don't add it cannam@86: dnl 1. if it's the standard /usr/lib, cannam@86: dnl 2. if it's /usr/local/lib and we are using GCC on Linux, cannam@86: dnl 3. if it's already present in $LDFLAGS or the already cannam@86: dnl constructed $LIBNAME, cannam@86: dnl 4. if it doesn't exist as a directory. cannam@86: if test "X$additional_libdir" != "X/usr/lib"; then cannam@86: haveit= cannam@86: if test "X$additional_libdir" = "X/usr/local/lib"; then cannam@86: if test -n "$GCC"; then cannam@86: case $host_os in cannam@86: linux* | gnu* | k*bsd*-gnu) haveit=yes;; cannam@86: esac cannam@86: fi cannam@86: fi cannam@86: if test -z "$haveit"; then cannam@86: haveit= cannam@86: for x in $LDFLAGS $LIB[]NAME; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-L$additional_libdir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: if test -d "$additional_libdir"; then cannam@86: dnl Really add $additional_libdir to $LIBNAME. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" cannam@86: fi cannam@86: fi cannam@86: haveit= cannam@86: for x in $LDFLAGS $LTLIB[]NAME; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X-L$additional_libdir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: if test -d "$additional_libdir"; then cannam@86: dnl Really add $additional_libdir to $LTLIBNAME. cannam@86: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: ;; cannam@86: -R*) cannam@86: dir=`echo "X$dep" | sed -e 's/^X-R//'` cannam@86: if test "$enable_rpath" != no; then cannam@86: dnl Potentially add DIR to rpathdirs. cannam@86: dnl The rpathdirs will be appended to $LIBNAME at the end. cannam@86: haveit= cannam@86: for x in $rpathdirs; do cannam@86: if test "X$x" = "X$dir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: rpathdirs="$rpathdirs $dir" cannam@86: fi cannam@86: dnl Potentially add DIR to ltrpathdirs. cannam@86: dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. cannam@86: haveit= cannam@86: for x in $ltrpathdirs; do cannam@86: if test "X$x" = "X$dir"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: ltrpathdirs="$ltrpathdirs $dir" cannam@86: fi cannam@86: fi cannam@86: ;; cannam@86: -l*) cannam@86: dnl Handle this in the next round. cannam@86: names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` cannam@86: ;; cannam@86: *.la) cannam@86: dnl Handle this in the next round. Throw away the .la's cannam@86: dnl directory; it is already contained in a preceding -L cannam@86: dnl option. cannam@86: names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` cannam@86: ;; cannam@86: *) cannam@86: dnl Most likely an immediate library name. cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" cannam@86: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" cannam@86: ;; cannam@86: esac cannam@86: done cannam@86: fi cannam@86: else cannam@86: dnl Didn't find the library; assume it is in the system directories cannam@86: dnl known to the linker and runtime loader. (All the system cannam@86: dnl directories known to the linker should also be known to the cannam@86: dnl runtime loader, otherwise the system is severely misconfigured.) cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" cannam@86: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: done cannam@86: done cannam@86: if test "X$rpathdirs" != "X"; then cannam@86: if test -n "$hardcode_libdir_separator"; then cannam@86: dnl Weird platform: only the last -rpath option counts, the user must cannam@86: dnl pass all path elements in one option. We can arrange that for a cannam@86: dnl single library, but not when more than one $LIBNAMEs are used. cannam@86: alldirs= cannam@86: for found_dir in $rpathdirs; do cannam@86: alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" cannam@86: done cannam@86: dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. cannam@86: acl_save_libdir="$libdir" cannam@86: libdir="$alldirs" cannam@86: eval flag=\"$hardcode_libdir_flag_spec\" cannam@86: libdir="$acl_save_libdir" cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" cannam@86: else cannam@86: dnl The -rpath options are cumulative. cannam@86: for found_dir in $rpathdirs; do cannam@86: acl_save_libdir="$libdir" cannam@86: libdir="$found_dir" cannam@86: eval flag=\"$hardcode_libdir_flag_spec\" cannam@86: libdir="$acl_save_libdir" cannam@86: LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" cannam@86: done cannam@86: fi cannam@86: fi cannam@86: if test "X$ltrpathdirs" != "X"; then cannam@86: dnl When using libtool, the option that works for both libraries and cannam@86: dnl executables is -R. The -R options are cumulative. cannam@86: for found_dir in $ltrpathdirs; do cannam@86: LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" cannam@86: done cannam@86: fi cannam@86: ]) cannam@86: cannam@86: dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, cannam@86: dnl unless already present in VAR. cannam@86: dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes cannam@86: dnl contains two or three consecutive elements that belong together. cannam@86: AC_DEFUN([AC_LIB_APPENDTOVAR], cannam@86: [ cannam@86: for element in [$2]; do cannam@86: haveit= cannam@86: for x in $[$1]; do cannam@86: AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) cannam@86: if test "X$x" = "X$element"; then cannam@86: haveit=yes cannam@86: break cannam@86: fi cannam@86: done cannam@86: if test -z "$haveit"; then cannam@86: [$1]="${[$1]}${[$1]:+ }$element" cannam@86: fi cannam@86: done cannam@86: ]) cannam@86: cannam@86: # lib-ld.m4 serial 3 (gettext-0.13) cannam@86: dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. cannam@86: dnl This file is free software; the Free Software Foundation cannam@86: dnl gives unlimited permission to copy and/or distribute it, cannam@86: dnl with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: dnl Subroutines of libtool.m4, cannam@86: dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision cannam@86: dnl with libtool.m4. cannam@86: cannam@86: dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. cannam@86: AC_DEFUN([AC_LIB_PROG_LD_GNU], cannam@86: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, cannam@86: [# I'd rather use --version here, but apparently some GNU ld's only accept -v. cannam@86: case `$LD -v 2>&1 conf$$.sh cannam@86: echo "exit 0" >>conf$$.sh cannam@86: chmod +x conf$$.sh cannam@86: if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then cannam@86: PATH_SEPARATOR=';' cannam@86: else cannam@86: PATH_SEPARATOR=: cannam@86: fi cannam@86: rm -f conf$$.sh cannam@86: fi cannam@86: ac_prog=ld cannam@86: if test "$GCC" = yes; then cannam@86: # Check if gcc -print-prog-name=ld gives a path. cannam@86: AC_MSG_CHECKING([for ld used by GCC]) cannam@86: case $host in cannam@86: *-*-mingw*) cannam@86: # gcc leaves a trailing carriage return which upsets mingw cannam@86: ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; cannam@86: *) cannam@86: ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; cannam@86: esac cannam@86: case $ac_prog in cannam@86: # Accept absolute paths. cannam@86: [[\\/]* | [A-Za-z]:[\\/]*)] cannam@86: [re_direlt='/[^/][^/]*/\.\./'] cannam@86: # Canonicalize the path of ld cannam@86: ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` cannam@86: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do cannam@86: ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` cannam@86: done cannam@86: test -z "$LD" && LD="$ac_prog" cannam@86: ;; cannam@86: "") cannam@86: # If it fails, then pretend we aren't using GCC. cannam@86: ac_prog=ld cannam@86: ;; cannam@86: *) cannam@86: # If it is relative, then search for the first ld in PATH. cannam@86: with_gnu_ld=unknown cannam@86: ;; cannam@86: esac cannam@86: elif test "$with_gnu_ld" = yes; then cannam@86: AC_MSG_CHECKING([for GNU ld]) cannam@86: else cannam@86: AC_MSG_CHECKING([for non-GNU ld]) cannam@86: fi cannam@86: AC_CACHE_VAL(acl_cv_path_LD, cannam@86: [if test -z "$LD"; then cannam@86: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" cannam@86: for ac_dir in $PATH; do cannam@86: test -z "$ac_dir" && ac_dir=. cannam@86: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then cannam@86: acl_cv_path_LD="$ac_dir/$ac_prog" cannam@86: # Check to see if the program is GNU ld. I'd rather use --version, cannam@86: # but apparently some GNU ld's only accept -v. cannam@86: # Break only if it was the GNU/non-GNU ld that we prefer. cannam@86: case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in cannam@86: *GNU* | *'with BFD'*) cannam@86: test "$with_gnu_ld" != no && break ;; cannam@86: *) cannam@86: test "$with_gnu_ld" != yes && break ;; cannam@86: esac cannam@86: fi cannam@86: done cannam@86: IFS="$ac_save_ifs" cannam@86: else cannam@86: acl_cv_path_LD="$LD" # Let the user override the test with a path. cannam@86: fi]) cannam@86: LD="$acl_cv_path_LD" cannam@86: if test -n "$LD"; then cannam@86: AC_MSG_RESULT($LD) cannam@86: else cannam@86: AC_MSG_RESULT(no) cannam@86: fi cannam@86: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) cannam@86: AC_LIB_PROG_LD_GNU cannam@86: ]) cannam@86: cannam@86: # codeset.m4 serial AM1 (gettext-0.10.40) cannam@86: dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. cannam@86: dnl This file is free software; the Free Software Foundation cannam@86: dnl gives unlimited permission to copy and/or distribute it, cannam@86: dnl with or without modifications, as long as this notice is preserved. cannam@86: cannam@86: dnl From Bruno Haible. cannam@86: cannam@86: AC_DEFUN([AM_LANGINFO_CODESET], cannam@86: [ cannam@86: AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, cannam@86: [AC_TRY_LINK([#include ], cannam@86: [char* cs = nl_langinfo(CODESET);], cannam@86: am_cv_langinfo_codeset=yes, cannam@86: am_cv_langinfo_codeset=no) cannam@86: ]) cannam@86: if test $am_cv_langinfo_codeset = yes; then cannam@86: AC_DEFINE(HAVE_LANGINFO_CODESET, 1, cannam@86: [Define if you have and nl_langinfo(CODESET).]) cannam@86: fi cannam@86: ]) cannam@86: