tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
# tagdemo.at -- C++ Language support. -*- Autotest -*-
|
|
|
|
#
|
2025-01-02 22:30:23 +08:00
|
|
|
# Copyright (C) 2003-2005, 2011-2019, 2021-2025 Free Software
|
2022-02-09 02:11:10 +08:00
|
|
|
# Foundation, Inc.
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
# Written by Gary V. Vaughan, 2003
|
|
|
|
#
|
|
|
|
# This file is part of GNU Libtool.
|
|
|
|
#
|
|
|
|
# GNU Libtool 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.
|
|
|
|
#
|
|
|
|
# GNU Libtool 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
|
libtool: FSF office address replaced by URL
* AUTHORS, HACKING, Makefile.am, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/no-bogus-m4-defines, cfg.mk, configure.ac, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, libltdl/lt__alloc.c, libltdl/lt__argz.c,
libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c,
libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, tests/am-subdir.at, tests/archive-in-archive.at,
tests/bindir.at, tests/bug_62343.at, tests/cdemo.at, tests/cmdline_wrap.at,
tests/configure-funcs.at, tests/configure-iface.at, tests/convenience.at,
tests/ctor.at, tests/cwrapper.at, tests/darwin.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at, tests/deplibs-ident.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at, tests/duplicate_deps.at,
tests/duplicate_members.at, tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at, tests/fcdemo.at,
tests/flags.at, tests/help.at, tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at, tests/lalib-syntax.at,
tests/libtool.at, tests/libtoolize.at, tests/link-order.at,
tests/link-order2.at, tests/loadlibrary.at, tests/localization.at,
tests/lt_dladvise.at, tests/lt_dlexit.at, tests/lt_dlopen.at,
tests/lt_dlopen_a.at, tests/lt_dlopenext.at, tests/ltdl-api.at,
tests/ltdl-libdir.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/no-executables.at, tests/nocase.at, tests/nonrecursive.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at, tests/search-path.at,
tests/shlibpath.at, tests/slist.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Replace FSF address in each file's license block with
a URL that points to licenses online hosted by GNU.
2024-09-03 23:02:46 +08:00
|
|
|
# along with GNU Libtool. If not, see <https://www.gnu.org/licenses/>.
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
####
|
|
|
|
|
|
|
|
|
|
|
|
AT_BANNER([C++ language support.])
|
|
|
|
|
|
|
|
|
|
|
|
# _LT_SETUP
|
|
|
|
# ---------
|
|
|
|
m4_define([_LT_SETUP],
|
|
|
|
[LT_AT_TAG([CXX])
|
|
|
|
AT_KEYWORDS([libtool])
|
|
|
|
|
|
|
|
AT_DATA([configure.ac],
|
|
|
|
[[AC_INIT([tagdemo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
libtoolize: migrate to new AC_CONFIG_MACRO_DIRS api.
* libtoolize.in (func_install_pkgmacro_files): Uee
AC_CONFIG_MACRO_DIRS.
(func_check_macros): Advise using AC_CONFIG_MACRO_DIRS.
(require_ac_macro_dir): Give priority to AC_CONFIG_MACRO_DIRS.
(require_macro_dir): Likewise.
* bootstrap: Give priority to AC_CONFIG_MACRO_DIRS.
* configure.ac: Define dummy AC_CONFIG_MACRO_DIRS for older
Autotools, that is allow bootstrap with current release versions.
Use AC_CONFIG_MACRO_DIRS instead of AC_CONFIG_MACRO_DIR.
* tests/testsuite.at: Source build-aux/extract-trace for access
to func_extract_trace.
(LT_AT_ACLOCAL): Use it to get the AC_CONFIG_MACRO_DIRS argument
to pass manually to aclocal for compatibility with old Automake.
Add a fallback AC_CONFIG_MACRO_DIRS definition to acinclude.m4
in the test directory.
(LT_AT_AUTORECONF): Likewise.
* tests/cdemo.at, tests/configure-iface.at, tests/darwin.at,
tests/demo.at, tests/depdemo.at, tests/early-libtool.at,
tests/libtoolize.at, tests/mdemo.at, tests/no-executables.at,
tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/recursive.at, tests/subproject.at, tests/tagdemo.at,
tests/template.at: Likewise.
* doc/libtool.texi: Update.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-18 21:37:03 +08:00
|
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CC_C_O
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXXCPP
|
|
|
|
|
|
|
|
# Check for namespace support and new-style headers
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_MSG_CHECKING([whether the compiler implements namespaces])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[namespace A { namespace B { int i = 0; }}]],
|
|
|
|
[[using namespace A::B; return i;]])],
|
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([HAVE_NAMESPACES],[1],
|
|
|
|
[define if the compiler implements namespaces])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether the compiler has ISO C++ iostream])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[#include <iostream>
|
|
|
|
#ifdef HAVE_NAMESPACES
|
|
|
|
using namespace std;
|
|
|
|
#endif ]], [[cout << "bingo\n"; return 0;]])],
|
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([HAVE_IOSTREAM],[1],
|
|
|
|
[define if the compiler has ISO C++ iostream])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
AC_LANG_POP([C++])
|
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
LT_LIB_M
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_HEADERS([config.h:config.in.h])
|
|
|
|
AC_OUTPUT
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([Makefile.am],
|
|
|
|
[[AUTOMAKE_OPTIONS = no-dependencies foreign
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = libconv.la
|
|
|
|
lib_LTLIBRARIES = libfoo.la libbaz.la
|
|
|
|
|
|
|
|
libfoo_la_SOURCES = foo.cpp
|
|
|
|
libfoo_la_LDFLAGS = -no-undefined
|
|
|
|
libfoo_la_LIBADD = libconv.la $(LIBM)
|
|
|
|
|
|
|
|
# Test some of the ILD support when using tagged configurations.
|
|
|
|
libbaz_la_SOURCES = baz.cpp
|
|
|
|
libbaz_la_LDFLAGS = -no-undefined
|
|
|
|
libbaz_la_LIBADD = libfoo.la
|
|
|
|
|
|
|
|
# Test convenience libraries.
|
|
|
|
libconv_la_SOURCES = conv.cpp
|
|
|
|
libconv_la_LDFLAGS = -no-undefined
|
|
|
|
|
|
|
|
noinst_HEADERS = foo.h baz.h conv.h
|
|
|
|
|
|
|
|
bin_PROGRAMS = tagdemo
|
|
|
|
|
|
|
|
tagdemo_SOURCES = main.cpp
|
|
|
|
tagdemo_LDADD = libbaz.la libfoo.la
|
|
|
|
|
|
|
|
libtool: $(LIBTOOL_DEPS)
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([main.cpp],
|
|
|
|
[[#include <config.h>
|
|
|
|
#if HAVE_IOSTREAM
|
|
|
|
# include <iostream>
|
|
|
|
#else
|
|
|
|
# include <iostream.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "foo.h"
|
|
|
|
#include "baz.h"
|
|
|
|
#include "conv.h"
|
|
|
|
|
|
|
|
#if HAVE_NAMESPACES
|
|
|
|
namespace std { }
|
|
|
|
using namespace std;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int main (int, char *[])
|
|
|
|
{
|
|
|
|
cout << "Welcome to GNU libtool tagdemo C++!" << endl;
|
|
|
|
|
|
|
|
foobar_derived FB;
|
|
|
|
// Instantiate the derived class.
|
|
|
|
|
|
|
|
foobar *fb = &FB;
|
|
|
|
// Have some fun with polymorphism.
|
|
|
|
|
|
|
|
int value = fb->hello();
|
|
|
|
|
|
|
|
cout << "foobar::hello returned: " << value << endl;
|
|
|
|
if (value = HELLO_RET)
|
|
|
|
cout << "foobar::hello is ok!" << endl;
|
|
|
|
|
|
|
|
if (fb->foo() == FOO_RET)
|
|
|
|
cout << "foobar::foo is ok!" << endl;
|
|
|
|
|
|
|
|
// --------------
|
|
|
|
|
|
|
|
barbaz_derived BB;
|
|
|
|
// Instantiate the derived class.
|
|
|
|
|
|
|
|
barbaz *bb = &BB;
|
|
|
|
// Have some fun with polymorphism.
|
|
|
|
|
|
|
|
// barbaz_derived::baz() should return FOO_RET since it calls
|
|
|
|
// foobar_derived::foo(), which in turn calls ::foo().
|
|
|
|
if (bb->baz() == FOO_RET)
|
|
|
|
cout << "barbaz::baz is ok!" << endl;
|
|
|
|
|
|
|
|
// --------------
|
|
|
|
|
|
|
|
if (convenience())
|
|
|
|
cout << "convenience is ok!" << endl;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([foo.h],
|
|
|
|
[[#ifndef FOO_H
|
|
|
|
#define FOO_H
|
|
|
|
// Silly constants that the functions return.
|
|
|
|
#define HELLO_RET 0xe110
|
|
|
|
#define FOO_RET 0xf00
|
|
|
|
|
|
|
|
// Our C test functions.
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
int foo(void);
|
|
|
|
int hello(void);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Our test C++ base class.
|
|
|
|
class foobar
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int foo(void) = 0;
|
|
|
|
virtual int hello(void) = 0;
|
|
|
|
// Some dummy pure virtual functions.
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Our test C++ derived class.
|
|
|
|
class foobar_derived : public foobar
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int foo(void);
|
|
|
|
virtual int hello(void);
|
|
|
|
// Override the base class' pure virtual functions.
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([foo.cpp],
|
|
|
|
[[#include <config.h>
|
|
|
|
#ifdef HAVE_IOSTREAM
|
|
|
|
# include <iostream>
|
|
|
|
#else
|
|
|
|
# include <iostream.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_NAMESPACES
|
|
|
|
namespace std { }
|
|
|
|
using namespace std;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#include "foo.h"
|
|
|
|
|
|
|
|
// Our C functions.
|
|
|
|
int
|
|
|
|
foo(void)
|
|
|
|
{
|
|
|
|
cout << "cos (0.0) = " << (double) cos ((double) 0.0) << endl;
|
|
|
|
return FOO_RET;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
hello(void)
|
|
|
|
{
|
|
|
|
cout << "** This is libfoo (tagdemo) **" << endl;
|
|
|
|
return HELLO_RET;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
// Our C++ derived class methods.
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
foobar_derived::foo(void)
|
|
|
|
{
|
|
|
|
return ::foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
foobar_derived::hello(void)
|
|
|
|
{
|
|
|
|
return ::hello();
|
|
|
|
}
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([baz.h],
|
|
|
|
[[#ifndef BAZ_H
|
|
|
|
#define BAZ_H 1
|
|
|
|
|
|
|
|
// Our test C++ base class.
|
|
|
|
class barbaz
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int baz(void) = 0;
|
|
|
|
// Some dummy pure virtual functions.
|
|
|
|
};
|
|
|
|
|
|
|
|
// Our test C++ derived class.
|
|
|
|
class barbaz_derived : public barbaz
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int baz(void);
|
|
|
|
// Override the base class' pure virtual functions.
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([baz.cpp],
|
|
|
|
[[#include <config.h>
|
|
|
|
|
|
|
|
#include "foo.h"
|
|
|
|
#include "baz.h"
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
// Our C++ derived class methods.
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
barbaz_derived::baz(void)
|
|
|
|
{
|
|
|
|
foobar_derived FB;
|
|
|
|
|
|
|
|
return FB.foo();
|
|
|
|
}
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([conv.h],
|
|
|
|
[[#ifndef CONV_H
|
|
|
|
#define CONV_H
|
|
|
|
|
|
|
|
// Our C test functions.
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
int convenience(void);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([conv.cpp],
|
|
|
|
[[#include <config.h>
|
|
|
|
|
|
|
|
#include "conv.h"
|
|
|
|
|
|
|
|
//Our C function.
|
|
|
|
int convenience (void) { return 1; }
|
|
|
|
]])
|
|
|
|
|
2012-10-06 03:31:33 +08:00
|
|
|
LT_AT_HOST_DATA([expout],
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
[[Welcome to GNU libtool tagdemo C++!
|
|
|
|
** This is libfoo (tagdemo) **
|
|
|
|
foobar::hello returned: 57616
|
|
|
|
foobar::hello is ok!
|
|
|
|
cos (0.0) = 1
|
|
|
|
foobar::foo is ok!
|
|
|
|
cos (0.0) = 1
|
|
|
|
barbaz::baz is ok!
|
|
|
|
convenience is ok!
|
|
|
|
]])
|
|
|
|
|
2014-10-30 21:13:21 +08:00
|
|
|
prefix=`pwd`/_inst
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
]) # _LT_SETUP
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Tagdemo static. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([static library])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([--disable-shared],
|
|
|
|
[^build_old_libs=yes], [^build_libtool_libs=no])
|
|
|
|
LT_AT_CHECK_EXECUTE([], [./tagdemo])
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## --------------- ##
|
|
|
|
## Tagdemo shared. ##
|
|
|
|
## --------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([shared library])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([--disable-static],
|
|
|
|
[^build_old_libs=no], [^build_libtool_libs=yes])
|
|
|
|
LT_AT_CHECK_EXECUTE([], [./tagdemo])
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## ------------- ##
|
|
|
|
## Tagdemo conf. ##
|
|
|
|
## ------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([shared and static together])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_CHECK_CONFIG([],
|
|
|
|
[^build_old_libs=yes], [^build_libtool_libs=yes])
|
|
|
|
LT_AT_CHECK_EXECUTE([], [./tagdemo])
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
## -------------- ##
|
|
|
|
## Tagdemo undef. ##
|
|
|
|
## -------------- ##
|
|
|
|
|
|
|
|
AT_SETUP([allow_undefined_flag])
|
|
|
|
|
|
|
|
_LT_SETUP
|
|
|
|
|
|
|
|
LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
|
|
|
|
[--disable-static], [ignore])
|
2013-11-09 01:56:55 +08:00
|
|
|
AT_CHECK([$GREP "^allow_undefined_flag=.\{0,1\}unsupported.\{0,1\}$" libtool && (exit 77)],
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
1, [ignore])
|
tests: use $SED throughout.
Trust the user, and use $SED from TESTS_ENVIRONMENT uniformly.
Hardcoding 'sed' for "simple" edits is a premature optimisation.
* tests/cdemo.at, tests/cmdline_wrap.at, tests/cwrapper.at,
tests/darwin.at, tests/demo.at, tests/duplicate_conv.at,
tests/duplicate_members.at, tests/execute-mode.at, tests/export.at,
tests/inherited_flags.at, tests/install.at, tests/libtoolize.at,
tests/mdemo.at, tests/need_lib_prefix.at, tests/old-m4-iface.at,
tests/sysroot.at, tests/tagdemo.at, tests/testsuite.at: Replace all
hardcoded sed invocations with $SED.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2013-10-30 12:21:38 +08:00
|
|
|
$SED 's|allow_undefined=no|allow_undefined=yes|g' libtool > ltnew && mv -f ltnew libtool
|
tests: migrate legacy tests/tagdemo tests to Autotest.
* tests/tagdemo.at: New autotest groups, based on...
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared-exec.test,
tests/tagdemo-shared-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test,
tests/tagdemo-static.test, tests/tagdemo-undef-exec.test,
tests/tagdemo-undef-make.test, tests/tagdemo-undef.test:
...these legacy tests, now removed.
* tests/tagdemo/.gitignore, tests/tagdemo/Makefile.am,
tests/tagdemo/README, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp: Remove.
* configure.ac (CONF_SUBDIRS): Remove tests/tagdemo.
* Makefile.am: Adjust.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2011-11-23 23:23:16 +08:00
|
|
|
LT_AT_CHECK_EXECUTE([], [./tagdemo])
|
|
|
|
|
|
|
|
|
|
|
|
AT_CLEANUP
|