mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-15 21:50:39 +08:00
libtool.m4, [...]: New files from the libtool CVS tree multi-language branch.
2000-07-28 Alexandre Oliva <aoliva@redhat.com> * libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: New files from the libtool CVS tree multi-language branch. * ltconfig, ltmain.sh: Updated. From-SVN: r35323
This commit is contained in:
parent
3df6463367
commit
4f4caf92a3
@ -1,3 +1,9 @@
|
||||
2000-07-28 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: New files from
|
||||
the libtool CVS tree multi-language branch.
|
||||
* ltconfig, ltmain.sh: Updated.
|
||||
|
||||
2000-07-27 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* Makefile.in (clean-target-libgcc): Remove gcc/libgcc.
|
||||
|
824
libtool.m4
vendored
Normal file
824
libtool.m4
vendored
Normal file
@ -0,0 +1,824 @@
|
||||
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 45 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])
|
||||
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
|
||||
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[AC_LIBTOOL_CXX],
|
||||
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
|
||||
])])
|
||||
|
||||
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
|
||||
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
|
||||
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
|
||||
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
||||
[AC_LIBTOOL_GCJ],
|
||||
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
|
||||
[AC_LIBTOOL_GCJ],
|
||||
[ifdef([AC_PROG_GCJ],
|
||||
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
|
||||
])])
|
||||
ifdef([A][M_PROG_GCJ],
|
||||
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
|
||||
])])])])])
|
||||
|
||||
AC_DEFUN(_AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
|
||||
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
||||
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
||||
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
|
||||
AC_REQUIRE([AC_OBJEXT])dnl
|
||||
AC_REQUIRE([AC_EXEEXT])dnl
|
||||
dnl
|
||||
|
||||
# Only perform the check for file, if the check method requires it
|
||||
case "$deplibs_check_method" in
|
||||
file_magic*)
|
||||
if test "$file_magic_cmd" = '${MAGIC}'; then
|
||||
AC_PATH_MAGIC
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
AC_CHECK_TOOL(STRIP, strip, :)
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
AC_ARG_WITH(pic,
|
||||
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
||||
pic_mode="$withval", pic_mode=default)
|
||||
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
|
||||
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
|
||||
AC_LANG_RESTORE])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
||||
# recent cygwin and mingw systems supply a stub DllMain which the user
|
||||
# can override, but on older systems we have to supply one
|
||||
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
|
||||
[AC_TRY_LINK([],
|
||||
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
|
||||
DllMain (0, 0, 0);],
|
||||
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
|
||||
|
||||
case "$host/$CC" in
|
||||
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
|
||||
# old mingw systems require "-dll" to link a DLL, while more recent ones
|
||||
# require "-mdll"
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -mdll"
|
||||
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
|
||||
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
|
||||
CFLAGS="$SAVE_CFLAGS" ;;
|
||||
*-*-cygwin*)
|
||||
# cygwin systems need to pass --dll to the linker, and not link
|
||||
# crt.o which will require a WinMain@16 definition.
|
||||
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
|
||||
esac
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
|
||||
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
|
||||
# Where MODE is either `yes' or `no'. If omitted, it defaults to
|
||||
# `both'.
|
||||
AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
pic_mode=ifelse($#,1,$1,default)])
|
||||
|
||||
|
||||
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
|
||||
AC_DEFUN(AC_PATH_TOOL_PREFIX,
|
||||
[AC_MSG_CHECKING([for $1])
|
||||
AC_CACHE_VAL(lt_cv_path_MAGIC,
|
||||
[case "$MAGIC" in
|
||||
/*)
|
||||
lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
|
||||
;;
|
||||
?:/*)
|
||||
ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
|
||||
;;
|
||||
*)
|
||||
ac_save_MAGIC="$MAGIC"
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
dnl $ac_dummy forces splitting on constant user-supplied paths.
|
||||
dnl POSIX.2 word splitting is done only on the output of word expansions,
|
||||
dnl not every word. This closes a longstanding sh security hole.
|
||||
ac_dummy="ifelse([$2], , $PATH, [$2])"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$1; then
|
||||
lt_cv_path_MAGIC="$ac_dir/$1"
|
||||
if test -n "$file_magic_test_file"; then
|
||||
case "$deplibs_check_method" in
|
||||
"file_magic "*)
|
||||
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
|
||||
MAGIC="$lt_cv_path_MAGIC"
|
||||
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
|
||||
egrep "$file_magic_regex" > /dev/null; then
|
||||
:
|
||||
else
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: the command libtool uses to detect shared libraries,
|
||||
*** $file_magic_cmd, produces output that libtool cannot recognize.
|
||||
*** The result is that libtool may fail to recognize shared libraries
|
||||
*** as such. This will affect the creation of libtool libraries that
|
||||
*** depend on shared libraries, but programs linked with such libtool
|
||||
*** libraries will work regardless of this problem. Nevertheless, you
|
||||
*** may want to report the problem to your system manager and/or to
|
||||
*** bug-libtool@gnu.org
|
||||
|
||||
EOF
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
MAGIC="$ac_save_MAGIC"
|
||||
;;
|
||||
esac])
|
||||
MAGIC="$lt_cv_path_MAGIC"
|
||||
if test -n "$MAGIC"; then
|
||||
AC_MSG_RESULT($MAGIC)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PATH_MAGIC - find a file program which can recognise a shared library
|
||||
AC_DEFUN(AC_PATH_MAGIC,
|
||||
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
|
||||
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
|
||||
if test -z "$lt_cv_path_MAGIC"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
|
||||
else
|
||||
MAGIC=:
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
with_gnu_ld=$ac_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
|
||||
# -- PORTME Some linkers may need a different reload flag.
|
||||
AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
|
||||
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
|
||||
[lt_cv_ld_reload_flag='-r'])
|
||||
reload_flag=$lt_cv_ld_reload_flag
|
||||
test -n "$reload_flag" && reload_flag=" $reload_flag"
|
||||
])
|
||||
|
||||
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
||||
# -- PORTME fill in with the dynamic library characteristics
|
||||
AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
|
||||
[AC_CACHE_CHECK([how to recognise dependant libraries],
|
||||
lt_cv_deplibs_check_method,
|
||||
[lt_cv_file_magic_cmd='${MAGIC}'
|
||||
lt_cv_file_magic_test_file=
|
||||
lt_cv_deplibs_check_method='unknown'
|
||||
# Need to set the preceding variable on all platforms that support
|
||||
# interlibrary dependencies.
|
||||
# 'none' -- dependencies not supported.
|
||||
# `unknown' -- same as none, but documents that we really don't know.
|
||||
# 'pass_all' -- all dependencies passed with no checks.
|
||||
# 'test_compile' -- check by making test program.
|
||||
# 'file_magic [regex]' -- check by looking for files in library path
|
||||
# which responds to the $file_magic_cmd with a given egrep regex.
|
||||
# If you have `file' or equivalent on your system and you're not sure
|
||||
# whether `pass_all' will *always* work, you probably want this one.
|
||||
|
||||
case "$host_os" in
|
||||
aix4*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
beos*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
changequote(,)dnl
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
||||
changequote([, ])dnl
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
||||
lt_cv_file_magic_cmd='${OBJDUMP} -f'
|
||||
;;
|
||||
|
||||
freebsd* )
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
case "$host_cpu" in
|
||||
i*86 )
|
||||
changequote(,)dnl
|
||||
lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 demand paged shared library'
|
||||
changequote([, ])dnl
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
esac
|
||||
else
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
fi
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
hpux10.20*)
|
||||
# TODO: Does this work for hpux-11 too?
|
||||
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_test_file=/usr/lib/libc.sl
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
||||
;;
|
||||
*)
|
||||
case "$LD" in
|
||||
*-32|*"-32 ") libmagic=32-bit;;
|
||||
*-n32|*"-n32 ") libmagic=N32;;
|
||||
*-64|*"-64 ") libmagic=64-bit;;
|
||||
*) libmagic=never-match;;
|
||||
esac
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
changequote(,)dnl
|
||||
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
|
||||
changequote([, ])dnl
|
||||
;;
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
linux-gnu*)
|
||||
case "$host_cpu" in
|
||||
alpha* | i*86 | powerpc* | sparc* | ia64* )
|
||||
lt_cv_deplibs_check_method=pass_all ;;
|
||||
*)
|
||||
# glibc up to 2.1.1 does not perform some relocations on ARM
|
||||
changequote(,)dnl
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
|
||||
changequote([, ])dnl
|
||||
esac
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
|
||||
else
|
||||
changequote(,)dnl
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
|
||||
changequote([, ])dnl
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
||||
fi
|
||||
;;
|
||||
|
||||
osf3* | osf4* | osf5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
lt_cv_file_magic_test_file=/lib/libc.so
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
case "$host_vendor" in
|
||||
ncr)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
motorola)
|
||||
changequote(,)dnl
|
||||
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]'
|
||||
changequote([, ])dnl
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
])
|
||||
file_magic_cmd=$lt_cv_file_magic_cmd
|
||||
deplibs_check_method=$lt_cv_deplibs_check_method
|
||||
])
|
||||
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
tmp_nm=$ac_dir/${ac_tool_prefix}nm
|
||||
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$tmp_nm -B"
|
||||
break
|
||||
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$tmp_nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library and INCLTDL to the include flags for
|
||||
# the libltdl header and adds --enable-ltdl-convenience to the
|
||||
# configure arguments. Note that LIBLTDL and INCLTDL are not
|
||||
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
||||
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
||||
# with '${top_builddir}/' and INCLTDL will be prefixed with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
||||
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library and INCLTDL to the include flags for
|
||||
# the libltdl header and adds --enable-ltdl-install to the configure
|
||||
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
||||
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
||||
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
||||
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
||||
# with '${top_srcdir}/' (note the single quotes!). If your package is
|
||||
# not flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
||||
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
# If this macro is not defined by Autoconf, define it here.
|
||||
ifdef([AC_PROVIDE_IFELSE],
|
||||
[],
|
||||
[define([AC_PROVIDE_IFELSE],
|
||||
[ifdef([AC_PROVIDE_$1],
|
||||
[$2], [$3])])])
|
||||
|
||||
# AC_LIBTOOL_CXX - enable support for C++ libraries
|
||||
AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])
|
||||
AC_DEFUN(_AC_LIBTOOL_CXX,
|
||||
[AC_REQUIRE([AC_PROG_LIBTOOL])
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])
|
||||
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
|
||||
lt_save_CC="$CC"
|
||||
lt_save_CFLAGS="$CFLAGS"
|
||||
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
||||
dnl is set to the C++ compiler.
|
||||
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
||||
deplibs_check_method="$deplibs_check_method" \
|
||||
file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
||||
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|
||||
|| AC_MSG_ERROR([libtool tag configuration failed])
|
||||
CC="$lt_save_CC"
|
||||
CFLAGS="$lt_save_CFLAGS"
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
|
||||
AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
|
||||
AC_DEFUN(_AC_LIBTOOL_GCJ,
|
||||
[AC_REQUIRE([AC_PROG_LIBTOOL])
|
||||
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
|
||||
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
|
||||
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
|
||||
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
|
||||
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])
|
||||
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
|
||||
lt_save_CC="$CC"
|
||||
lt_save_CFLAGS="$CFLAGS"
|
||||
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
||||
dnl is set to the C++ compiler.
|
||||
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \
|
||||
MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
||||
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
||||
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
||||
deplibs_check_method="$deplibs_check_method" \
|
||||
file_magic_cmd="$file_magic_cmd" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
||||
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
|
||||
|| AC_MSG_ERROR([libtool tag configuration failed])
|
||||
CC="$lt_save_CC"
|
||||
CFLAGS="$lt_save_CFLAGS"
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
688
ltcf-c.sh
Normal file
688
ltcf-c.sh
Normal file
@ -0,0 +1,688 @@
|
||||
#### This script is meant to be sourced by ltconfig.
|
||||
|
||||
# $Id: ltcf-c.sh,v 1.1.2.9 2000/07/24 05:28:14 oliva Exp $
|
||||
|
||||
# ltcf-c.sh - Create a C compiler specific configuration
|
||||
#
|
||||
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Source file extension for C test sources.
|
||||
ac_ext=c
|
||||
|
||||
# Object file extension for compiled C test sources.
|
||||
objext=o
|
||||
|
||||
# Code to be used in simple compile tests
|
||||
lt_simple_compile_test_code="int some_variable = 0;"
|
||||
|
||||
# Code to be used in simple link tests
|
||||
lt_simple_link_test_code='main(){return(0);}'
|
||||
|
||||
## Linker Characteristics
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$with_gcc" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# If archive_cmds runs LD, not CC, wlarc should be empty
|
||||
wlarc='${wl}'
|
||||
|
||||
# See if GNU ld supports shared libraries.
|
||||
case "$host_os" in
|
||||
aix3* | aix4*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
|
||||
*** to be unable to reliably create shared libraries on AIX.
|
||||
*** Therefore, libtool is disabling shared libraries support. If you
|
||||
*** really care for shared libraries, you may want to modify your PATH
|
||||
*** so that a non-GNU linker is found, and then restart.
|
||||
|
||||
EOF
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
allow_undefined_flag=unsupported
|
||||
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
|
||||
# support --undefined. This deserves some investigation. FIXME
|
||||
archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
|
||||
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
|
||||
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
|
||||
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
|
||||
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
|
||||
else $CC -o impgen impgen.c ; fi)~
|
||||
$output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
|
||||
|
||||
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
|
||||
|
||||
# cygwin and mingw dlls have different entry points and sets of symbols
|
||||
# to exclude.
|
||||
# FIXME: what about values for MSVC?
|
||||
dll_entry=__cygwin_dll_entry@12
|
||||
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
# mingw values
|
||||
dll_entry=_DllMainCRTStartup@12
|
||||
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
|
||||
;;
|
||||
esac
|
||||
|
||||
# mingw and cygwin differ, and it's simplest to just exclude the union
|
||||
# of the two symbol sets.
|
||||
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
|
||||
|
||||
# recent cygwin and mingw systems supply a stub DllMain which the user
|
||||
# can override, but on older systems we have to supply one (in ltdll.c)
|
||||
if test "x$lt_cv_need_dllmain" = "xyes"; then
|
||||
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
|
||||
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
|
||||
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
|
||||
else
|
||||
ltdll_obj=
|
||||
ltdll_cmds=
|
||||
fi
|
||||
|
||||
# Extract the symbol export list from an `--export-all' def file,
|
||||
# then regenerate the def file from the symbol export list, so that
|
||||
# the compiled dll only exports the symbol export list.
|
||||
# Be careful not to strip the DATA tag left be newer dlltools.
|
||||
export_symbols_cmds="$ltdll_cmds"'
|
||||
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
|
||||
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
|
||||
|
||||
# If DATA tags from a recent dlltool are present, honour them!
|
||||
archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
|
||||
_lt_hint=1;
|
||||
cat $export_symbols | while read symbol; do
|
||||
set dummy \$symbol;
|
||||
case \$# in
|
||||
2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
|
||||
*) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
|
||||
esac;
|
||||
_lt_hint=`expr 1 + \$_lt_hint`;
|
||||
done~
|
||||
'"$ltdll_cmds"'
|
||||
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
|
||||
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
else
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
fi
|
||||
;;
|
||||
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
|
||||
*** create shared libraries on Solaris systems. Therefore, libtool
|
||||
*** is disabling shared libraries support. We urge you to upgrade GNU
|
||||
*** binutils to release 2.9.1 or newer. Another option is to modify
|
||||
*** your PATH or compiler configuration so that the native linker is
|
||||
*** used, and then restart.
|
||||
|
||||
EOF
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
wlarc=
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ld_shlibs" = yes; then
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_libdir_flag_spec="$wlarc"'--rpath '"$wlarc"'$libdir'
|
||||
export_dynamic_flag_spec="$wlarc"'--export-dynamic'
|
||||
case $host_os in
|
||||
cygwin* | mingw*)
|
||||
# dlltool doesn't understand --whole-archive et. al.
|
||||
whole_archive_flag_spec=
|
||||
;;
|
||||
*)
|
||||
# ancient GNU ld didn't support --whole-archive et. al.
|
||||
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
|
||||
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
|
||||
else
|
||||
whole_archive_flag_spec=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
# PORTME fill in a description of your system's linker (not GNU ld)
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
|
||||
aix4*)
|
||||
hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$with_gcc" = yes; then
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
# It fails to find uninstalled libraries when the uninstalled
|
||||
# path is not listed in the libpath. Setting hardcode_minus_L
|
||||
# to unsupported forces relinking
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
shared_flag='-shared'
|
||||
else
|
||||
shared_flag='${wl}-bM:SRE'
|
||||
hardcode_direct=yes
|
||||
fi
|
||||
allow_undefined_flag=' ${wl}-berok'
|
||||
archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
|
||||
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
|
||||
case "$host_os" in aix4.[01]|aix4.[01].*)
|
||||
# According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
|
||||
always_export_symbols=yes ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
libext=lib
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
|
||||
# The linker will automatically build a .lib file if we build a DLL.
|
||||
old_archive_from_new_cmds='true'
|
||||
# FIXME: Should let the user specify the lib program.
|
||||
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
|
||||
fix_srcfile_path='`cygpath -w $srcfile`'
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
# extra space).
|
||||
freebsd2.2*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||
freebsd2*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd*)
|
||||
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$host_os" in
|
||||
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
|
||||
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
|
||||
esac
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
if test "$with_gcc" = yes; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||
else
|
||||
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
|
||||
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
if test "$with_gcc" = yes; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
allow_undefined_flag=' -expect_unresolved \*'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
|
||||
osf4* | osf5*) # as osf3* with the addition of -msym flag
|
||||
if test "$with_gcc" = yes; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
allow_undefined_flag=' -expect_unresolved \*'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_runpath_var=yes
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
case "$host_os" in
|
||||
solaris2.[0-5] | solaris2.[0-5].*) ;;
|
||||
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
|
||||
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
|
||||
esac
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
sysv4)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
runpath_var='LD_RUN_PATH'
|
||||
hardcode_shlibpath_var=no
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
|
||||
sysv4.3*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
export_dynamic_flag_spec='-Bexport'
|
||||
;;
|
||||
|
||||
sysv5*)
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var='LD_RUN_PATH'
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_runpath_var=yes
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
|
||||
sysv4.2uw2*)
|
||||
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
hardcode_shlibpath_var=no
|
||||
hardcode_runpath_var=yes
|
||||
runpath_var=LD_RUN_PATH
|
||||
;;
|
||||
|
||||
unixware7*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
runpath_var='LD_RUN_PATH'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
## Compiler Characteristics: PIC flags, static flags, etc
|
||||
if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_cv_prog_cc_pic=
|
||||
ac_cv_prog_cc_shlib=
|
||||
ac_cv_prog_cc_wl=
|
||||
ac_cv_prog_cc_static=
|
||||
ac_cv_prog_cc_no_builtin=
|
||||
ac_cv_prog_cc_can_build_shared=$can_build_shared
|
||||
|
||||
if test "$with_gcc" = yes; then
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-static'
|
||||
|
||||
case "$host_os" in
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
aix*)
|
||||
# Below there is a dirty hack to force normal static linking with -ldl
|
||||
# The problem is because libdl dynamically linked with both libc and
|
||||
# libC (AIX C++ library), which obviously doesn't included in libraries
|
||||
# list by gcc. This cause undefined symbols with -static flags.
|
||||
# This hack allows C programs to be linked with "-static -ldl", but
|
||||
# we not sure about C++ programs.
|
||||
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
|
||||
;;
|
||||
cygwin* | mingw* | os2*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
ac_cv_prog_cc_pic='-DDLL_EXPORT'
|
||||
;;
|
||||
amigaos*)
|
||||
# FIXME: we need at least 68020 code to build shared libraries, but
|
||||
# adding the `-m68020' flag to GCC prevents building anything better,
|
||||
# like `-m68040'.
|
||||
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ac_cv_prog_cc_pic=-Kconform_pic
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
ac_cv_prog_cc_pic='-fPIC'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# PORTME Check for PIC flags for the system compiler.
|
||||
case "$host_os" in
|
||||
aix3* | aix4*)
|
||||
# All AIX code is PIC.
|
||||
ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
|
||||
;;
|
||||
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
# Is there a better ac_cv_prog_cc_static that works with the bundled CC?
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
|
||||
ac_cv_prog_cc_pic='+Z'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-non_shared'
|
||||
# PIC (with -KPIC) is the default.
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | os2*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
ac_cv_prog_cc_pic='-DDLL_EXPORT'
|
||||
;;
|
||||
|
||||
osf3* | osf4* | osf5*)
|
||||
# All OSF/1 code is PIC.
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-non_shared'
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
ac_cv_prog_cc_pic='-Kpic'
|
||||
ac_cv_prog_cc_static='-dn'
|
||||
ac_cv_prog_cc_shlib='-belf'
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
ac_cv_prog_cc_pic='-PIC'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
ac_cv_prog_cc_wl='-Qoption ld '
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
ac_cv_prog_cc_pic='-pic'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
;;
|
||||
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec ;then
|
||||
ac_cv_prog_cc_pic='-Kconform_pic'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
ac_cv_prog_cc_can_build_shared=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
|
||||
fi
|
||||
|
||||
need_lc=yes
|
||||
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
|
||||
case "$archive_cmds" in
|
||||
*'~'*)
|
||||
# FIXME: we may have to deal with multi-command sequences.
|
||||
;;
|
||||
'$CC '*)
|
||||
# Test whether the compiler implicitly links with -lc since on some
|
||||
# systems, -lgcc has to come before -lc. If gcc already passes -lc
|
||||
# to ld, don't add -lc before -lgcc.
|
||||
echo $ac_n "checking whether -lc is implicitly linked in... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
need_lc=$ac_cv_archive_cmds_needs_lc
|
||||
else
|
||||
$rm conftest*
|
||||
echo "static int dummy;" > conftest.$ac_ext
|
||||
if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
|
||||
# Append any warnings to the config.log.
|
||||
cat conftest.err 1>&5
|
||||
soname=conftest
|
||||
lib=conftest
|
||||
libobjs=conftest.o
|
||||
deplibs=
|
||||
compiler_flags=-v
|
||||
linker_flags=-v
|
||||
verstring=
|
||||
output_objdir=.
|
||||
libname=conftest
|
||||
allow_undefined_flag=
|
||||
if { (eval echo $progname:@LINENO@: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
|
||||
need_lc=no
|
||||
fi
|
||||
else
|
||||
cat conftest.err 1>&5
|
||||
fi
|
||||
fi
|
||||
$rm conftest*
|
||||
echo "$ac_t$need_lc" 1>&6
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
ac_cv_archive_cmds_needs_lc=$need_lc
|
920
ltcf-cxx.sh
Normal file
920
ltcf-cxx.sh
Normal file
@ -0,0 +1,920 @@
|
||||
#### This script is meant to be sourced by ltconfig.
|
||||
|
||||
# $Id: ltcf-cxx.sh,v 1.1.2.18 2000/07/24 06:10:27 oliva Exp $
|
||||
|
||||
# ltcf-cxx.sh - Create a C++ compiler specific configuration
|
||||
#
|
||||
# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# Original C++ support by:
|
||||
# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
|
||||
# Ossama Othman <ossama@debian.org>
|
||||
# Thomas Thanner <tanner@gmx.de>
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Source file extension for C++ test sources.
|
||||
ac_ext=cc
|
||||
|
||||
# Object file extension for compiled C++ test sources.
|
||||
objext=o
|
||||
|
||||
# Code to be used in simple compile tests
|
||||
lt_simple_compile_test_code="int some_variable = 0;"
|
||||
|
||||
# Code to be used in simple link tests
|
||||
lt_simple_link_test_code='int main(int, char *[]) { return (0); }'
|
||||
|
||||
# C++ compiler
|
||||
CXX=${CXX-c++}
|
||||
|
||||
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
|
||||
CC=${CC-"$CXX"}
|
||||
CFLAGS=${CFLAGS-"$CXXFLAGS"}
|
||||
|
||||
# Allow CC to be a program name with arguments.
|
||||
set dummy $CC
|
||||
compiler=$2
|
||||
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
|
||||
|
||||
# Check if we are using GNU gcc (taken/adapted from configure script)
|
||||
# We need to check here since "--with-gcc" is set at configure time,
|
||||
# not ltconfig time!
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
with_gcc=yes
|
||||
|
||||
# Set up default GNU C++ configuration
|
||||
|
||||
# Check if GNU C++ uses GNU ld as the underlying linker, since the
|
||||
# archiving commands below assume that GNU ld is being used.
|
||||
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
|
||||
egrep 'GNU ld' > /dev/null; then
|
||||
with_gnu_ld=yes
|
||||
|
||||
archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
|
||||
export_dynamic_flag_spec='${wl}--export-dynamic'
|
||||
|
||||
# If archive_cmds runs LD, not CC, wlarc should be empty
|
||||
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
|
||||
# investigate it a little bit more. (MM)
|
||||
wlarc='${wl}'
|
||||
|
||||
# ancient GNU ld didn't support --whole-archive et. al.
|
||||
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
|
||||
egrep 'no-whole-archive' > /dev/null; then
|
||||
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
|
||||
else
|
||||
whole_archive_flag_spec=
|
||||
fi
|
||||
else
|
||||
with_gnu_ld=no
|
||||
wlarc=
|
||||
|
||||
# A generic and very simple default shared library creation
|
||||
# command for GNU C++ for the case where it uses the native
|
||||
# linker, instead of GNU ld. If possible, this setting should
|
||||
# overridden to take advantage of the native linker features on
|
||||
# the platform it is being used on.
|
||||
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
fi
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
|
||||
else
|
||||
with_gcc=no
|
||||
with_gnu_ld=no
|
||||
wlarc=
|
||||
fi
|
||||
|
||||
# In general, the C++ compiler should always link C++ objects.
|
||||
case $target in
|
||||
*aix3* | *aix4*)
|
||||
# AIX just has to be different, doesn't it? :-\
|
||||
LD=makeC++SharedLib_r
|
||||
LDFLAGS="$LDFLAGS -p 0"
|
||||
;;
|
||||
*)
|
||||
LD="$CC"
|
||||
LDFLAGS="$LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# PORTME: fill in a description of your system's C++ link characteristics
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
aix4*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
chorus*)
|
||||
case "$cc_basename" in
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
dgux*)
|
||||
case "$cc_basename" in
|
||||
ec++)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
ghcx)
|
||||
# Green Hills C++ Compiler
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd*)
|
||||
# FreeBSD uses GNU C++ and GNU ld
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
hpux*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
aCC)
|
||||
case "$host_os" in
|
||||
hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
|
||||
*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;;
|
||||
esac
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# SGI C++
|
||||
archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
;;
|
||||
*)
|
||||
if test "$with_gcc" = yes; then
|
||||
if test "$with_gnu_ld" = no; then
|
||||
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
archive_cmds='$LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
|
||||
fi
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*)
|
||||
case "$cc_basename" in
|
||||
KCC)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
||||
# KCC will only create a shared library if the output file
|
||||
# ends with ".so" (or ".sl" for HP-UX), so rename the library
|
||||
# to its proper name (with version) after linking.
|
||||
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib'
|
||||
archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
|
||||
export_dynamic_flag_spec='${wl}--export-dynamic'
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
|
||||
old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
|
||||
;;
|
||||
cxx)
|
||||
# Compaq C++
|
||||
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
|
||||
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='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'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
lynxos*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
m88k*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
mvs*)
|
||||
case "$cc_basename" in
|
||||
cxx)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
osf3*)
|
||||
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$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}${objdir}/so_locations -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
fi
|
||||
|
||||
case "$cc_basename" in
|
||||
KCC)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
||||
# KCC will only create a shared library if the output file
|
||||
# ends with ".so" (or ".sl" for HP-UX), so rename the library
|
||||
# to its proper name (with version) after linking.
|
||||
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
|
||||
old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
|
||||
|
||||
;;
|
||||
RCC)
|
||||
# Rational C++ 2.4.1
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cxx)
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='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'
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$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}${objdir}/so_locations -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
fi
|
||||
|
||||
case "$cc_basename" in
|
||||
KCC)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
||||
# KCC will only create a shared library if the output file
|
||||
# ends with ".so" (or ".sl" for HP-UX), so rename the library
|
||||
# to its proper name (with version) after linking.
|
||||
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# the KAI C++ compiler.
|
||||
old_archive_cmds='$CC -o $oldlib $oldobjs'
|
||||
;;
|
||||
RCC)
|
||||
# Rational C++ 2.4.1
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cxx)
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='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'
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
psos*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
sco*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# Sun C++ 4.x
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
lcc)
|
||||
# Lucid
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
solaris*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# Sun C++ 4.2, 5.x and Centerline C++
|
||||
no_undefined_flag=' -ztext'
|
||||
archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
|
||||
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
case "$host_os" in
|
||||
solaris2.[0-5] | solaris2.[0-5].*) ;;
|
||||
*)
|
||||
# The C++ compiler is used as linker so we must use $wl
|
||||
# flag to pass the commands to the underlying system
|
||||
# linker.
|
||||
# Supported since Solaris 2.6 (maybe 2.5.1?)
|
||||
whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
|
||||
;;
|
||||
esac
|
||||
link_all_deplibs=yes
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# "CC -xar", where "CC" is the Sun C++ compiler. This is
|
||||
# necessary to make sure instantiated templates are included
|
||||
# in the archive.
|
||||
old_archive_cmds='$CC -xar -o $oldlib $oldobjs'
|
||||
;;
|
||||
gcx)
|
||||
# Green Hills C++ Compiler
|
||||
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
|
||||
|
||||
# The C++ compiler must be used to create the archive.
|
||||
old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
|
||||
;;
|
||||
*)
|
||||
# GNU C++ compiler with Solaris linker
|
||||
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
|
||||
if $CC --version | egrep -v '^2\.7' > /dev/null; then
|
||||
archive_cmds='$LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
|
||||
else
|
||||
# g++ 2.7 appears to require `-G' NOT `-shared' on this
|
||||
# platform.
|
||||
archive_cmds='$LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tandem*)
|
||||
case "$cc_basename" in
|
||||
NCC)
|
||||
# NonStop-UX NCC 3.20
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
unixware*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
vxworks*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
# FIXME: insert proper C++ library support
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
## Compiler Characteristics: PIC flags, static flags, etc
|
||||
|
||||
# We don't use cached values here since only the C compiler
|
||||
# characteristics should be cached.
|
||||
ac_cv_prog_cc_pic=
|
||||
ac_cv_prog_cc_shlib=
|
||||
ac_cv_prog_cc_wl=
|
||||
ac_cv_prog_cc_static=
|
||||
ac_cv_prog_cc_no_builtin=
|
||||
ac_cv_prog_cc_can_build_shared=$can_build_shared
|
||||
|
||||
# It is not enough to reset these cached values, they must be unset.
|
||||
unset ac_cv_prog_cc_pic_works
|
||||
unset ac_cv_prog_cc_static_works
|
||||
|
||||
if test "$with_gcc" = yes; then
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-static'
|
||||
|
||||
case "$host_os" in
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
aix*)
|
||||
# Below there is a dirty hack to force normal static linking with -ldl
|
||||
# The problem is because libdl dynamically linked with both libc and
|
||||
# libC (AIX C++ library), which obviously doesn't included in libraries
|
||||
# list by gcc. This cause undefined symbols with -static flags.
|
||||
# This hack allows C programs to be linked with "-static -ldl", but
|
||||
# we not sure about C++ programs.
|
||||
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
|
||||
;;
|
||||
cygwin* | mingw* | os2*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
ac_cv_prog_cc_pic='-DDLL_EXPORT'
|
||||
;;
|
||||
amigaos*)
|
||||
# FIXME: we need at least 68020 code to build shared libraries, but
|
||||
# adding the `-m68020' flag to GCC prevents building anything better,
|
||||
# like `-m68040'.
|
||||
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ac_cv_prog_cc_pic=-Kconform_pic
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
ac_cv_prog_cc_pic='-fPIC'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case "$host_os" in
|
||||
aix4*)
|
||||
# All AIX code is PIC.
|
||||
;;
|
||||
chorus*)
|
||||
case "$cc_basename" in
|
||||
cxch68)
|
||||
# Green Hills C++ Compiler
|
||||
# ac_cv_prog_cc_static="--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"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
dgux*)
|
||||
case "$cc_basename" in
|
||||
ec++)
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
;;
|
||||
ghcx)
|
||||
# Green Hills C++ Compiler
|
||||
ac_cv_prog_cc_pic='-pic'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd*)
|
||||
# FreeBSD uses GNU C++
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
|
||||
ac_cv_prog_cc_pic='+Z'
|
||||
;;
|
||||
aCC)
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
|
||||
ac_cv_prog_cc_pic='+Z'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-non_shared'
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*)
|
||||
case "$cc_basename" in
|
||||
KCC)
|
||||
# KAI C++ Compiler
|
||||
ac_cv_prog_cc_wl='--backend -Wl,'
|
||||
ac_cv_prog_cc_pic='-fPIC'
|
||||
;;
|
||||
cxx)
|
||||
# Compaq C++
|
||||
# Make sure the PIC flag is empty. It appears that all Alpha
|
||||
# Linux and Compaq Tru64 Unix objects are PIC.
|
||||
ac_cv_prog_cc_pic=
|
||||
ac_cv_prog_cc_static='-non_shared'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
lynxos*)
|
||||
;;
|
||||
m88k*)
|
||||
;;
|
||||
mvs*)
|
||||
case "$cc_basename" in
|
||||
cxx)
|
||||
ac_cv_prog_cc_pic='-W c,exportall'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
case "$cc_basename" in
|
||||
KCC)
|
||||
ac_cv_prog_cc_wl='--backend -Wl,'
|
||||
;;
|
||||
RCC)
|
||||
# Rational C++ 2.4.1
|
||||
ac_cv_prog_cc_pic='-pic'
|
||||
;;
|
||||
cxx)
|
||||
# Digital/Compaq C++
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
# Make sure the PIC flag is empty. It appears that all Alpha
|
||||
# Linux and Compaq Tru64 Unix objects are PIC.
|
||||
ac_cv_prog_cc_pic=
|
||||
ac_cv_prog_cc_static='-non_shared'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
psos*)
|
||||
;;
|
||||
sco*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
ac_cv_prog_cc_pic='-fPIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
solaris*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# Sun C++ 4.2, 5.x and Centerline C++
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
ac_cv_prog_cc_wl='-Qoption ld '
|
||||
;;
|
||||
gcx)
|
||||
# Green Hills C++ Compiler
|
||||
ac_cv_prog_cc_pic='-PIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
case "$cc_basename" in
|
||||
CC)
|
||||
# Sun C++ 4.x
|
||||
ac_cv_prog_cc_pic='-pic'
|
||||
ac_cv_prog_cc_static='-Bstatic'
|
||||
;;
|
||||
lcc)
|
||||
# Lucid
|
||||
ac_cv_prog_cc_pic='-pic'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tandem*)
|
||||
case "$cc_basename" in
|
||||
NCC)
|
||||
# NonStop-UX NCC 3.20
|
||||
ac_cv_prog_cc_pic='-KPIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
unixware*)
|
||||
;;
|
||||
vxworks*)
|
||||
;;
|
||||
*)
|
||||
ac_cv_prog_cc_can_build_shared=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
|
||||
|
||||
|
||||
# Figure out "hidden" C++ library dependencies from verbose
|
||||
# compiler output whening linking a shared library.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
Foo (void) { a = 0; }
|
||||
private:
|
||||
int a;
|
||||
};
|
||||
EOF
|
||||
|
||||
|
||||
if eval $ac_compile 2>&5; then
|
||||
# Parse the compiler output and extract the necessary
|
||||
# objects, libraries and library flags.
|
||||
|
||||
# Sentinel used to keep track of whether or not we are before
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
for p in `eval $output_verbose_link_cmds`; do
|
||||
|
||||
case $p in
|
||||
|
||||
-L* | -R* | -l*)
|
||||
# Some compilers place space between "-{L,R}" and the path.
|
||||
# Remove the space.
|
||||
if test $p = "-L" \
|
||||
|| test $p = "-R"; then
|
||||
prev=$p
|
||||
continue
|
||||
else
|
||||
prev=
|
||||
fi
|
||||
|
||||
if test "$pre_test_object_deps_done" = no; then
|
||||
case $p in
|
||||
-L* | -R*)
|
||||
# Internal compiler library paths should come after those
|
||||
# provided the user. The postdeps already come after the
|
||||
# user supplied libs so there is no need to process them.
|
||||
if test -z "$compiler_lib_search_path"; then
|
||||
compiler_lib_search_path="${prev}${p}"
|
||||
else
|
||||
compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
|
||||
fi
|
||||
;;
|
||||
# The "-l" case would never come before the object being
|
||||
# linked, so don't bother handling this case.
|
||||
esac
|
||||
else
|
||||
if test -z "$postdeps"; then
|
||||
postdeps="${prev}${p}"
|
||||
else
|
||||
postdeps="${postdeps} ${prev}${p}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*.$objext)
|
||||
# This assumes that the test object file only shows up
|
||||
# once in the compiler output.
|
||||
if test "$p" = "conftest.$objext"; then
|
||||
pre_test_object_deps_done=yes
|
||||
continue
|
||||
fi
|
||||
|
||||
if test "$pre_test_object_deps_done" = no; then
|
||||
if test -z "$predep_objects"; then
|
||||
predep_objects="$p"
|
||||
else
|
||||
predep_objects="$predep_objects $p"
|
||||
fi
|
||||
else
|
||||
if test -z "$postdep_objects"; then
|
||||
postdep_objects="$p"
|
||||
else
|
||||
postdep_objects="$postdep_objects $p"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*) ;; # Ignore the rest.
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
# Clean up.
|
||||
rm -f a.out
|
||||
else
|
||||
echo "ltcf-cxx.sh: error: problem compiling test program"
|
||||
fi
|
||||
|
||||
$rm -f confest.$objext
|
||||
|
||||
need_lc=yes
|
||||
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
|
||||
case "$archive_cmds" in
|
||||
*'~'*)
|
||||
# FIXME: we may have to deal with multi-command sequences.
|
||||
;;
|
||||
'$CC '*)
|
||||
# Test whether the compiler implicitly links with -lc since on some
|
||||
# systems, -lgcc has to come before -lc. If gcc already passes -lc
|
||||
# to ld, don't add -lc before -lgcc.
|
||||
echo $ac_n "checking whether -lc is implicitly linked in... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_cxx_archive_cmds_needs_lc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
need_lc=$ac_cv_cxx_archive_cmds_needs_lc
|
||||
else
|
||||
$rm conftest*
|
||||
echo "static int dummy;" > conftest.$ac_ext
|
||||
if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
|
||||
# Append any warnings to the config.log.
|
||||
cat conftest.err 1>&5
|
||||
|
||||
soname=conftest
|
||||
lib=conftest
|
||||
libobjs=conftest.o
|
||||
deplibs=
|
||||
compiler_flags=-v
|
||||
linker_flags=-v
|
||||
verstring=
|
||||
output_objdir=.
|
||||
libname=conftest
|
||||
allow_undefined_flag=
|
||||
if { (eval echo $progname:@LINENO@: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
|
||||
need_lc=no
|
||||
fi
|
||||
else
|
||||
cat conftest.err 1>&5
|
||||
fi
|
||||
fi
|
||||
$rm conftest*
|
||||
echo "$ac_t$need_lc" 1>&6
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
ac_cv_cxx_archive_cmds_needs_lc=$need_lc
|
573
ltcf-gcj.sh
Normal file
573
ltcf-gcj.sh
Normal file
@ -0,0 +1,573 @@
|
||||
#### This script is meant to be sourced by ltconfig.
|
||||
|
||||
# $Id: ltcf-gcj.sh,v 1.1.2.5 2000/07/20 02:29:15 oliva Exp $
|
||||
|
||||
# ltcf-gcj.sh - Create a GCJ compiler specific configuration
|
||||
#
|
||||
# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# Original GCJ support by:
|
||||
# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Source file extension for Java test sources.
|
||||
ac_ext=java
|
||||
|
||||
# Object file extension for compiled Java test sources.
|
||||
objext=o
|
||||
|
||||
# Code to be used in simple compile tests
|
||||
lt_simple_compile_test_code="class foo {}"
|
||||
|
||||
# Code to be used in simple link tests
|
||||
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {} (0); }'
|
||||
|
||||
## Linker Characteristics
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$with_gcc" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# If archive_cmds runs LD, not CC, wlarc should be empty
|
||||
wlarc='${wl}'
|
||||
|
||||
# See if GNU ld supports shared libraries.
|
||||
case "$host_os" in
|
||||
aix3* | aix4*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
|
||||
*** to be unable to reliably create shared libraries on AIX.
|
||||
*** Therefore, libtool is disabling shared libraries support. If you
|
||||
*** really care for shared libraries, you may want to modify your PATH
|
||||
*** so that a non-GNU linker is found, and then restart.
|
||||
|
||||
EOF
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
allow_undefined_flag=unsupported
|
||||
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
|
||||
# support --undefined. This deserves some investigation. FIXME
|
||||
archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
|
||||
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
|
||||
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
|
||||
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
|
||||
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
|
||||
else $CC -o impgen impgen.c ; fi)~
|
||||
$output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
|
||||
|
||||
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
|
||||
|
||||
# cygwin and mingw dlls have different entry points and sets of symbols
|
||||
# to exclude.
|
||||
# FIXME: what about values for MSVC?
|
||||
dll_entry=__cygwin_dll_entry@12
|
||||
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
# mingw values
|
||||
dll_entry=_DllMainCRTStartup@12
|
||||
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
|
||||
;;
|
||||
esac
|
||||
|
||||
# mingw and cygwin differ, and it's simplest to just exclude the union
|
||||
# of the two symbol sets.
|
||||
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
|
||||
|
||||
# recent cygwin and mingw systems supply a stub DllMain which the user
|
||||
# can override, but on older systems we have to supply one (in ltdll.c)
|
||||
if test "x$lt_cv_need_dllmain" = "xyes"; then
|
||||
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
|
||||
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
|
||||
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
|
||||
else
|
||||
ltdll_obj=
|
||||
ltdll_cmds=
|
||||
fi
|
||||
|
||||
# Extract the symbol export list from an `--export-all' def file,
|
||||
# then regenerate the def file from the symbol export list, so that
|
||||
# the compiled dll only exports the symbol export list.
|
||||
# Be careful not to strip the DATA tag left be newer dlltools.
|
||||
export_symbols_cmds="$ltdll_cmds"'
|
||||
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
|
||||
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
|
||||
|
||||
# If DATA tags from a recent dlltool are present, honour them!
|
||||
archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
|
||||
_lt_hint=1;
|
||||
cat $export_symbols | while read symbol; do
|
||||
set dummy \$symbol;
|
||||
case \$# in
|
||||
2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
|
||||
*) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
|
||||
esac;
|
||||
_lt_hint=`expr 1 + \$_lt_hint`;
|
||||
done~
|
||||
'"$ltdll_cmds"'
|
||||
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
|
||||
$CC $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
else
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
fi
|
||||
;;
|
||||
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
cat <<EOF 1>&2
|
||||
|
||||
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
|
||||
*** create shared libraries on Solaris systems. Therefore, libtool
|
||||
*** is disabling shared libraries support. We urge you to upgrade GNU
|
||||
*** binutils to release 2.9.1 or newer. Another option is to modify
|
||||
*** your PATH or compiler configuration so that the native linker is
|
||||
*** used, and then restart.
|
||||
|
||||
EOF
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
wlarc=
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ld_shlibs" = yes; then
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_libdir_flag_spec="$wlarc"'--rpath '"$wlarc"'$libdir'
|
||||
export_dynamic_flag_spec="$wlarc"'--export-dynamic'
|
||||
case $host_os in
|
||||
cygwin* | mingw*)
|
||||
# dlltool doesn't understand --whole-archive et. al.
|
||||
whole_archive_flag_spec=
|
||||
;;
|
||||
*)
|
||||
# ancient GNU ld didn't support --whole-archive et. al.
|
||||
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
|
||||
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
|
||||
else
|
||||
whole_archive_flag_spec=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
# PORTME fill in a description of your system's linker (not GNU ld)
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
|
||||
aix4*)
|
||||
hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$with_gcc" = yes; then
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
# It fails to find uninstalled libraries when the uninstalled
|
||||
# path is not listed in the libpath. Setting hardcode_minus_L
|
||||
# to unsupported forces relinking
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
shared_flag='-shared'
|
||||
else
|
||||
shared_flag='${wl}-bM:SRE'
|
||||
hardcode_direct=yes
|
||||
fi
|
||||
allow_undefined_flag=' ${wl}-berok'
|
||||
archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
|
||||
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
|
||||
case "$host_os" in aix4.[01]|aix4.[01].*)
|
||||
# According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
|
||||
always_export_symbols=yes ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
libext=lib
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
|
||||
# The linker will automatically build a .lib file if we build a DLL.
|
||||
old_archive_from_new_cmds='true'
|
||||
# FIXME: Should let the user specify the lib program.
|
||||
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
|
||||
fix_srcfile_path='`cygpath -w $srcfile`'
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
# extra space).
|
||||
freebsd2.2*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||
freebsd2*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd*)
|
||||
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$host_os" in
|
||||
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
|
||||
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
|
||||
esac
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
export_dynamic_flag_spec='${wl}-E'
|
||||
;;
|
||||
|
||||
irix5* | irix6*)
|
||||
if test "$with_gcc" = yes; then
|
||||
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||
else
|
||||
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
|
||||
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
if test "$with_gcc" = yes; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
allow_undefined_flag=' -expect_unresolved \*'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
|
||||
osf4* | osf5*) # as osf3* with the addition of -msym flag
|
||||
if test "$with_gcc" = yes; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
|
||||
else
|
||||
allow_undefined_flag=' -expect_unresolved \*'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_runpath_var=yes
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
case "$host_os" in
|
||||
solaris2.[0-5] | solaris2.[0-5].*) ;;
|
||||
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
|
||||
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
|
||||
esac
|
||||
link_all_deplibs=yes
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
sysv4)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
runpath_var='LD_RUN_PATH'
|
||||
hardcode_shlibpath_var=no
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
|
||||
sysv4.3*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
export_dynamic_flag_spec='-Bexport'
|
||||
;;
|
||||
|
||||
sysv5*)
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var='LD_RUN_PATH'
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_shlibpath_var=no
|
||||
runpath_var=LD_RUN_PATH
|
||||
hardcode_runpath_var=yes
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
|
||||
sysv4.2uw2*)
|
||||
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
hardcode_shlibpath_var=no
|
||||
hardcode_runpath_var=yes
|
||||
runpath_var=LD_RUN_PATH
|
||||
;;
|
||||
|
||||
unixware7*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
runpath_var='LD_RUN_PATH'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
## Compiler Characteristics: PIC flags, static flags, etc
|
||||
|
||||
# We don't use cached values here since only the C compiler
|
||||
# characteristics should be cached.
|
||||
ac_cv_prog_cc_pic=
|
||||
ac_cv_prog_cc_shlib=
|
||||
ac_cv_prog_cc_wl=
|
||||
ac_cv_prog_cc_static=
|
||||
ac_cv_prog_cc_no_builtin=
|
||||
ac_cv_prog_cc_can_build_shared=$can_build_shared
|
||||
|
||||
ac_cv_prog_cc_wl='-Wl,'
|
||||
ac_cv_prog_cc_static='-static'
|
||||
|
||||
case "$host_os" in
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
aix*)
|
||||
# Below there is a dirty hack to force normal static linking with -ldl
|
||||
# The problem is because libdl dynamically linked with both libc and
|
||||
# libC (AIX C++ library), which obviously doesn't included in libraries
|
||||
# list by gcc. This cause undefined symbols with -static flags.
|
||||
# This hack allows C programs to be linked with "-static -ldl", but
|
||||
# we not sure about C++ programs.
|
||||
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
|
||||
;;
|
||||
cygwin* | mingw* | os2*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
ac_cv_prog_cc_pic='-DDLL_EXPORT'
|
||||
;;
|
||||
amigaos*)
|
||||
# FIXME: we need at least 68020 code to build shared libraries, but
|
||||
# adding the `-m68020' flag to GCC prevents building anything better,
|
||||
# like `-m68040'.
|
||||
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ac_cv_prog_cc_pic=-Kconform_pic
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
ac_cv_prog_cc_pic='-fPIC'
|
||||
;;
|
||||
esac
|
||||
|
||||
# GCJ did not exist at the time GCC didn't implicitly link libc in.
|
||||
need_lc=no
|
Loading…
Reference in New Issue
Block a user