gl/m4/gnulib-cache.m4
author J. Ali Harlow <ali@juiblex.co.uk>
Sat Oct 04 18:12:58 2014 +0100 (2014-10-04)
changeset 454 56ff755c268c
parent 438 fab0b8a61dcb
permissions -rw-r--r--
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.
ali@438
     1
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
ali@323
     2
#
ali@438
     3
# This file is free software; you can redistribute it and/or modify
ali@438
     4
# it under the terms of the GNU General Public License as published by
ali@438
     5
# the Free Software Foundation; either version 3 of the License, or
ali@438
     6
# (at your option) any later version.
ali@438
     7
#
ali@438
     8
# This file is distributed in the hope that it will be useful,
ali@438
     9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ali@438
    10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ali@438
    11
# GNU General Public License for more details.
ali@438
    12
#
ali@438
    13
# You should have received a copy of the GNU General Public License
ali@438
    14
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
ali@438
    15
#
ali@438
    16
# As a special exception to the GNU General Public License,
ali@438
    17
# this file may be distributed as part of a program that
ali@438
    18
# contains a configuration script generated by Autoconf, under
ali@323
    19
# the same distribution terms as the rest of that program.
ali@323
    20
#
ali@323
    21
# Generated by gnulib-tool.
ali@323
    22
#
ali@323
    23
# This file represents the specification of how gnulib-tool is used.
ali@323
    24
# It acts as a cache: It is written and read by gnulib-tool.
ali@401
    25
# In projects that use version control, this file is meant to be put under
ali@401
    26
# version control, like the configure.ac and various Makefile.am files.
ali@323
    27
ali@323
    28
ali@323
    29
# Specification in the form of a command-line invocation:
ali@445
    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
ali@323
    31
ali@323
    32
# Specification in the form of a few gnulib-tool.m4 macro invocations:
ali@323
    33
gl_LOCAL_DIR([])
ali@323
    34
gl_MODULES([
ali@323
    35
  fnmatch
ali@323
    36
  fnmatch-posix
ali@336
    37
  fsync
ali@445
    38
  getopt-gnu
ali@326
    39
  mkdir
ali@415
    40
  mkdtemp
ali@323
    41
])
ali@323
    42
gl_AVOID([])
ali@323
    43
gl_SOURCE_BASE([gl])
ali@323
    44
gl_M4_BASE([gl/m4])
ali@323
    45
gl_PO_BASE([])
ali@323
    46
gl_DOC_BASE([doc])
ali@323
    47
gl_TESTS_BASE([tests])
ali@323
    48
gl_LIB([libgnu])
ali@323
    49
gl_MAKEFILE_NAME([])
ali@323
    50
gl_LIBTOOL
ali@323
    51
gl_MACRO_PREFIX([gl])
ali@323
    52
gl_PO_DOMAIN([])
ali@438
    53
gl_WITNESS_C_MACRO([])