--- config.mak.orig    2009-11-22 01:56:12.000000000 +0100
+++ config.mak 2009-11-22 14:03:58.000000000 +0100
@@ -18,8 +18,8 @@
 CAIRO_CFLAGS  ?= $(shell pkg-config --cflags cairo)
 CAIRO_LIBS    ?= $(shell pkg-config --libs cairo)
 ifndef MACOS
-LUA_CFLAGS    ?= $(shell pkg-config --cflags lua5.1)
-LUA_LIBS      ?= $(shell pkg-config --libs lua5.1)
+LUA_CFLAGS    ?= -I$(LUA_INCDIR)
+LUA_LIBS      ?= -L$(LUA_LIBDIR) -llua
 QT_CFLAGS     ?= $(shell pkg-config --cflags QtGui QtCore)
 QT_LIBS             ?= $(shell pkg-config --libs QtGui QtCore)
 #
@@ -75,6 +75,7 @@
 #IPEPREFIX  := /usr/local
 #IPEPREFIX  := /usr
 #IPEPREFIX  := /opt/ipe7
+IPEPREFIX  := $(PREFIX)
 #
 ifeq "$(IPEPREFIX)" ""
 $(error You need to specify IPEPREFIX!)
@@ -115,11 +116,11 @@
 #
 # IPEDOCDIR contains the Ipe documentation (mostly html files)
 #
-IPEDOCDIR = $(IPEPREFIX)/share/ipe/$(IPEVERS)/doc
+IPEDOCDIR = $(IPEPREFIX)/share/doc/ipe/$(IPEVERS)
 #
 # The Ipe manual pages are installed into IPEMANDIR
 #
-IPEMANDIR = $(IPEPREFIX)/share/man/man1
+IPEMANDIR = $(IPEPREFIX)/man/man1
 #
 # The full path to the Ipe fontmap
 #
