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