Only export symbols starting with razor_ in dynamic library.
Apart from being good practice to avoid clashes with higher-level
libraries and the application, this also fixes an obscure bug: The
gnulib library is used both by librazor (the dynamic library) and
by razor (the executable). In doing so, we want to have two separate
copies of the library despite the code duplication this involves.
Without the explicit limit to export only razor_ symbols, the razor
executable under mingw64 was picking up the getopt_long function
from librazor and the optind variable from libgnu which meant that
it did not see optind changing. Hiding librazor's copy of getopt
causes the linker to find libgnu's copy and everything works.
Note that under mingw librazor-#.dll still contains undocumented
(private) razor_ symbols but these will do no harm as long as nobody
tries to use them.
1 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
3 # This file is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This file is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this file. If not, see <http://www.gnu.org/licenses/>.
16 # As a special exception to the GNU General Public License,
17 # this file may be distributed as part of a program that
18 # contains a configuration script generated by Autoconf, under
19 # the same distribution terms as the rest of that program.
21 # Generated by gnulib-tool.
23 # This file represents the specification of how gnulib-tool is used.
24 # It acts as a cache: It is written and read by gnulib-tool.
25 # In projects that use version control, this file is meant to be put under
26 # version control, like the configure.ac and various Makefile.am files.
29 # Specification in the form of a command-line invocation:
30 # gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-conditional-dependencies --libtool --macro-prefix=gl fnmatch fnmatch-posix fsync getopt-gnu mkdir mkdtemp
32 # Specification in the form of a few gnulib-tool.m4 macro invocations:
47 gl_TESTS_BASE([tests])
53 gl_WITNESS_C_MACRO([])