1bc623a
--- bundled/bliss/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/bliss/configure.pl	2017-01-11 07:40:52.589296237 -0700
1bc623a
@@ -32,7 +32,6 @@ sub proceed {
1bc623a
       my $bliss_lib=Polymake::Configure::get_libdir($bliss_path, "bliss");
1bc623a
       if (-f "$bliss_inc/bliss/graph.hh" && -f "$bliss_lib/libbliss.$Config::Config{dlext}" ) {
1bc623a
          $CXXflags="-I$bliss_inc";
1bc623a
-         $LDflags="-L$bliss_lib -Wl,-rpath,$bliss_lib";
1bc623a
       } elsif (-f "$bliss_inc/bliss/graph.hh" && -f "$bliss_lib/libbliss.a" ) {
1bc623a
          $CXXflags="-I$bliss_inc";
1bc623a
          $LDflags="-L$bliss_lib";
1bc623a
--- bundled/cdd/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/cdd/configure.pl	2017-01-11 07:42:26.948644436 -0700
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
 
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<>
1bc623a
--- bundled/lrs/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/lrs/configure.pl	2017-01-11 07:41:13.165154107 -0700
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";
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
1bc623a
--- bundled/ppl/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/ppl/configure.pl	2017-01-11 07:41:52.699881023 -0700
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
       }
1bc623a
--- bundled/singular/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/singular/configure.pl	2017-01-11 07:41:33.684012377 -0700
1bc623a
@@ -48,7 +48,6 @@ sub proceed {
1bc623a
 
1bc623a
    $Libs = join(" ",$LDflags =~ m/(-l\w+)/g) . " -lfactory -lresources -lpolys -lomalloc";
1bc623a
    $LDflags =~ s/ -l\w+//g;
1bc623a
-   $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
1bc623a
    my $libdir = $1;
1bc623a
 
1bc623a
    my $error=Polymake::Configure::build_test_program(<<"---", CXXflags => $CXXflags, LDflags => $LDflags, Libs => $Libs);
1bc623a
--- bundled/soplex/configure.pl.orig	2016-07-22 06:23:31.000000000 -0600
1bc623a
+++ bundled/soplex/configure.pl	2017-01-11 07:40:25.285484842 -0700
1bc623a
@@ -42,7 +42,6 @@ sub proceed {
1bc623a
    if (defined ($path = $options->{soplex}))
1bc623a
    {
1bc623a
       $CXXflags.=" -I$path/src -I$path/include -std=c++11";
1bc623a
-      $LDflags.=" -L$path/lib -Wl,-rpath,$path/lib";
1bc623a
    }
1bc623a
 
1bc623a
    # example code from src/example.cpp
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) {