diff options
author | Eric Blake <eblake@redhat.com> | 2010-03-22 11:21:45 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-03-22 12:09:58 -0600 |
commit | 8a3a47de77958ec2781b94068919083d8abde388 (patch) | |
tree | 237accba1e834ebec251fba63015b185f73aa9f1 /src | |
parent | f17211efe374200d532a9f27173e15b018e5538e (diff) | |
download | grep-8a3a47de77958ec2781b94068919083d8abde388.tar.gz |
build: fix cygwin build
Portions of gnulib depend on -lintl, and cygwin does not allow
lazy linking.
* src/Makefile.am (LDADD): Include libraries in correct order.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5376b97b..08f7aacf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,7 +28,13 @@ noinst_LIBRARIES = libgrep.a libgrep_a_SOURCES = kwset.c dfa.c searchutils.c dfasearch.c kwsearch.c \ pcresearch.c main.c -LDADD = $(LIBINTL) libgrep.a ../lib/libgreputils.a +# Sometimes, the expansion of $(LIBINTL) includes -lc which may +# include modules defining variables like `optind', so libgreputils.a +# must precede $(LIBINTL) in order to ensure we use GNU getopt. +# But libgreputils.a must also follow $(LIBINTL), since libintl uses +# replacement functions defined in libgreputils.a. +LDADD = libgrep.a ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a + grep_LDADD = $(LDADD) $(PCRE_LIBS) localedir = $(datadir)/locale INCLUDES = -I$(top_srcdir)/lib -DLOCALEDIR=\"$(localedir)\" |