0b30ad2
--- bundled/group/apps/polytope/src/Makefile.inc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/group/apps/polytope/src/Makefile.inc	2016-07-24 10:28:59.948123191 -0600
78afad8
@@ -1,11 +1,11 @@
4ad1335
 ifeq (${ImportedIntoExtension},)
cc3a73a
-  StaticLibs := sympol
cc3a73a
+  # StaticLibs := sympol
4ad1335
 
4ad1335
-  sympol_interface$O : ExtraCXXFLAGS += -I${ExtensionTop}/external/sympol
4ad1335
-  sympol_raycomputation_beneathbeyond$O : ExtraCXXFLAGS += -I${ExtensionTop}/external/sympol
4ad1335
+  sympol_interface$O : ExtraCXXFLAGS += -I/usr/include/sympol
4ad1335
+  sympol_raycomputation_beneathbeyond$O : ExtraCXXFLAGS += -I/usr/include/sympol
78afad8
   sympol_raycomputation_ppl$O : ExtraCXXFLAGS += -I${ExtensionTop}/external/sympol
4ad1335
 
cc3a73a
-  LIBS += ${BuildDir}/staticlib/sympol/libsympol$A $(subst %A,${A},${CddLib} ${LrsLib})
4ad1335
+  LIBS += -lsympol -lcddgmp
Jerry James ba7c267
 endif
4ad1335
 
cc3a73a
 ifneq ($(filter 4.4%,${GCCversion}),)
0b30ad2
--- bundled/group/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/group/configure.pl	2016-07-24 10:28:59.960122234 -0600
Jerry James 51c14ed
@@ -28,7 +28,7 @@ sub proceed {
4ad1335
    my ($options)=@_;
4ad1335
    my $boost_path;
4ad1335
    # everything can include permlib headers
4ad1335
-   $CXXflags='-I${ExtensionTop}/external/permlib/include';
4ad1335
+   $CXXflags='-I/usr/include/permlib';
4ad1335
 
4ad1335
    if (defined ($boost_path=$options->{boost})) {
4ad1335
       $boost_path .= '/include' if (-d "$boost_path/include/boost");
0b30ad2
--- bundled/group/staticlib/sympol/Makefile.inc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/group/staticlib/sympol/Makefile.inc	2016-07-24 10:28:59.960122234 -0600
78afad8
@@ -4,7 +4,7 @@ src := ${ExtensionTop}/external/sympol/s
4ad1335
 
78afad8
 vpath %.cpp $(src)
cc3a73a
 
78afad8
-ExtraCXXFLAGS := -I${ExtensionTop}/external/permlib/include -I${ExtensionTop}/external/sympol/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL 
78afad8
+ExtraCXXFLAGS := -I/usr/include/permlib -I/usr/include/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL
4ad1335
 
4ad1335
 # Local Variables:
4ad1335
 # mode: Makefile
0b30ad2
--- bundled/libnormaliz/apps/polytope/src/Makefile.inc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/libnormaliz/apps/polytope/src/Makefile.inc	2016-07-24 10:28:59.960122234 -0600
Jerry James 74d8a20
@@ -1,4 +1,5 @@
78afad8
-ExtraCXXFLAGS = -I$(ExtensionTop)/external/libnormaliz
78afad8
+ExtraCXXFLAGS = -I/usr/include/libnormaliz
78afad8
+LIBS += -lnormaliz
Jerry James 74d8a20
 
78afad8
 # force a recent C++ standard for normaliz but keep it compatible with older
78afad8
 # gcc versions and use tr1/unordered_{map,set} for polymake data structures
0b30ad2
--- bundled/libnormaliz/apps/polytope/src/normaliz.cc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/libnormaliz/apps/polytope/src/normaliz.cc	2016-07-24 10:28:59.960122234 -0600
78afad8
@@ -78,7 +78,7 @@ namespace libnormaliz {
Jerry James 6ad2239
    }
Jerry James 74d8a20
 }
Jerry James 74d8a20
 
78afad8
-#include "libnormaliz/libnormaliz-all.cpp"
Jerry James 74d8a20
+#include <libnormaliz/cone.h>
Jerry James 74d8a20
 
Jerry James 6ad2239
 namespace libnormaliz {
78afad8
    template<>
0b30ad2
--- bundled/nauty/apps/graph/src/Makefile.inc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/nauty/apps/graph/src/Makefile.inc	2016-07-24 10:28:59.961122154 -0600
f85e0a1
@@ -1,9 +1,9 @@
f85e0a1
 ifeq (${ImportedIntoExtension},)
f85e0a1
-  StaticLibs := nauty
f85e0a1
+  # StaticLibs := nauty
f85e0a1
 
f85e0a1
-  GraphIso$O : ExtraCXXFLAGS = -DBIGNAUTY -I${BuildDir}/staticlib/nauty
f85e0a1
+  GraphIso$O : ExtraCXXFLAGS = -DBIGNAUTY -I/usr/include/nauty
f85e0a1
 
f85e0a1
-  LIBS += ${BuildDir}/staticlib/nauty/libnauty$A
f85e0a1
+  LIBS += -lnauty
f85e0a1
 endif
f85e0a1
 
f85e0a1
 # Local Variables:
0b30ad2
--- bundled/nauty/staticlib/nauty/Makefile.inc.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ bundled/nauty/staticlib/nauty/Makefile.inc	2016-07-24 10:32:04.655400694 -0600
0b30ad2
@@ -1,10 +1,10 @@
f85e0a1
-OwnLibrary := libnauty
f85e0a1
-LibModules := nauty naututil nautil nautinv naugraph rng naurng schreier nausparse nautaux
0b30ad2
-ifeq (${NautySrc},)
0b30ad2
-  src := ${ExtensionTop}/external/nauty
0b30ad2
-else
0b30ad2
-  src := ${NautySrc}
0b30ad2
-endif
f85e0a1
+#OwnLibrary := libnauty
f85e0a1
+#LibModules := nauty naututil nautil nautinv naugraph rng naurng schreier nausparse nautaux
0b30ad2
+#ifeq (${NautySrc},)
0b30ad2
+#  src := ${ExtensionTop}/external/nauty
0b30ad2
+#else
0b30ad2
+#  src := ${NautySrc}
0b30ad2
+#endif
f85e0a1
 vpath %.c $(src)
f85e0a1
 
f85e0a1
 # We need to disable avx2 for some gcc versions as it produces invalid relocations
0b30ad2
@@ -15,18 +15,18 @@ ifdef GCCversion
f85e0a1
   endif
f85e0a1
 endif
f85e0a1
 
f85e0a1
-ifeq "$(wildcard nauty.h)" ""
f85e0a1
-  override _system := $(shell uname -s)
f85e0a1
-  ifeq "$(_system)" "Darwin"
f85e0a1
-    override _hide := mv Makefile Makefile.hidden;
f85e0a1
-    override _restore := ;mv Makefile.hidden Makefile
f85e0a1
-  endif
f85e0a1
+#ifeq "$(wildcard nauty.h)" ""
f85e0a1
+#  override _system := $(shell uname -s)
f85e0a1
+#  ifeq "$(_system)" "Darwin"
f85e0a1
+#    override _hide := mv Makefile Makefile.hidden;
f85e0a1
+#    override _restore := ;mv Makefile.hidden Makefile
f85e0a1
+#  endif
f85e0a1
 
f85e0a1
-  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
f85e0a1
-endif
f85e0a1
+#  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
f85e0a1
+#endif
f85e0a1
 
f85e0a1
-ExtraCFLAGS := -DBIGNAUTY -I. -I${src}
f85e0a1
-ExtraCLEAN := nauty.h naututil.h gtools.h config.*
f85e0a1
+ExtraCFLAGS := -DBIGNAUTY -I/usr/include/nauty
f85e0a1
+#ExtraCLEAN := nauty.h naututil.h gtools.h config.*
f85e0a1
 
f85e0a1
 # Local Variables:
f85e0a1
 # mode: Makefile
0b30ad2
--- perl/polymake-config.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ perl/polymake-config	2016-07-24 10:28:59.961122154 -0600
Jerry James 51c14ed
@@ -125,9 +125,6 @@ while (defined ($_=shift)) {
Jerry James 74d8a20
 
Jerry James 74d8a20
    } elsif ($_ eq "--ldflags") {
Jerry James 74d8a20
       my $ldflags=$conf{LDflags};
Jerry James 74d8a20
-      if ($ldflags !~ /(?:^|\s)-L$conf{InstallLib}(?:\s|$)/) {
Jerry James 74d8a20
-         $ldflags="-L$conf{InstallLib} $ldflags";
Jerry James 74d8a20
-      }
Jerry James 74d8a20
       my $add_rpath=1;
Jerry James 74d8a20
       open CF, ">$tmpfile.cc" or die "can't create temporary file $tmpfile.cc: $!\n";
Jerry James 74d8a20
       print CF "int main() { return 0; }\n";
Jerry James 51c14ed
@@ -145,8 +142,6 @@ while (defined ($_=shift)) {
Jerry James 74d8a20
       close CC;
Jerry James 74d8a20
       if ($^O eq "darwin") {
Jerry James 74d8a20
          $ldflags="$conf{ARCHFLAGS} $ldflags -flat_namespace";
Jerry James 74d8a20
-      } elsif ($add_rpath) {
Jerry James 74d8a20
-         $ldflags.=" -Wl,-rpath,$conf{InstallLib}";
Jerry James 74d8a20
       }
Jerry James 74d8a20
       $ldflags=~s/^\s+//; $ldflags=~s/\s+$//; $ldflags=~s/\s{2,}/ /g;
Jerry James 74d8a20
       if ($debug_asked=defined($debug)) {
0b30ad2
--- support/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
0b30ad2
+++ support/configure.pl	2016-07-24 10:28:59.962122074 -0600
78afad8
@@ -389,7 +389,7 @@ if (defined $CC) {
4ad1335
 print "ok ($CXX is ", defined($GCCversion) ? "GCC $GCCversion" : defined($CLANGversion) ? "CLANG $CLANGversion" : "ICC $ICCversion", ")\n";
4ad1335
 
4ad1335
 $PERL     =$vars{PERL}     || $^X;
4ad1335
-$CXXOPT   =$vars{CXXOPT}   || "-O3";
4ad1335
+$CXXOPT   =$vars{CXXOPT}   || "-O2";
4ad1335
 $CXXDEBUG =$vars{CXXDEBUG} || "";
4ad1335
 $Cflags   =$vars{CFLAGS}   || "";
4ad1335
 $CXXflags =$vars{CXXFLAGS} || $Cflags;
0b30ad2
@@ -631,10 +631,6 @@ if (defined $GMP) {
Jerry James ba7c267
    $CXXflags .= " -I$GMP/include";
Jerry James ba7c267
    my $libdir=get_libdir($GMP, "gmp");
Jerry James ba7c267
    $LDflags .= " -L$libdir";
4ad1335
-   if (($^O ne "darwin" || $options{fink} eq ".none.") && exists $options{gmp}) {
Jerry James ba7c267
-      # non-standard location
Jerry James ba7c267
-      $LDflags .= " -Wl,-rpath,$libdir";
Jerry James ba7c267
-   }
Jerry James ba7c267
 }
Jerry James ba7c267
 
Jerry James ba7c267
 my $MPFR=$options{mpfr};
0b30ad2
@@ -643,10 +639,6 @@ if (defined($MPFR) && $MPFR ne $GMP) {
Jerry James ba7c267
    $CXXflags .= " -I$MPFR/include";
Jerry James ba7c267
    my $libdir=get_libdir($MPFR, "mpfr");
Jerry James ba7c267
    $LDflags .= " -L$libdir";
4ad1335
-   if ($^O ne "darwin" || $options{fink} eq ".none.") {
Jerry James ba7c267
-      # non-standard location
Jerry James ba7c267
-      $LDflags .= " -Wl,-rpath,$libdir";
Jerry James ba7c267
-   }
Jerry James ba7c267
 }
Jerry James ba7c267
 
4ad1335
 if ($check_prereq) {