--- Makefile.orig	2012-07-06 17:29:35 UTC
+++ Makefile
@@ -102,13 +102,13 @@ else
   LDFLAGS += $(shell pkg-config --libs glib-2.0)
 
   # Configuration for ncurses
-  ifeq ($(filter Darwin DragonFly OpenBSD,$(OS)),)
+  ifeq ($(filter Darwin DragonFly FreeBSD OpenBSD,$(OS)),)
     CFLAGS  += $(shell ncurses5-config --cflags)
     LDFLAGS += $(shell ncurses5-config --libs) -lpanel
   else
     # OS X is handled separately
     ifneq ($(OS), Darwin)
-      # DragonFly and OpenBSD have ncurses in base (and no config tool)
+      # DragonFly, FreeBSD and OpenBSD have ncurses in base (and no config tool)
       LDFLAGS += -lncurses -lpanel
     endif
   endif
@@ -117,6 +117,8 @@ else
   # Debian and derivates use lua5.1, the rest of the world lua
   ifneq ($(wildcard /etc/debian_version),)
     lua = lua5.1
+  else ifeq ($(OS), FreeBSD)
+    lua = lua-5.1
   else
     lua = lua
   endif
