Index: Makefile.in
--- Makefile.in.orig	2012-05-30 21:46:28.000000000 +0200
+++ Makefile.in	2012-06-01 23:46:32.000000000 +0200
@@ -66,8 +66,8 @@
 # shared library.
 SHAREDOPTS = $(filter-out -DUSEGC, $(DEFS)) $(CFLAGS) -fPIC -DFOR_SHARED
 
-CXX = @CXX@ -Wall
-CC = @CC@ -Wall
+CXX = @CXX@ @CPPFLAGS@ @CXXFLAGS@
+CC = @CC@ @CPPFLAGS@ @CFLAGS@
 MAKEDEPEND = $(OPTS) -O0 -M -DDEPEND
 BISON = bison
 LEX = @LEX@
@@ -208,7 +208,7 @@
 	  texhash; \
 	fi
 
-install-asy: asy sty
+install-asy:
 	${INSTALL} -d $(bindir) $(asydir) $(GUIdir) $(exampledir) \
           $(animationsdir)
 	-${INSTALL} -d $(latexdir)
@@ -217,7 +217,7 @@
 	${INSTALL} -p -m 644 base/*.asy $(addprefix base/,$(EXTRA)) \
 		asy-keywords.el $(asydir)
 	${INSTALL} -p -m 755 GUI/*.py $(GUIdir)
-	ln -sf @datadir@/asymptote/GUI/xasy.py $(bindir)/$(XNAME)
+	ln $(datadir)/asymptote/GUI/xasy.py $(bindir)/$(XNAME)
 	${INSTALL} -p -m 644 examples/*.asy $(addprefix examples/,$(EXEXTRA)) \
 	  doc/extra/*.asy $(addprefix doc/,$(DOCEXTRA)) $(exampledir)
 	${INSTALL} -p -m 644 examples/animations/*.asy \
Index: doc/Makefile.in
--- doc/Makefile.in.orig	2012-05-30 21:46:05.000000000 +0200
+++ doc/Makefile.in	2012-06-01 23:45:05.000000000 +0200
@@ -5,10 +5,10 @@
 DOCFILES = asymptote.pdf asy-latex.pdf CAD.pdf TeXShopAndAsymptote.pdf \
            asyRefCard.pdf
 
-docdir = $(DESTDIR)@docdir@
+docdir = $(DESTDIR)@prefix@/share/doc/asymptote
 infodir = $(DESTDIR)@infodir@
 datarootdir = @datarootdir@
-INSTALL = @INSTALL@
+INSTALL = @prefix@/bin/ginstall -c
 TEXI2DVI = @TEXI2DVI@
 
 export docdir infodir INSTALL
