# Copyright © 2012, 2020 Nick Bowler # # This program 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 3 of the License, or # (at your option) any later version. # # This program 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 this program. If not, see . m4_define([LIBTOOL_VARS], [eval `sed -n[]m4_foreach([var], m4_cdr($@), [ -e '/^var='/p]) <$1`]) dnl Verify that all symbols in the static library are properly prefixed. AT_SETUP([libcdecl static symbol prefixes]) AT_CHECK([{ $LIBTOOL --config || exit 99; } >libtool.cfg]) LIBTOOL_VARS([libtool.cfg], [objdir], [build_old_libs]) AT_SKIP_IF([test x"$build_old_libs" = x"no"]) LIBTOOL_VARS([$builddir/libcdecl.la], [old_library]) archive="$builddir/$objdir/$old_library" AT_CHECK([$SHELL "$builddir/exported.sh" "$archive" || exit 99], [0], [stdout]) AT_CHECK([sed '/^cdecl_/d' stdout]) AT_CLEANUP