# HG changeset patch
# User Akos Ladanyi <ladanyi@tmit.bme.hu>
# Date 1230984938 0
# Node ID 484fff1afecd8a2118d688b5be34640bb6e56a03
# Parent  a291609dad527edda0385431ccef4de4510f0616
Move pkg-config invocation to the Makefile from configure

diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -43,10 +43,12 @@
 	mv lemon.tag.tmp lemon.tag || \
 	rm lemon.tag.tmp
 
+LEMON_CFLAGS = $(shell pkg-config --cflags lemon)
+LEMON_LIBS = $(shell pkg-config --libs lemon)
 
 $(DEMOS): demo/build/%: demo/%.cc
 	-mkdir -p demo/build
-	g++ -o $@ @lemon_cflags@ @lemon_libs@ \
+	g++ -o $@ $(LEMON_CFLAGS) $(LEMON_LIBS) \
 	-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy \
 	-Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings \
 	-Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align \
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -58,11 +58,6 @@
 fi
 lemon_doc_prefix=$(echo $lemon_doc_prefix|sed 's/\//\\\\\\\//g')
 
-lemon_cflags=$(pkg-config --cflags lemon|sed 's/\//\\\//g')
-lemon_libs=$(pkg-config --libs lemon|sed 's/\//\\\//g')
 
-
-sed -e "s/@lemon_cflags@/${lemon_cflags}/g" \
-    -e "s/@lemon_libs@/${lemon_libs}/g" \
-   -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \
+sed -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \
     < Makefile.in > Makefile
