diff -Nurd -x'*~' truevision-0.5.5.orig/Makefile.am truevision-0.5.5/Makefile.am
--- truevision-0.5.5.orig/Makefile.am	2005-05-23 15:08:07.000000000 -0400
+++ truevision-0.5.5/Makefile.am	2007-07-25 17:21:44.000000000 -0400
@@ -4,6 +4,7 @@
 endif
 
 SUBDIRS = po macros ftgl src pixmaps $(python_DIR) materials doc
+ACLOCAL_AMFLAGS = -I macros
 
 truevisiondocdir = ${prefix}/share/doc/truevision
 truevisiondoc_DATA = \
diff -Nurd -x'*~' truevision-0.5.5.orig/configure.in truevision-0.5.5/configure.in
--- truevision-0.5.5.orig/configure.in	2005-10-01 01:00:57.000000000 -0400
+++ truevision-0.5.5/configure.in	2007-07-25 19:17:49.000000000 -0400
@@ -123,20 +123,7 @@
 dnl*************************************************
 dnl GTKGLEXT
 dnl*************************************************
-AC_ARG_WITH(GTKGL-prefix,  [  --with-gtkglext-prefix=DIR    Prefix where GtkGLExt is installed])
-if test "x$with_GTKGL_prefix" = "x" ; then
- GTKGL_LDOPTS="-lgdkglext-x11-1.0"
-  GTKGL_CFLAGS="-I/usr/include/gtkglext-1.0/ -I/usr/local/include/gtkglext-1.0/ -I/usr/lib/gtkglext-1.0/include/ -I/usr/local/lib/gtkglext-1.0/include/"
- else
-  GTKGL_LDOPTS="-L$with_gtkglext_prefix/lib"
-  GTKGL_CFLAGS="-I$with_gtkglext_prefix/include/gtkglext-1.0/"
- fi
- AC_CHECK_LIB(gtkglext-x11-1.0, gtk_gl_init, have_gtkglext=yes, , $LIBS $GNOME_LIBS $GL_LIBS $GTK_LIBS $GTKGL_LDOPTS )
- if test "x$have_gtkglext" = "x" ; then
- 	AC_MSG_ERROR([Missing gtkglext library])	
- else
- 	LIBS="$LIBS $GTKGL_LDOPTS -lgtkglext-x11-1.0"
- fi
+PKG_CHECK_MODULES(GTKGL, gtkglext-x11-1.0 ,,exit)
  
 dnl***********************************************
 dnl Python
@@ -190,9 +177,9 @@
 dnl*************************************************
 dnl Libraries
 dnl*************************************************
-CXXFLAGS="$CXXFLAGS $PYTHON_INCLUDES $GTK_CFLAGS $GL_CFLAGS $Z_CFLAGS  $GTKGL_CFLAGS  -I/usr/local/include -I. -I.."
+CXXFLAGS="$CXXFLAGS $PYTHON_INCLUDES $GTK_CFLAGS $GL_CFLAGS $Z_CFLAGS  $GTKGL_CFLAGS"
 dnl CXXFLAGS="$CXXFLAGS $GTK_CFLAGS $GL_CFLAGS $Z_CFLAGS  $GTKGL_CFLAGS  -I/usr/local/include -I. -I.."
-LIBS="$LIBS $PYTHON_LDFLAGS $GL_LIBS $Z_LIBS $GTKGL_LDOPTS  -L/usr/local/lib -L/usr/lib -lfreetype"
+LIBS="$LIBS $PYTHON_LDFLAGS $GL_LIBS $Z_LIBS $GTKGL_LIBS -lfreetype"
 dnl LIBS="$LIBS $GL_LIBS $Z_LIBS $GTKGL_LDOPTS  -L/usr/local/lib -L/usr/lib -lfreetype"
 AC_SUBST(CFLAGS)
 AC_SUBST(LIBS)
diff -Nurd -x'*~' truevision-0.5.5.orig/ftgl/Makefile.am truevision-0.5.5/ftgl/Makefile.am
--- truevision-0.5.5.orig/ftgl/Makefile.am	2005-04-01 02:43:11.000000000 -0500
+++ truevision-0.5.5/ftgl/Makefile.am	2007-07-25 17:29:24.000000000 -0400
@@ -5,8 +5,7 @@
 ## 	Please disable it in the Anjuta project configuration
 
 INCLUDES = \
-	$(GNOME_CFLAGS)\
-	 -I/usr/include -I/usr/local/include
+	$(GNOME_CFLAGS)
 
 AM_CFLAGS =\
 	 -Wall\
diff -Nurd -x'*~' truevision-0.5.5.orig/macros/check-utmp.m4 truevision-0.5.5/macros/check-utmp.m4
--- truevision-0.5.5.orig/macros/check-utmp.m4	2003-07-04 17:24:49.000000000 -0400
+++ truevision-0.5.5/macros/check-utmp.m4	2007-07-25 17:23:28.000000000 -0400
@@ -8,7 +8,7 @@
 dnl Test for presence of the field and define HAVE_UT_UT_field macro
 dnl
 
-AC_DEFUN(AC_CHECK_UTMP,[
+AC_DEFUN([AC_CHECK_UTMP],[
 
 AC_CHECK_HEADERS(sys/time.h utmp.h utmpx.h)
 AC_HEADER_TIME
diff -Nurd -x'*~' truevision-0.5.5.orig/macros/gnome-cxx-check.m4 truevision-0.5.5/macros/gnome-cxx-check.m4
--- truevision-0.5.5.orig/macros/gnome-cxx-check.m4	2003-07-04 17:24:49.000000000 -0400
+++ truevision-0.5.5/macros/gnome-cxx-check.m4	2007-07-25 17:23:34.000000000 -0400
@@ -1,5 +1,5 @@
 dnl GNOME_CHECK_CXX(not_found_string)
-AC_DEFUN(GNOME_CHECK_CXX,
+AC_DEFUN([GNOME_CHECK_CXX],
 [
   # see if a C++ compiler exists and works
   AC_REQUIRE([AC_PROG_CXX])dnl
diff -Nurd -x'*~' truevision-0.5.5.orig/macros/linger.m4 truevision-0.5.5/macros/linger.m4
--- truevision-0.5.5.orig/macros/linger.m4	2003-07-04 17:25:00.000000000 -0400
+++ truevision-0.5.5/macros/linger.m4	2007-07-25 17:23:39.000000000 -0400
@@ -1,7 +1,7 @@
 dnl
 dnl Check for struct linger
 dnl
-AC_DEFUN(AC_STRUCT_LINGER, [
+AC_DEFUN([AC_STRUCT_LINGER], [
 av_struct_linger=no
 AC_MSG_CHECKING(struct linger is available)
 AC_TRY_RUN([
diff -Nurd -x'*~' truevision-0.5.5.orig/src/Makefile.am truevision-0.5.5/src/Makefile.am
--- truevision-0.5.5.orig/src/Makefile.am	2005-09-28 15:48:53.000000000 -0400
+++ truevision-0.5.5/src/Makefile.am	2007-07-25 17:30:02.000000000 -0400
@@ -5,8 +5,7 @@
 ## 	Please disable it in the Anjuta project configuration
 
 INCLUDES = \
-	$(GNOME_CFLAGS)\
-	 -I/usr/include -I/usr/local/include
+	$(GNOME_CFLAGS)
 
 AM_CFLAGS =\
 	 -Wall\
@@ -100,8 +99,6 @@
 endif
 
 
-truevision_LDFLAGS = \
-	 -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib -L../ftgl
 
 truevision_LDADD =  \
 	../ftgl/libftgltv.a $(GNOME_LIBS) $(LIBS)
diff -Nurd -x'*~' truevision-0.5.5.orig/src/dlgutils.cc truevision-0.5.5/src/dlgutils.cc
--- truevision-0.5.5.orig/src/dlgutils.cc	2005-09-17 07:34:20.000000000 -0400
+++ truevision-0.5.5/src/dlgutils.cc	2007-07-25 17:41:56.000000000 -0400
@@ -25,9 +25,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include "include/dlgutils.h"
 #include <unistd.h>
 #include <libintl.h>
+#include "include/dlgutils.h"
 #include "include/main.h"
 #include "include/preferences.h"
 #include "config.h"
diff -Nurd -x'*~' truevision-0.5.5.orig/src/povfe.cc truevision-0.5.5/src/povfe.cc
--- truevision-0.5.5.orig/src/povfe.cc	2005-10-03 15:24:37.000000000 -0400
+++ truevision-0.5.5/src/povfe.cc	2007-07-25 18:28:38.000000000 -0400
@@ -1181,7 +1181,7 @@
 {
 	pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
 	//pthread_setcanceltype( PTHREAD_CANCEL_ASYNCHRONOUS, NULL );
-	pipe_console_id = open( pipe_console_name, O_RDONLY | O_SYNC | O_NDELAY );
+	pipe_console_id = open( pipe_console_name, O_RDONLY | O_FSYNC | O_NDELAY );
 	//pipe_console_id = open( pipe_console_name, O_RDONLY  );
 	if (  pipe_console_id== -1 ) {
 		app_warning( _("Cannot read povray output !") );
