Changeset 3110


Ignore:
Timestamp:
Nov 10, 2013, 12:42:16 AM (8 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.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r3091 r3110  
    495495AC_SUBST([enable_static])
    496496
     497# Name of directory libtool put stuff int - needed for some tests
     498AC_SUBST([lt_cv_objdir])
     499
    497500YAT_SVN_RELEASE([am/maintainer.am])
    498501
  • trunk/test/defs.sh.in

    r3100 r3110  
    125125abs_top_builddir=@abs_top_builddir@
    126126abs_top_srcdir=@abs_top_srcdir@
     127lt_cv_objdir=@lt_cv_objdir@
    127128have_doxygen="@have_doxygen@"
    128129mkdir_p="@MKDIR_P@ --verbose"
  • 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
  • trunk/test/yat_lt_link_la_ifelse_test.sh

    r3100 r3110  
    5252AC_MSG_CHECKING([whether linking against -lmy-static works])
    5353YAT_LT_LINK_LA_IFELSE([
    54     int foo_static(void);
    55     int my_func(void) { return foo_static(); }
     54namespace theplu {
     55namespace yat {
     56namespace utility {
     57    int version(void);
     58}}}
     59    int my_func(void) { return theplu::yat::utility::version(); }
    5660  ],[
    5761    AC_MSG_RESULT([yes])
    58     AC_MSG_FAILURE
     62    AC_MSG_FAILURE([expected configure to fail])
    5963  ],[
    6064    AC_MSG_RESULT([no])
Note: See TracChangeset for help on using the changeset viewer.