Index: gap-4r7p5/cnf/gac.in
===================================================================
--- gap-4r7p5.orig/cnf/gac.in	2014-06-27 10:59:58.702470431 +0200
+++ gap-4r7p5/cnf/gac.in	2014-06-27 11:46:42.945936189 +0200
@@ -55,17 +55,11 @@
 ##  option is appended at the end of the link command after the .o
 ##  files to link.
 ##
-gap_bin=@gapbin@
+gap_bin=@GAP_BIN@
 
-if [ "X${gap_bin}" = "X$0" ];  then
-    gap_dir="../../";
-    gap_compiler="./gap";
-    gap_binary="./";
-else
-    gap_dir="${gap_bin}/../..";
-    gap_compiler="${gap_bin}/gap";
-    gap_binary="${gap_bin}";
-fi
+gap_dir="/usr/lib/gap";
+gap_compiler="${gap_bin}/gap";
+gap_binary="${gap_bin}";
 gap_options=""
 gap_include="${gap_dir}/src"
 stat_identifier="USER";
@@ -440,17 +434,17 @@
     objects="${gactmp}/$$compstat.o ${objects}"
 }
 
-make_tmpdir () {
-    basetmp=${TMPDIR:-/tmp}; #honor the TMPDIR environment variable.
-    gactmp="$basetmp/gac$$";
-    mkdir "$gactmp" || exit 1;
-}
+#make_tmpdir () {
+#    basetmp=${TMPDIR:-/tmp}; #honor the TMPDIR environment variable.
+#    gactmp="$basetmp/gac$$";
+#    mkdir "$gactmp" || exit 1;
+#}
 
 #On systems with mktemp(1) this function is better:
-#make_tmpdir ()
-#{
-#    gactmp=`mktemp -d -t "gacXXXXXXX"`;
-#}
+make_tmpdir ()
+{
+    gactmp=`mktemp -d -t "gacXXXXXXX"`;
+}
 
 #############################################################################
 ##
