summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2011-11-24 11:29:10 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-04 20:11:05 +0700
commit6b83c12e3977294b736c45a277bebaf3d9fea0e6 (patch)
treea936c4f3ca731c075217a70773208f9312696dbb /tests
parent81defe1b7ec03803008d09eea1900589570bb405 (diff)
downloadlibtool-6b83c12e3977294b736c45a277bebaf3d9fea0e6.tar.gz
tests: migrate legacy tests/pdemo tests to Autotest.
This test was a thinly veiled copy of the basic legacy demo-conf.test series, with the addition of long file names that are not unique in the first 17 characters of their name, mashed up with the cmdline_wrap.at max_cmd_len limits. Migrating to Autotest means that this test will be automatically rerun with max_cmd_len=24 as cmdline_wrap.at recurses through the whole testsuite, so the migrated pdemo test is now simply another test case in demo.at with longer file names. * test/demo.at (linking with long file names): New test, based on... * tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test: ...these legacy tests, now removed. * tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c: Remove. * configure.ac (CONF_SUBDIRS): Remove tests/pdemo. * Makefile.am: Adjust. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/demo.at119
-rwxr-xr-xtests/pdemo-conf.test47
-rwxr-xr-xtests/pdemo-exec.test36
-rwxr-xr-xtests/pdemo-inst.test38
-rwxr-xr-xtests/pdemo-make.test34
-rw-r--r--tests/pdemo/.gitignore3
-rw-r--r--tests/pdemo/Makefile.am171
-rw-r--r--tests/pdemo/configure.ac73
-rw-r--r--tests/pdemo/foo.h102
-rw-r--r--tests/pdemo/longer_file_name_dlmain.c97
-rw-r--r--tests/pdemo/longer_file_name_foo.c38
-rw-r--r--tests/pdemo/longer_file_name_foo2.c35
-rw-r--r--tests/pdemo/longer_file_name_hell1.c25
-rw-r--r--tests/pdemo/longer_file_name_hell2.c24
-rw-r--r--tests/pdemo/longer_file_name_hello.c36
-rw-r--r--tests/pdemo/longer_file_name_main.c47
16 files changed, 119 insertions, 806 deletions
diff --git a/tests/demo.at b/tests/demo.at
index d2fafad9..b0a51dc7 100644
--- a/tests/demo.at
+++ b/tests/demo.at
@@ -798,3 +798,122 @@ AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE hell$EXEEXT libhello_la_OBJECTS=hello
[1], [ignore], [ignore])
AT_CLEANUP
+
+
+## ----------- ##
+## Pdemo conf. ##
+## ----------- ##
+
+AT_SETUP([linking with long file names])
+
+_LT_DEMO_SETUP
+
+AT_DATA([Makefile.am],
+[[AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I m4
+
+# Build a libtool library, libhello.la for installation in libdir.
+lib_LTLIBRARIES = libhello.la
+libhello_la_SOURCES = longer_file_name_hello.c longer_file_name_foo.c longer_file_name_foo2.c
+libhello_la_LIBADD = $(LIBM)
+libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
+libhello_la_CPPFLAGS = $(AM_CPPFLAGS) -DBUILDING_LIBHELLO
+
+include_HEADERS = foo.h
+
+if BINARY_HELLDL
+BUILD_helldl = helldl
+else
+BUILD_helldl =
+endif
+
+bin_PROGRAMS = hell hell_static $(BUILD_helldl)
+
+# Build hell from longer_file_name_main.c and libhello.la
+hell_SOURCES = longer_file_name_main.c
+hell_LDADD = libhello.la
+
+# Create a statically linked version of hell.
+hell_static_SOURCES = longer_file_name_main.c
+hell_static_LDADD = libhello.la
+hell_static_LDFLAGS = $(STATIC)
+
+if BINARY_HELLDL
+
+# Create a version of hell that does a preloaded dlopen.
+helldl_SOURCES = longer_file_name_dlmain.c
+helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la
+helldl_DEPENDENCIES = libhello.la
+
+else
+
+# Create a script that says that -dlopen is not supported.
+bin_SCRIPTS = helldl
+helldl helldl$(EXEEXT):
+ rm -rf $@
+ echo '#! /bin/sh' > $@
+ echo 'echo sorry, -dlopen is unsupported' >> $@
+ chmod +x $@
+
+endif
+
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
+]])
+
+AT_DATA([main.c],
+[[#include <config.h>
+#include <stdio.h>
+
+#include "foo.h"
+
+int main ()
+{
+ printf ("Welcome to GNU Hell!\n");
+
+ /* Try assigning to the nothing variable. */
+ nothing = 1;
+
+ /* Just call the functions and check return values. */
+ if (foo () != FOO_RET)
+ return 1;
+
+ if (foo2 () != FOO_RET)
+ return 1;
+
+ if (hello () != HELLO_RET)
+ return 2;
+
+ return 0;
+}
+]])
+
+AT_DATA([foo2.c],
+[[#include <config.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "foo.h"
+
+int foo2 (void) {
+ printf ("foo2 cos (0.0) = %g\n", (double) cos ((double) 0.0));
+ return FOO_RET;
+}
+]])
+
+AT_DATA([expout],
+[[Welcome to GNU Hell!
+cos (0.0) = 1
+foo2 cos (0.0) = 1
+** This is not GNU Hello. There is no built-in mail reader. **
+]])
+
+for file in dlmain.c foo.c foo2.c hello.c main.c; do
+ mv $file longer_file_name_$file
+done
+
+LT_AT_CHECK_CONFIG
+_LT_CHECK_EXECUTE
+_LT_CHECK_INSTALL
+
+AT_CLEANUP
diff --git a/tests/pdemo-conf.test b/tests/pdemo-conf.test
deleted file mode 100755
index 9298ccd6..00000000
--- a/tests/pdemo-conf.test
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-# pdemo-conf.test - try configuring the pdemo subdirectory
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# 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
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_mkprefixdir
-func_cd "tests/pdemo"
-func_make_distclean
-func_configure
-func_check_static_shared "yes" "yes"
-
-if test -f ./libtool ; then
- sed 's/^max_cmd_len=*/max_cmd_len=24 # /g' ./libtool > ltnew
-else
- exit 1
-fi
-
-if test -f ./ltnew ; then
- rm -f libtool
- mv ltnew libtool
-else
- exit 1
-fi
-
-exit 0
diff --git a/tests/pdemo-exec.test b/tests/pdemo-exec.test
deleted file mode 100755
index d051ff91..00000000
--- a/tests/pdemo-exec.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# pdemo-exec.test - check that programs in the pdemo subdirectory are viable
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# 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
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_require "pdemo-make" "tests/pdemo/hell$EXEEXT"
-
-func_rmprefixdir
-func_exec_init "uninstalled"
-func_exec "tests/pdemo/hell_static$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/pdemo/hell$EXEEXT" 'Welcome to GNU Hell'
-func_exec "tests/pdemo/helldl$EXEEXT" '(Welcome to .*GNU Hell|unsupported)'
-
-exit $exec_status
diff --git a/tests/pdemo-inst.test b/tests/pdemo-inst.test
deleted file mode 100755
index 67753b1e..00000000
--- a/tests/pdemo-inst.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# demo-inst.test - try installing from the demo subdirectory
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# 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
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_require "pdemo-make" "tests/pdemo/hell$EXEEXT"
-
-func_mkprefixdir
-func_cd "tests/pdemo"
-func_make "install"
-func_exec_init "installed"
-func_exec "$prefix/bin/hell_static$EXEEXT" 'Welcome to GNU Hell'
-func_exec "$prefix/bin/hell$EXEEXT" 'Welcome to GNU Hell'
-func_exec "$prefix/bin/helldl$EXEEXT" '(Welcome to .*GNU Hell|unsupported)'
-
-exit $status
diff --git a/tests/pdemo-make.test b/tests/pdemo-make.test
deleted file mode 100755
index 867f6aa0..00000000
--- a/tests/pdemo-make.test
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# pdemo-make.test - try building in the pdemo subdirectory
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# 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
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-func_require "pdemo-conf" "tests/pdemo/Makefile"
-
-func_rmprefixdir
-func_cd "tests/pdemo"
-func_make
-
-exit 0
diff --git a/tests/pdemo/.gitignore b/tests/pdemo/.gitignore
deleted file mode 100644
index e1ee57d1..00000000
--- a/tests/pdemo/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/hell
-/hell_static
-/helldl
diff --git a/tests/pdemo/Makefile.am b/tests/pdemo/Makefile.am
deleted file mode 100644
index 775b3474..00000000
--- a/tests/pdemo/Makefile.am
+++ /dev/null
@@ -1,171 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-## Copyright (C) 2003, 2004, 2005, 2010 Free Software Foundation
-## 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
-## along with GNU Libtool; see the file COPYING. If not, a copy
-## can be downloaded from http://www.gnu.org/licenses/gpl.html,
-## or obtained by writing to the Free Software Foundation, Inc.,
-## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#####
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
-AM_CPPFLAGS = -I$(top_srcdir)/../..
-
-# Build a libtool library, libhello.la for installation in libdir.
-lib_LTLIBRARIES = libhello.la
-libhello_la_SOURCES = longer_file_name_hello.c longer_file_name_foo.c longer_file_name_foo2.c
-libhello_la_LIBADD = $(LIBM)
-libhello_la_LDFLAGS = -no-undefined -version-info 3:12:1
-libhello_la_AM_CPPFLAGS = $(AM_CPPFLAGS) -DBUILDING_LIBHELLO
-
-include_HEADERS = foo.h
-
-if BINARY_HELLDL
-BUILD_helldl = helldl
-else
-BUILD_helldl =
-endif
-
-bin_PROGRAMS = hell hell_static $(BUILD_helldl)
-
-# Build hell from longer_file_name_main.c and libhello.la
-hell_SOURCES = longer_file_name_main.c
-hell_LDADD = libhello.la
-
-# Create a statically linked version of hell.
-hell_static_SOURCES = longer_file_name_main.c
-hell_static_LDADD = libhello.la
-hell_static_LDFLAGS = $(STATIC)
-
-if BINARY_HELLDL
-
-# Create a version of hell that does a preloaded dlopen.
-helldl_SOURCES = longer_file_name_dlmain.c
-helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la
-helldl_DEPENDENCIES = libhello.la
-
-else
-
-bin_SCRIPTS = helldl
-# create a script that says that -dlopen is not supported
-helldl helldl$(EXEEXT):
- rm -f $@
- echo '#! /bin/sh' > $@
- echo '-dlopen is unsupported' >> $@
- chmod +x $@
-endif
-
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
-#----------------------------------------------------------------------
-# The following declarations are only used in the testsuite:
-#----------------------------------------------------------------------
-
-hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL
-CLEANFILES = $(hardcode_tests)
-
-# Unfortunately, in order to test libtool thoroughly, we need access
-# to its private directory.
-objdir = `$(LIBTOOL) --config | sed -n -e 's/^objdir=\(.*\)$$/\1/p'`
-
-# Test programs to see what gets hardcoded.
-.PHONY: hardcode
-hardcode: $(hardcode_tests)
-SET_HARDCODE_FLAGS = \
- eval `$(LIBTOOL) --config | sed -n -e '/^hardcode_.*=/p; /^wl=/p'`
-hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
- @rm -f hc-direct
- @echo "You may ignore any linking errors from the following command:"
- @shlib=./$(objdir)/libhello.a; \
- eval "`grep '^library_names' libhello.la`"; \
- for lib in $$library_names; do \
- shlib="./$(objdir)/$$lib"; \
- done; \
- $(SET_HARDCODE_FLAGS); \
- libdir=$(libdir); \
- flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
- echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
- eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
- @$(SET_HARDCODE_FLAGS); \
- libdir=`pwd`/$(objdir); \
- flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
- if test -z "$$flag"; then \
- echo "echo unsupported > $@"; \
- echo unsupported > $@ || status="$$?"; \
- else \
- echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) $(LIBM)"; \
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) $(LIBM) || status="$$?"; \
- fi; \
- exit $$status
-
-hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
- @rm -f hc-libpath
- @echo "You may ignore any linking errors from the following command:"
- @$(SET_HARDCODE_FLAGS); \
- eval `$(LIBTOOL) --config | grep '^shlibpath_var='`; \
- libdir=$(libdir); \
- flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
- echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
- eval "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
- @rm -f hc-minusL
- @$(SET_HARDCODE_FLAGS); \
- libdir=$(libdir); \
- flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
- echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \
- eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"
-
-# This is one of the essential tests for deplibs_check_method=pass_all.
-# If this one passes with pass_all, it is likely that pass_all works
-EXTRA_LIBRARIES = libhell0.a
-libhell0_a_SOURCES =
-libhell0_a_LIBADD = longer_file_name_hello.$(OBJEXT) longer_file_name_foo.$(OBJEXT)
-EXTRA_LTLIBRARIES = libhell1.la libhell2.la
-libhell1_la_SOURCES = longer_file_name_hell1.c
-libhell1_la_LIBADD = -L. -lhell0
-libhell1_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell1_la_DEPENDENCIES = libhell0.a
-libhell2_la_SOURCES = longer_file_name_hell2.c
-libhell2_la_LIBADD = -L. -lhell0
-libhell2_la_LDFLAGS = -no-undefined -rpath $(libdir)
-libhell2_la_DEPENDENCIES = libhell0.a
-EXTRA_PROGRAMS = hell0
-hell0_SOURCES = longer_file_name_main.c
-hell0_LDADD = libhell1.la libhell2.la $(LIBM)
-
-# 'hell0' in EXTRA_PROGRAMS gets translated to 'hell0.exe'; but we
-# must explicitly list the wrapper script 'hell0'. (bin_PROGRAMS
-# are handled seamlessly by automake rules; the extra step is only
-# necessary for EXTRA_PROGRAMS)
-CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) hell0
-
-deplibs-check: hell0
-
-# Workaround a bug in Autoconf-2.61 and earlier that don't clean up
-# file droppings left by many compilers:
-distclean-local:
- ac_files="a.out.* a.exe.* a_out.exe.* b.out.* conftest.*"; \
- for ac_file in $$ac_files; do \
- case $$ac_file in \
- *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) rm -rf $$ac_file ;; \
- esac; \
- done
diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac
deleted file mode 100644
index 5fe89c7b..00000000
--- a/tests/pdemo/configure.ac
+++ /dev/null
@@ -1,73 +0,0 @@
-# Process this file with autoconf to create configure. -*- autoconf -*-
-#
-# Copyright (C) 2001, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-#
-# 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
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-AC_PREREQ(2.54)
-
-
-## ------------------------ ##
-## Autoconf initialisation. ##
-## ------------------------ ##
-AC_INIT([pdemo], [1.0], [bug-libtool@gnu.org])
-AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../build-aux])
-
-
-## ------------------------ ##
-## Automake Initialisation. ##
-## ------------------------ ##
-AM_INIT_AUTOMAKE
-
-
-## ------------------ ##
-## C compiler checks. ##
-## ------------------ ##
-AC_PROG_CC
-
-
-## ----------------------- ##
-## Libtool initialisation. ##
-## ----------------------- ##
-LT_INIT([dlopen])
-AC_SUBST([LIBTOOL_DEPS])
-
-STATIC=
-test yes = "$enable_static" && STATIC=-static
-AC_SUBST([STATIC])
-
-case $lt_cv_sys_global_symbol_pipe in
- ?*) binary_helldl=yes ;;
-esac
-AM_CONDITIONAL([BINARY_HELLDL], [test yes = "$binary_helldl"])
-
-
-## ---------------------------- ##
-## Libraries required by pdemo. ##
-## ---------------------------- ##
-LT_LIB_M
-
-
-## -------- ##
-## Outputs. ##
-## -------- ##
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tests/pdemo/foo.h b/tests/pdemo/foo.h
deleted file mode 100644
index 18437836..00000000
--- a/tests/pdemo/foo.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* foo.h -- interface to the libfoo library
-
- Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc.
- Written by Gord Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-/* Only include this header file once. */
-#ifndef _FOO_H_
-#define _FOO_H_ 1
-
-/* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
- * earlier do not define __CYGWIN__. This snippet allows us to check
- * for __CYGWIN32__ reliably for both old and (probable) future releases.
- */
-#ifdef __CYGWIN__
-# ifndef __CYGWIN32__
-# define __CYGWIN32__
-# endif
-#endif
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use __END_DECLS at
- the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
- that don't understand ANSI C prototypes still work, and ANSI C
- compilers can issue warnings about type mismatches. */
-#undef LTDL_PARAMS
-#if defined __STDC__ || defined _AIX || (defined __mips && defined _SYSTYPE_SVR4) || defined __CYGWIN32__ || defined __cplusplus
-# define LT_PARAMS(protos) protos
-# define lt_ptr_t void*
-#else
-# define LT_PARAMS(protos) ()
-# define lt_ptr_t char*
-#endif
-
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
- relocations are performed -- see ld's documentation on pseudo-relocs. */
-# define LT_DLSYM_CONST
-#elif defined __osf__
-/* This system does not cope well with relocations in const data. */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-#if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
-# ifdef BUILDING_LIBHELLO
-# ifdef DLL_EXPORT
-# define LIBHELLO_SCOPE extern __declspec (dllexport)
-# endif
-# else
-# define LIBHELLO_SCOPE extern __declspec (dllimport)
-# endif
-#endif
-#ifndef LIBHELLO_SCOPE
-# define LIBHELLO_SCOPE extern
-#endif
-
-/* Silly constants that the functions return. */
-#define HELLO_RET 0xe110
-#define FOO_RET 0xf00
-
-
-/* Declarations. Note the wonderful use of the above macros. */
-__BEGIN_DECLS
-int foo LT_PARAMS((void));
-int foo2 LT_PARAMS((void));
-int hello LT_PARAMS((void));
-LIBHELLO_SCOPE int nothing;
-__END_DECLS
-
-#endif /* !_FOO_H_ */
diff --git a/tests/pdemo/longer_file_name_dlmain.c b/tests/pdemo/longer_file_name_dlmain.c
deleted file mode 100644
index 73caa78d..00000000
--- a/tests/pdemo/longer_file_name_dlmain.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* dlmain.c -- hello test program that uses simulated dynamic linking
-
- Copyright (C) 1996-1999, 2004, 2006, 2007, 2010 Free Software
- Foundation, Inc.
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-#include <stdio.h>
-#include <string.h>
-
-#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
-
-typedef struct
-{
- const char *name;
- lt_ptr_t address;
-} lt_dlsymlist;
-
-extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[];
-
-int
-main (int argc, char **argv)
-{
- const lt_dlsymlist *s;
- int (*pfoo)() = 0;
- int (*phello)() = 0;
- int *pnothing = 0;
-
- printf ("Welcome to *modular* GNU Hell!\n");
-
- /* Look up the symbols we require for this demonstration. */
- s = lt_preloaded_symbols;
- while (s->name)
- {
- if (s->address) {
- const char *name = s->name;
- printf ("found symbol: %s\n", name);
- if (!strcmp ("hello", name))
- phello = (int(*)())s->address;
- else if (!strcmp ("foo", name))
- pfoo = (int(*)())s->address;
- else if (!strcmp ("nothing", name))
-#ifndef _WIN32
- /* In an ideal world we could do this... */
- pnothing = (int*)s->address;
-#else /* !_WIN32 */
- /* In an ideal world a shared lib would be able to export data */
- pnothing = (int*)&nothing;
-#endif
- } else
- printf ("found file: %s\n", s->name);
- s ++;
- }
-
- /* Try assigning to the nothing variable. */
- if (pnothing)
- *pnothing = 1;
- else
- fprintf (stderr, "did not find the `nothing' variable\n");
-
- /* Just call the functions and check return values. */
- if (pfoo)
- {
- if ((*pfoo) () != FOO_RET)
- return 1;
- }
- else
- fprintf (stderr, "did not find the `foo' function\n");
-
- if (phello)
- {
- if ((*phello) () != HELLO_RET)
- return 3;
- }
- else
- fprintf (stderr, "did not find the `hello' function\n");
-
- return 0;
-}
diff --git a/tests/pdemo/longer_file_name_foo.c b/tests/pdemo/longer_file_name_foo.c
deleted file mode 100644
index 9d923043..00000000
--- a/tests/pdemo/longer_file_name_foo.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* foo.c -- trivial test function for libfoo
-
- Copyright (C) 1996-1999, 2007, 2010 Free Software Foundation, Inc.
- Written by Gordon Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-
-#include <stdio.h>
-#include <math.h>
-
-/* Give a global variable definition. */
-int nothing = FOO_RET;
-
-int
-foo ()
-{
- printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
- return FOO_RET;
-}
diff --git a/tests/pdemo/longer_file_name_foo2.c b/tests/pdemo/longer_file_name_foo2.c
deleted file mode 100644
index 65d3bba3..00000000
--- a/tests/pdemo/longer_file_name_foo2.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* foo.c -- trivial test function for libfoo
-
- Copyright (C) 1996-1999, 2007, 2010 Free Software Foundation, Inc.
- Written by Gordon Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-
-#include <stdio.h>
-#include <math.h>
-
-int
-foo2()
-{
- printf ("foo2 cos (0.0) = %g\n", (double) cos ((double) 0.0));
- return FOO_RET;
-}
diff --git a/tests/pdemo/longer_file_name_hell1.c b/tests/pdemo/longer_file_name_hell1.c
deleted file mode 100644
index 98025e8f..00000000
--- a/tests/pdemo/longer_file_name_hell1.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* longer_file_name_hell1.c -- trivial test function for libfoo
-
- Copyright (C) 1996 Free Software Foundation, Inc.
- Written by Gord Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-int hell1() { return 1; }
diff --git a/tests/pdemo/longer_file_name_hell2.c b/tests/pdemo/longer_file_name_hell2.c
deleted file mode 100644
index d3468cab..00000000
--- a/tests/pdemo/longer_file_name_hell2.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* longer_file_name_hell2.c -- trivial test function for libfoo
- Copyright (C) 1996 Free Software Foundation, Inc.
- Written by Gord Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-int hell2() { return 2; }
diff --git a/tests/pdemo/longer_file_name_hello.c b/tests/pdemo/longer_file_name_hello.c
deleted file mode 100644
index a7847fad..00000000
--- a/tests/pdemo/longer_file_name_hello.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* hello.c -- trivial test function for libfoo
-
- Copyright (C) 1996-1999 Free Software Foundation, Inc.
- Written by Gord Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#define _LIBFOO_COMPILATION
-#include "foo.h"
-#undef _LIBFOO_COMPILATION
-
-#include <stdio.h>
-
-int
-hello ()
-{
- printf ("** This is not GNU Hello. There is no built-in mail reader. **\n");
- return HELLO_RET;
-}
diff --git a/tests/pdemo/longer_file_name_main.c b/tests/pdemo/longer_file_name_main.c
deleted file mode 100644
index 572ca4bd..00000000
--- a/tests/pdemo/longer_file_name_main.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* main.c -- trivial hello test program
-
- Copyright (C) 1996-1999, 2006 Free Software Foundation, Inc.
- Written by Gord Matzigkeit, 1996
-
- 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
-along with GNU Libtool; see the file COPYING. If not, a copy
-can be downloaded from http://www.gnu.org/licenses/gpl.html,
-or obtained by writing to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#include "foo.h"
-#include <stdio.h>
-
-int
-main ()
-{
- printf ("Welcome to GNU Hell!\n");
-
- /* Try assigning to the nothing variable */
- nothing = 1;
-
- /* Just call the functions and check return values. */
- if (foo () != FOO_RET)
- return 1;
-
- if (foo2() != FOO_RET)
- return 1;
-
- if (hello () != HELLO_RET)
- return 2;
-
- return 0;
-}