diff -u sge020904/Makefile sge020904_patch2/Makefile
--- sge020904/Makefile	Thu Sep  5 02:48:23 2002
+++ sge020904_patch2/Makefile	Sun Oct 20 16:26:03 2002
@@ -11,6 +11,9 @@
   CFLAGS +=-D_SGE_C
 endif
 
+#ifeq ($(C_AND_CPP),y)
+#  CFLAGS +=-D _SGE_C_AND_CPP
+#endif
 
 OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
 
@@ -49,6 +52,9 @@
 ifeq ($(NO_CLASSES),y)
 	@echo "#define _SGE_NO_CLASSES" >>sge_config.h
 endif
+ifeq ($(C_AND_CPP),y)
+	@echo "#define _SGE_C_AND_CPP" >>sge_config.h
+endif
 
 ifneq ($(QUIET),y)
 	@echo "== SGE r$(SGE_VER)"
@@ -72,13 +78,13 @@
 endif
 
 install:	shared
-	@mkdir -p $(PREFIX)/include/SDL
-	install -c -m 644 sge*.h $(PREFIX)/include/SDL
+	@mkdir -p $(PREFIX)/include/$(SGE_INCLUDEDIR)
+	install -c -m 644 sge*.h $(PREFIX)/include/$(SGE_INCLUDEDIR)
 	@mkdir -p $(PREFIX)/lib
 	install -c -m 644 libSGE.a $(PREFIX)/lib
 	install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(SGE_VER)
 	@cd $(PREFIX)/lib;\
 	rm -f libSGE.so;\
 	ln -s libSGE.so.$(SGE_VER) libSGE.so
-	@echo "** Headerfiles installed in $(PREFIX)/include/SDL"
+	@echo "** Headerfiles installed in $(PREFIX)/include/$(SGE_INCLUDEDIR)"
 	@echo "** Library files installed in $(PREFIX)/lib"
diff -u sge020904/Makefile.conf sge020904_patch2/Makefile.conf
--- sge020904/Makefile.conf	Thu Sep  5 02:59:25 2002
+++ sge020904_patch2/Makefile.conf	Sun Oct 20 16:41:58 2002
@@ -7,27 +7,39 @@
 #USE_IMG = y
 #NO_CLASSES = y
 #QUIET = y
+#INSTALL_ON_FREEBSD = y
+C_AND_CPP = y
 
+# sdl-config command
+SDL_CONFIG = sdl-config
+# Where should SGE header files be installed?
+# Header files should be installed in $(PREFIX)/include/$(SGE_INCLUDEDIR)
+SGE_INCLUDEDIR = SDL
+
+ifeq ($(INSTALL_ON_FREEBSD),y)
+  SDL_CONFIG=sdl11-config
+  SGE_INCLUDEDIR = SDL11
+endif
 
 # Compilers (C and C++)
 CC=gcc
 CXX=g++
 
 
-# Where should SGE be installed?
-PREFIX =$(shell sdl-config --prefix)
+# Where should SGE be installed? 
+PREFIX =$(shell $(SDL_CONFIG) --prefix)
 
 
 # Flags passed to the compiler
 CFLAGS =-Wall -O3 -ffast-math
-SGE_CFLAGS =$(shell sdl-config --cflags)
+SGE_CFLAGS =$(shell $(SDL_CONFIG) --cflags)
 # Uncomment to make some more optimizations
 #CFLAGS =-Wall -O9 -ffast-math -march=i686
 
 
 # Libs config
 # We use sdl-config & freetype-config
-SGE_LIBS =$(shell sdl-config --libs) #-lstdc++
+SGE_LIBS =$(shell $(SDL_CONFIG) --libs) #-lstdc++
 
 
 ifneq ($(NOTTF),y)
diff -u sge020904/sge_bm_text.cpp sge020904_patch2/sge_bm_text.cpp
--- sge020904/sge_bm_text.cpp	Mon Aug 26 03:00:05 2002
+++ sge020904_patch2/sge_bm_text.cpp	Sun Oct 20 16:26:03 2002
@@ -31,7 +31,7 @@
 #include "sge_tt_text.h"
 
 #ifdef _SGE_HAVE_IMG
-#include <SDL/SDL_image.h>
+#include <SDL_image.h>
 #endif
 
 using namespace std;
diff -u sge020904/sge_internal.h sge020904_patch2/sge_internal.h
--- sge020904/sge_internal.h	Wed Aug 28 06:13:44 2002
+++ sge020904_patch2/sge_internal.h	Sun Oct 20 16:26:03 2002
@@ -25,6 +25,18 @@
 /*
 *  C compatibility
 */
+#ifdef _SGE_C_AND_CPP
+
+#ifdef __cplusplus
+/* to use 'extern "C" */
+#define _SGE_C 
+#else
+#define sge_C_ONLY
+#define _SGE_NO_CLASSES
+#endif
+
+#else
+
 #ifndef __cplusplus
 	#define sge_C_ONLY
 	#define _SGE_NO_CLASSES
@@ -34,6 +46,7 @@
 	#define _SGE_NO_CLASSES
 #endif
 
+#endif
 
 /*
 *  This is traditional

