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.
2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
9 (test -f $srcdir/configure.ac) || {
10 echo -n "**Error**: Directory $srcdir does not look like the"
11 echo " top-level package directory"
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
17 echo "**Error**: You must have autoconf installed."
18 echo "Download the appropriate package for your distribution,"
19 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
23 (grep "^LT_INIT\|^A[MC]_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
24 (libtool --version) < /dev/null > /dev/null 2>&1 || {
26 echo "**Error**: You must have libtool installed."
27 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
32 (automake --version) < /dev/null > /dev/null 2>&1 || {
34 echo "**Error**: You must have automake installed."
35 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
41 # if no automake, don't bother testing for aclocal
42 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
44 echo "**Error**: Missing aclocal. The version of automake"
45 echo "installed doesn't appear recent enough."
46 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
50 if [ -z "$GNULIB_TOOL" ]; then
51 GNULIB_TOOL=`which gnulib-tool`
52 if [ -z "$GNULIB_TOOL" ]; then
54 echo "**Error**: Missing gnulib-tool. Set GNULIB_TOOL to point"
55 echo "to a copy of gnulib-tool which is not in your PATH."
56 echo "You can get gnulib from http://www.gnu.org/software/gnulib/"
61 if test "$DIE" -eq 1; then
66 echo "**Warning**: I am going to run configure with no arguments."
67 echo "If you wish to pass any to it, please specify them on the"
68 echo $0 " command line."
74 am_opt=--include-deps;;
77 aclocalinclude="-I gl/m4 $ACLOCAL_FLAGS"
79 if grep "^LT_INIT\|^A[MC]_PROG_LIBTOOL" configure.ac >/dev/null; then
80 if test -z "$NO_LIBTOOLIZE" ; then
81 echo "Running libtoolize..."
82 libtoolize --force --copy
85 echo "Running aclocal $aclocalinclude ..."
86 aclocal $aclocalinclude
87 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
88 echo "Running autoheader..."
91 echo "Running automake --gnu -Wno-portability $am_opt ..."
92 automake --add-missing --gnu -Wno-portability $am_opt
93 echo "Running autoconf ..."
96 intltoolize --copy --force --automake || exit 1
98 gtkdocize --copy --flavour no-tmpl
100 echo "Running $GNULIB_TOOL --update ..."
101 $GNULIB_TOOL --update
103 conf_flags="--enable-maintainer-mode"
105 if test x$NOCONFIGURE = x; then
106 echo "Running $srcdir/configure $conf_flags $@ ..."
107 $srcdir/configure $conf_flags "$@" \
108 && echo "Now type make to compile." || exit 1
110 echo "Skipping configure process."