|
Packit Service |
9646c7 |
# -*- Autotest -*-
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_BANNER([Compatibility with other tools.])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc.
|
|
Packit Service |
9646c7 |
#
|
|
Packit Service |
9646c7 |
# This program is free software: you can redistribute it and/or modify
|
|
Packit Service |
9646c7 |
# it under the terms of the GNU General Public License as published by
|
|
Packit Service |
9646c7 |
# the Free Software Foundation, either version 3 of the License, or
|
|
Packit Service |
9646c7 |
# (at your option) any later version.
|
|
Packit Service |
9646c7 |
#
|
|
Packit Service |
9646c7 |
# This program is distributed in the hope that it will be useful,
|
|
Packit Service |
9646c7 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
9646c7 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
9646c7 |
# GNU General Public License for more details.
|
|
Packit Service |
9646c7 |
#
|
|
Packit Service |
9646c7 |
# You should have received a copy of the GNU General Public License
|
|
Packit Service |
9646c7 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
## --------- ##
|
|
Packit Service |
9646c7 |
## Libtool. ##
|
|
Packit Service |
9646c7 |
## --------- ##
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_SETUP([Libtool])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Skip this test if there is no libtoolize.
|
|
Packit Service |
9646c7 |
AT_CHECK([libtoolize --version || exit 77],
|
|
Packit Service |
9646c7 |
[ignore], [ignore], [ignore])
|
|
Packit Service |
9646c7 |
# Modern Libtool has further tests for compatibility with older autoconf;
|
|
Packit Service |
9646c7 |
# from the Autoconf side, we will merely assume newer libtool.
|
|
Packit Service |
9646c7 |
AT_CHECK([[
|
|
Packit Service |
9646c7 |
case `libtoolize --version |
|
|
Packit Service |
9646c7 |
sed -n '/^.* \([0-9][0-9.a-z]*\)$/{
|
|
Packit Service |
9646c7 |
s//\1/
|
|
Packit Service |
9646c7 |
p
|
|
Packit Service |
9646c7 |
q
|
|
Packit Service |
9646c7 |
}'` in
|
|
Packit Service |
9646c7 |
0.* ) exit 77;;
|
|
Packit Service |
9646c7 |
1.* ) exit 77;;
|
|
Packit Service |
9646c7 |
esac]],
|
|
Packit Service |
9646c7 |
[ignore], [ignore], [ignore])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Using a configure.ac, have libtoolize confess where libtool.m4 is.
|
|
Packit Service |
9646c7 |
AT_DATA([configure.ac],
|
|
Packit Service |
9646c7 |
[[AC_INIT
|
|
Packit Service |
9646c7 |
# State that we explicitly want auxiliary files here, so libtoolize
|
|
Packit Service |
9646c7 |
# won't pollute files outside the test directory.
|
|
Packit Service |
9646c7 |
AC_CONFIG_AUX_DIR([.])
|
|
Packit Service |
9646c7 |
AC_PROG_LIBTOOL
|
|
Packit Service |
9646c7 |
]])
|
|
Packit Service |
9646c7 |
AT_CHECK([libtoolize -i], [0], [stdout], [ignore])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Some broken libtoolize fail to install a functional config.guess.
|
|
Packit Service |
9646c7 |
AT_CHECK([./config.guess || exit 77], [], [ignore], [ignore])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Make sure at-path contains something valid, and let the test suite
|
|
Packit Service |
9646c7 |
# display it when verbose. And fail, skipping would too easily hide
|
|
Packit Service |
9646c7 |
# problems.
|
|
Packit Service |
9646c7 |
AT_CHECK([sed -n ["s,^.*\`\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout])
|
|
Packit Service |
9646c7 |
AT_CHECK([test -f "`sed -n 1p stdout`"])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Older libtoolize installed everything but install-sh...
|
|
Packit Service |
9646c7 |
AT_CHECK([test -f install-sh || touch install-sh])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Build the concatenation of libtool.m4 and configure.ac.
|
|
Packit Service |
9646c7 |
AT_CHECK([[sed 's/.*/m4''_include([&])/' stdout]], [0], [stdout])
|
|
Packit Service |
9646c7 |
AT_CHECK([mv stdout aclocal.m4])
|
|
Packit Service |
9646c7 |
cat >configure.ac <<_EOF
|
|
Packit Service |
9646c7 |
AC_INIT
|
|
Packit Service |
9646c7 |
AC_CONFIG_AUX_DIR([.])
|
|
Packit Service |
9646c7 |
AC_CANONICAL_SYSTEM
|
|
Packit Service |
9646c7 |
AC_PROG_LIBTOOL
|
|
Packit Service |
9646c7 |
_EOF
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# FIXME: Once Libtool really fixed, stop ignoring stderr.
|
|
Packit Service |
9646c7 |
AT_CHECK_AUTOCONF([], [], [], [ignore])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
# Ignore stderr, because ltconfig always loads the cache, which is
|
|
Packit Service |
9646c7 |
# /dev/null, and some shells choke on this. For instance with Bash
|
|
Packit Service |
9646c7 |
# 2.05, you get:
|
|
Packit Service |
9646c7 |
#
|
|
Packit Service |
9646c7 |
# loading cache /dev/null within ltconfig
|
|
Packit Service |
9646c7 |
# ./ltconfig: .: /dev/null: not a regular file
|
|
Packit Service |
9646c7 |
#
|
|
Packit Service |
9646c7 |
# But the script executes properly.
|
|
Packit Service |
9646c7 |
AT_CHECK_CONFIGURE([], [], [], [ignore])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_CLEANUP
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_SETUP([shtool])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_DATA([configure.ac],
|
|
Packit Service |
9646c7 |
[[AC_INIT([shtool test], [1.0])
|
|
Packit Service |
9646c7 |
AC_CONFIG_AUX_DIR([build-aux])
|
|
Packit Service |
9646c7 |
AC_PATH_PROG([SHTOOL], [shtool], [false])
|
|
Packit Service |
9646c7 |
AC_PROG_INSTALL
|
|
Packit Service |
9646c7 |
AC_SUBST([ac_install_sh])
|
|
Packit Service |
9646c7 |
AC_CONFIG_FILES([Makefile])
|
|
Packit Service |
9646c7 |
AC_OUTPUT
|
|
Packit Service |
9646c7 |
]])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_DATA([Makefile.in],
|
|
Packit Service |
9646c7 |
[[SHTOOL = @SHTOOL@
|
|
Packit Service |
9646c7 |
# fake these, so that we use shtool wherever possible.
|
|
Packit Service |
9646c7 |
INSTALL_PROGRAM = $(ac_install_sh)
|
|
Packit Service |
9646c7 |
INSTALL_DATA = $(ac_install_sh) -m 644
|
|
Packit Service |
9646c7 |
prefix = @prefix@
|
|
Packit Service |
9646c7 |
ac_install_sh = @ac_install_sh@
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
install:
|
|
Packit Service |
9646c7 |
$(INSTALL_PROGRAM) file1 $(prefix)/file1
|
|
Packit Service |
9646c7 |
$(INSTALL_DATA) file2 $(prefix)/file2
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
copy-shtool:
|
|
Packit Service |
9646c7 |
test '$(SHTOOL)' != false
|
|
Packit Service |
9646c7 |
cp '$(SHTOOL)' build-aux
|
|
Packit Service |
9646c7 |
]])
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
: >file1
|
|
Packit Service |
9646c7 |
: >file2
|
|
Packit Service |
9646c7 |
chmod +x file1
|
|
Packit Service |
9646c7 |
: "${MAKE=make}"
|
|
Packit Service |
9646c7 |
mkdir build-aux inst
|
|
Packit Service |
9646c7 |
instdir=`pwd`/inst
|
|
Packit Service |
9646c7 |
AT_CHECK_AUTOCONF
|
|
Packit Service |
9646c7 |
cp "$abs_top_srcdir/build-aux/install-sh" build-aux
|
|
Packit Service |
9646c7 |
AT_CHECK_CONFIGURE
|
|
Packit Service |
9646c7 |
AT_CHECK([$MAKE copy-shtool], [], [ignore], [ignore],
|
|
Packit Service |
9646c7 |
[AT_CHECK([: >build-aux/shtool])])
|
|
Packit Service |
9646c7 |
rm -f build-aux/install-sh
|
|
Packit Service |
9646c7 |
AT_CHECK_CONFIGURE([--prefix="$instdir" ac_cv_path_SHTOOL=false])
|
|
Packit Service |
9646c7 |
AT_CHECK([grep '^ac_install_sh = .*shtool install -c' Makefile], [], [ignore])
|
|
Packit Service |
9646c7 |
if test -s build-aux/shtool; then
|
|
Packit Service |
9646c7 |
AT_CHECK([$MAKE install], [], [ignore], [ignore])
|
|
Packit Service |
9646c7 |
AT_CHECK([test -f inst/file1 && test -f inst/file2 && test -x inst/file1])
|
|
Packit Service |
9646c7 |
fi
|
|
Packit Service |
9646c7 |
|
|
Packit Service |
9646c7 |
AT_CLEANUP
|