Ignore:
Timestamp:
Nov 10, 2013, 12:42:16 AM (9 years ago)
Author:
Peter
Message:

Fix test of YAT_LT_LINK_IFELSE. The macro/linking worked also against
static library, which is unexpected. When I modified to an library
with more symbols (libyat) I get the error: "relocation..." as
expected. refs #737.

configure.ac: AC_SUBST lt_vc_objdir from libtool
test/defs.sh.in: define dito
test/gen_libmy_static.sh: copy libyat.a rather than creating a small libmy-static.a from scratch.
yat_lt_link_la_ifelse_test.sh: link against theplu::yat::utility::version(void) as libmy-static now just is a alias for libyat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/gen_libmy_static.sh

    r3041 r3110  
    2626cd $test_dir
    2727
    28 # redefine so we can call check_requirment without exit
     28# redefine so we can call check_requirements without exit
    2929exit_skip ()
    3030{
     
    3232}
    3333
    34 required="autoconf automake static"
     34required="static"
    3535check_requirements > stdout 2> stderr
    3636
    37 # if requirments are misssing we just create an empty dummy file (to
     37# if requirements are misssing we just create an empty dummy file (to
    3838# avoid triggering the make target over and over again)
    3939if test x$req_failed = xyes; then
     
    4343fi
    4444
    45 cat > configure.ac <<EOF
    46 AC_INIT([foo], [1])
    47 AM_INIT_AUTOMAKE([foreign])
    48 AC_PROG_CXX
    49 AC_PROG_RANLIB
    50 AC_CONFIG_FILES([Makefile])
    51 AC_OUTPUT
    52 EOF
     45# include to get variable $old_library
     46. $abs_top_builddir/yat/libyat.la
     47test x"${old_library}" != x"" || exit 1
    5348
    54 cat > Makefile.am <<EOF
    55 lib_LIBRARIES = libmy-static.a
    56 libmy_static_a_SOURCES = foo.cc
    57 EOF
    58 
    59 cat > foo.cc <<EOF
    60 int foo_static(void) { return 0; }
    61 EOF
    62 
    63 verbose=
    64 bootstrap
    65 ./configure --prefix=$abs_top_builddir/test || exit 1
    66 
    67 unset MAKEFLAGS
    68 make install V=0 || exit 1
     49cp $abs_top_builddir/yat/${lt_cv_objdir}/${old_library} \
     50$abs_top_builddir/test/lib/libmy-static.a
    6951exit 0
Note: See TracChangeset for help on using the changeset viewer.