9ce504e
--- bundled/cdd/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/cdd/configure.pl	2017-03-28 20:46:01.130083651 -0600
1bc623a
@@ -52,7 +52,6 @@ sub proceed {
1bc623a
       my $cdd_lib=Polymake::Configure::get_libdir($cdd_path, "cddgmp");
1bc623a
       if (-f "$cdd_lib/libcddgmp.$Config::Config{so}" ) {
1bc623a
          $LDflags = "-L$cdd_lib";
1bc623a
-         $LDflags .= " -Wl,-rpath,$cdd_lib" unless ($cdd_path eq "/usr");
1bc623a
       }
1bc623a
       if (!$CXXflags or !$LDflags) {
1bc623a
          die "Invalid installation location of cddlib: header file cdd.h and/or library libcddgmp.$Config::Config{so} not found.\n",
1bc623a
@@ -65,7 +64,6 @@ sub proceed {
1bc623a
       $cdd_path .= "include: $cdd_inc ";
1bc623a
    }
1bc623a
    if (defined ($cdd_lib=$options->{'cdd-lib'})) {
1bc623a
-      $LDflags = "-L$cdd_lib -Wl,-rpath,$cdd_lib";
1bc623a
       $cdd_path .= "lib: $cdd_lib";
1bc623a
    }
1bc623a
 
9ce504e
--- bundled/libnormaliz/apps/polytope/src/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/libnormaliz/apps/polytope/src/Makefile.inc	2017-03-28 20:58:44.103003083 -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
 
9ce504e
 # Local Variables:
9ce504e
 # mode: Makefile
9ce504e
--- bundled/libnormaliz/apps/polytope/src/normaliz.cc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/libnormaliz/apps/polytope/src/normaliz.cc	2017-03-28 20:52:15.183466846 -0600
9ce504e
@@ -95,7 +95,7 @@ namespace libnormaliz {
9ce504e
 #endif
9ce504e
 #endif
Jerry James 74d8a20
 
78afad8
-#include "libnormaliz/libnormaliz-all.cpp"
Jerry James 74d8a20
+#include <libnormaliz/cone.h>
Jerry James 74d8a20
 
9ce504e
 #if defined(__GNUC__) && !defined(__clang__)
9ce504e
 #pragma GCC diagnostic pop
9ce504e
--- bundled/lrs/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/lrs/configure.pl	2017-03-28 20:47:36.352644537 -0600
1bc623a
@@ -42,7 +42,6 @@ sub proceed {
1bc623a
       my $lrs_lib=Polymake::Configure::get_libdir($lrs_path, "lrs");
1bc623a
       if (-f "$lrs_inc/lrslib.h" && -f "$lrs_lib/liblrsgmp.$Config::Config{so}" ) {
1bc623a
          $CXXflags="-I$lrs_inc";
1bc623a
-         $LDflags="-L$lrs_lib -Wl,-rpath,$lrs_lib";
1bc623a
       } elsif (-f "$lrs_inc/lrslib.h" && -f "$lrs_lib/liblrsgmp.a" ) {
1bc623a
          $CXXflags="-I$lrs_inc";
1bc623a
          $LDflags="-L$lrs_lib";
9ce504e
--- bundled/nauty/apps/graph/src/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/nauty/apps/graph/src/Makefile.inc	2017-03-28 20:53:17.303208302 -0600
9ce504e
@@ -1,13 +1,13 @@
f85e0a1
 ifeq (${ImportedIntoExtension},)
f85e0a1
-  StaticLibs := nauty
f85e0a1
+  # StaticLibs := nauty
f85e0a1
 
9ce504e
   ifeq (${NautySrc},)
9ce504e
     NautySrc := ${ExtensionTop}/external/nauty
9ce504e
   endif
9ce504e
 
9ce504e
-  GraphIso$O : ExtraCXXFLAGS = -DBIGNAUTY -I${BuildDir}/staticlib/nauty -I${NautySrc}
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:
9ce504e
--- bundled/nauty/staticlib/nauty/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/nauty/staticlib/nauty/Makefile.inc	2017-03-28 20:55:16.583711852 -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
9ce504e
@@ -15,21 +15,21 @@ 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
9ce504e
-
9ce504e
-  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
9ce504e
-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
9ce504e
+#
f85e0a1
+#  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
f85e0a1
+#endif
f85e0a1
 
9ce504e
 # force include nauty headers here on the command line to make sure that we pick
9ce504e
 # up the newly generated ones instead (wrong?) ones from the original tarball
9ce504e
 # (current directory of the source file is always searched first and -I- is deprecated)
9ce504e
-ExtraCFLAGS := -DBIGNAUTY -I. -include $(CURDIR)/nauty.h -include $(CURDIR)/naututil.h -include $(CURDIR)/gtools.h -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
9ce504e
--- bundled/ppl/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/ppl/configure.pl	2017-03-28 20:46:46.977872227 -0600
1bc623a
@@ -35,7 +35,6 @@ sub proceed {
1bc623a
       my $ppl_lib=Polymake::Configure::get_libdir($ppl_path, "ppl");
1bc623a
       if (-f "$ppl_inc/ppl.hh" && -f "$ppl_lib/libppl.$Config::Config{so}") {
1bc623a
          $CXXflags.="-I$ppl_inc";
1bc623a
-         $LDflags="-L$ppl_lib -Wl,-rpath,$ppl_lib";
1bc623a
       } else {
1bc623a
          die "Invalid installation location of libppl: header file ppl.hh and/or library libppl.$Config::Config{so} not found\n";
1bc623a
       }
9ce504e
--- bundled/singular/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/singular/configure.pl	2017-03-28 20:48:06.064507522 -0600
9ce504e
@@ -40,7 +40,6 @@ sub singular_config_approach {
9ce504e
    chomp ($singular_prefix = `$singular_config --prefix`);
9ce504e
    chomp $singular_prefix;
1bc623a
    $LDflags =~ s/ -l\w+//g;
1bc623a
-   $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
1bc623a
    my $libdir = $1;
1bc623a
 
9ce504e
    # newer versions of singular need -lsingular_resources while older ones needed -lresources
9ce504e
@@ -63,9 +62,6 @@ sub pkg_config_approach {
9ce504e
    chomp ($CXXflags=`$pkg_config --cflags Singular`);
9ce504e
    die "$pkg_config failed: $!" if ($?);
9ce504e
    chomp ($LDflags=`$pkg_config --libs-only-other --libs-only-L Singular`);
9ce504e
-   if (defined ($options->{singular})){
9ce504e
-      $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
9ce504e
-   }
9ce504e
    chomp ($Libs=`$pkg_config --libs-only-l Singular`);
9ce504e
    return $pc_singular_prefix;
9ce504e
 }
9ce504e
--- bundled/sympol/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/sympol/configure.pl	2017-03-28 20:47:05.905784941 -0600
9ce504e
@@ -47,7 +47,6 @@ sub proceed {
9ce504e
       my $sympol_lib=Polymake::Configure::get_libdir($sympol_path, "sympol");
9ce504e
       if (-f "$sympol_lib/libsympol.$Config::Config{so}" ) {
9ce504e
          $LDflags = "-L$sympol_lib";
9ce504e
-         $LDflags .= " -Wl,-rpath,$sympol_lib" unless ($sympol_path eq "/usr");
9ce504e
       }
9ce504e
       if (!$CXXflags or !$LDflags) {
9ce504e
          die "Invalid installation location of sympol: header file symmetrycomputation.h and/or library libsympol.$Config::Config{so} not found.\n",
9ce504e
@@ -61,7 +60,6 @@ sub proceed {
1bc623a
    }
9ce504e
    if (defined ($sympol_lib=$options->{'sympol-lib'})) {
9ce504e
       $LDflags = " -L$sympol_lib";
9ce504e
-      $LDflags .= " -Wl,-rpath,$sympol_lib" unless ($sympol_lib =~ m#^/usr/lib#);
9ce504e
       $sympol_path .= "lib: $sympol_lib";
9ce504e
    }
9ce504e
 
9ce504e
--- bundled/sympol/staticlib/sympol/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ bundled/sympol/staticlib/sympol/Makefile.inc	2017-03-28 20:50:52.455811162 -0600
9ce504e
@@ -4,10 +4,10 @@ src := ${ExtensionTop}/external/sympol/s
1bc623a
 
9ce504e
 vpath %.cpp $(src)
9ce504e
 
9ce504e
-ExtraCXXFLAGS := -I${ExtensionTop}/external/sympol/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL
9ce504e
+ExtraCXXFLAGS := -I/usr/include/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL
9ce504e
 
9ce504e
 ifneq ($(filter ${ExternalHeaders},permlib),)
9ce504e
-  ExtraCXXFLAGS += -I${ProjectTop}/include/external/permlib
9ce504e
+  ExtraCXXFLAGS += -I$/usr/include/permlib
9ce504e
 endif
9ce504e
 
9ce504e
 # Local Variables:
9ce504e
--- perl/polymake-config.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ perl/polymake-config	2017-03-28 20:56:20.646445222 -0600
9ce504e
@@ -127,9 +127,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";
9ce504e
@@ -147,8 +144,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)) {
9ce504e
--- support/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504e
+++ support/configure.pl	2017-03-28 20:57:46.759165080 -0600
9ce504e
@@ -442,7 +442,7 @@ if (defined($GCCversion) or defined($CLA
9ce504e
 }
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;
9ce504e
@@ -763,10 +763,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};
9ce504e
@@ -775,10 +771,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
 
9ce504e
 if (defined($boost_path)) {