[cddlib] Add function aliases in the GMP build for polymake. License fixing code now handles names with space

Jerry James jjames at fedoraproject.org
Wed Dec 5 21:51:19 UTC 2012


commit af740057553c5d47e54ee7b72da8e6d87c96740c
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Wed Dec 5 14:50:51 2012 -0700

    Add function aliases in the GMP build for polymake.
    License fixing code now handles names with spaces.

 cddlib-polymake.patch | 1012 +++++++++++++++++++++++++++++++++++++++++++++++++
 cddlib.spec           |   27 +-
 2 files changed, 1030 insertions(+), 9 deletions(-)
---
diff --git a/cddlib-polymake.patch b/cddlib-polymake.patch
new file mode 100644
index 0000000..484dc48
--- /dev/null
+++ b/cddlib-polymake.patch
@@ -0,0 +1,1012 @@
+diff -durpN cddlib-094g.orig/lib-src/cddcore.c cddlib-094g/lib-src/cddcore.c
+--- cddlib-094g.orig/lib-src/cddcore.c	2012-03-23 04:41:07.000000000 -0600
++++ cddlib-094g/lib-src/cddcore.c	2012-12-03 09:35:20.171961290 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd.h"
+ #include <stdio.h>
+@@ -2105,6 +2106,86 @@ void dd_InnerProduct(mytype prod, dd_col
+   dd_clear(temp);
+ }
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_AValue);
++MKALIAS (dd_AddArtificialRay);
++MKALIAS (dd_AddNewHalfspace1);
++MKALIAS (dd_AddNewHalfspace2);
++MKALIAS (dd_AddRay);
++MKALIAS (dd_CheckAdjacency);
++MKALIAS (dd_CheckEquality);
++MKALIAS (dd_ColumnReduce);
++MKALIAS (dd_ComputeRowOrderVector);
++MKALIAS (dd_ConditionalAddEdge);
++MKALIAS (dd_CopyAmatrix);
++MKALIAS (dd_CopyArow);
++MKALIAS (dd_CopyBmatrix);
++MKALIAS (dd_CopyNormalizedAmatrix);
++MKALIAS (dd_CopyNormalizedArow);
++MKALIAS (dd_CreateInitialEdges);
++MKALIAS (dd_CreateMatrix);
++MKALIAS (dd_CreateNewRay);
++MKALIAS (dd_CreateSetFamily);
++MKALIAS (dd_DeleteNegativeRays);
++MKALIAS (dd_Eliminate);
++MKALIAS (dd_Equal);
++MKALIAS (dd_EqualToZero);
++MKALIAS (dd_EvaluateARay1);
++MKALIAS (dd_EvaluateARay2);
++MKALIAS (dd_FeasibilityIndices);
++MKALIAS (dd_FindBasis);
++MKALIAS (dd_FindInitialRays);
++MKALIAS (dd_FreeAmatrix);
++MKALIAS (dd_FreeArow);
++MKALIAS (dd_FreeBmatrix);
++MKALIAS (dd_FreeDDMemory);
++MKALIAS (dd_FreeDDMemory0);
++MKALIAS (dd_FreeMatrix);
++MKALIAS (dd_FreePolyhedra);
++MKALIAS (dd_FreeSetFamily);
++MKALIAS (dd_InitializeAmatrix);
++MKALIAS (dd_InitializeArow);
++MKALIAS (dd_InitializeBmatrix);
++MKALIAS (dd_InnerProduct);
++MKALIAS (dd_Larger);
++MKALIAS (dd_LexEqual);
++MKALIAS (dd_LexLarger);
++MKALIAS (dd_LexSmaller);
++MKALIAS (dd_LinearComb);
++MKALIAS (dd_MatrixRank);
++MKALIAS (dd_Negative);
++MKALIAS (dd_Nonnegative);
++MKALIAS (dd_Nonpositive);
++MKALIAS (dd_Nonzero);
++MKALIAS (dd_Normalize);
++MKALIAS (dd_Partition);
++MKALIAS (dd_PermuteCopyAmatrix);
++MKALIAS (dd_PermutePartialCopyAmatrix);
++MKALIAS (dd_Positive);
++MKALIAS (dd_QuickSort);
++MKALIAS (dd_RandomPermutation);
++MKALIAS (dd_SelectNextHalfspace);
++MKALIAS (dd_SelectNextHalfspace0);
++MKALIAS (dd_SelectNextHalfspace1);
++MKALIAS (dd_SelectNextHalfspace2);
++MKALIAS (dd_SelectNextHalfspace3);
++MKALIAS (dd_SelectNextHalfspace4);
++MKALIAS (dd_SelectNextHalfspace5);
++MKALIAS (dd_SelectNextHalfspace6);
++MKALIAS (dd_SelectPreorderedNext);
++MKALIAS (dd_SetInequalitySets);
++MKALIAS (dd_SetToIdentity);
++MKALIAS (dd_Smaller);
++MKALIAS (dd_StoreRay1);
++MKALIAS (dd_StoreRay2);
++MKALIAS (dd_UniqueRows);
++MKALIAS (dd_UpdateEdges);
++MKALIAS (dd_UpdateRowOrderVector);
++MKALIAS (dd_ZeroIndexSet);
++MKALIAS (dd_abs);
++#endif
++
+ /* end of cddcore.c */
+ 
+ 
+diff -durpN cddlib-094g.orig/lib-src/cddio.c cddlib-094g/lib-src/cddio.c
+--- cddlib-094g.orig/lib-src/cddio.c	2012-03-23 04:41:07.000000000 -0600
++++ cddlib-094g/lib-src/cddio.c	2012-12-03 09:35:20.172961238 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd.h"
+ #include <stdio.h>
+@@ -2012,6 +2013,79 @@ void dd_fread_rational_value (FILE *f, m
+    dd_set(value,rational_value);
+    dd_clear(rational_value);
+ }
++
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_AppendMatrix);
++MKALIAS (dd_AppendMatrix2Poly);
++MKALIAS (dd_ComputeAinc);
++MKALIAS (dd_ConeDataLoad);
++MKALIAS (dd_CopyAdjacency);
++MKALIAS (dd_CopyGenerators);
++MKALIAS (dd_CopyIncidence);
++MKALIAS (dd_CopyInequalities);
++MKALIAS (dd_CopyInput);
++MKALIAS (dd_CopyInputAdjacency);
++MKALIAS (dd_CopyInputIncidence);
++MKALIAS (dd_CopyMatrix);
++MKALIAS (dd_CopyOutput);
++MKALIAS (dd_CopyRay);
++MKALIAS (dd_CreatePolyhedraData);
++MKALIAS (dd_DDMatrix2Poly);
++MKALIAS (dd_DDMatrix2Poly2);
++MKALIAS (dd_GetNumberType);
++MKALIAS (dd_InitializeConeData);
++MKALIAS (dd_InputAdjacentQ);
++MKALIAS (dd_MatrixAppend);
++MKALIAS (dd_MatrixAppendTo);
++MKALIAS (dd_MatrixCopy);
++MKALIAS (dd_MatrixIntegerFilter);
++MKALIAS (dd_MatrixNormalizedCopy);
++MKALIAS (dd_MatrixNormalizedSortedCopy);
++MKALIAS (dd_MatrixNormalizedSortedUniqueCopy);
++MKALIAS (dd_MatrixRowRemove);
++MKALIAS (dd_MatrixRowRemove2);
++MKALIAS (dd_MatrixRowsRemove);
++MKALIAS (dd_MatrixRowsRemove2);
++MKALIAS (dd_MatrixShiftupLinearity);
++MKALIAS (dd_MatrixSortedUniqueCopy);
++MKALIAS (dd_MatrixSubmatrix);
++MKALIAS (dd_MatrixSubmatrix2);
++MKALIAS (dd_MatrixSubmatrix2L);
++MKALIAS (dd_MatrixUniqueCopy);
++MKALIAS (dd_PolyFile2Matrix);
++MKALIAS (dd_ProcessCommandLine);
++MKALIAS (dd_SetInputFile);
++MKALIAS (dd_SetLinearity);
++MKALIAS (dd_SetWriteFileName);
++MKALIAS (dd_SnapToInteger);
++MKALIAS (dd_WriteAdjacency);
++MKALIAS (dd_WriteAmatrix);
++MKALIAS (dd_WriteArow);
++MKALIAS (dd_WriteBmatrix);
++MKALIAS (dd_WriteCompletionStatus);
++MKALIAS (dd_WriteDDTimes);
++MKALIAS (dd_WriteErrorMessages);
++MKALIAS (dd_WriteIncidence);
++MKALIAS (dd_WriteInputAdjacency);
++MKALIAS (dd_WriteInputIncidence);
++MKALIAS (dd_WriteLP);
++MKALIAS (dd_WriteLPMode);
++MKALIAS (dd_WriteLPStats);
++MKALIAS (dd_WriteLPTimes);
++MKALIAS (dd_WriteMatrix);
++MKALIAS (dd_WriteNumber);
++MKALIAS (dd_WritePolyFile);
++MKALIAS (dd_WriteProgramDescription);
++MKALIAS (dd_WriteRay);
++MKALIAS (dd_WriteReal);
++MKALIAS (dd_WriteRunningMode);
++MKALIAS (dd_WriteSetFamily);
++MKALIAS (dd_WriteSetFamilyCompressed);
++MKALIAS (dd_WriteTimes);
++MKALIAS (dd_fread_rational_value);
++MKALIAS (dd_sread_rational_value);
++#endif
+    
+ /****************************************************************************************/
+ 
+diff -durpN cddlib-094g.orig/lib-src/cddlib.c cddlib-094g/lib-src/cddlib.c
+--- cddlib-094g.orig/lib-src/cddlib.c	2012-03-23 04:41:07.000000000 -0600
++++ cddlib-094g/lib-src/cddlib.c	2012-12-03 09:37:31.801129162 -0700
+@@ -31,6 +31,7 @@
+    from the Pascal program pdd.p written by Komei Fukuda. 
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h" 
+   /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd.h"
+@@ -389,4 +390,18 @@ _L99: ;
+   return found;
+ }
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_CheckEmptiness);
++MKALIAS (dd_DDFile2File);
++MKALIAS (dd_DDInit);
++MKALIAS (dd_DDInputAppend);
++MKALIAS (dd_DDMain);
++MKALIAS (dd_DoubleDescription);
++MKALIAS (dd_DoubleDescription2);
++MKALIAS (dd_InitialDataSetup);
++MKALIAS (dd_debug);
++MKALIAS (dd_log);
++#endif
++
+ /* end of cddlib.c */
+diff -durpN cddlib-094g.orig/lib-src/cddlp.c cddlib-094g/lib-src/cddlp.c
+--- cddlib-094g.orig/lib-src/cddlp.c	2012-03-23 04:41:07.000000000 -0600
++++ cddlib-094g/lib-src/cddlp.c	2012-12-03 09:35:20.187960458 -0700
+@@ -11,6 +11,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. May 18, 2000 or later) */
+ #include "cdd.h"
+ #include <stdio.h>
+@@ -3774,5 +3775,71 @@ void dd_BasisStatusMinimize(dd_rowrange
+ }
+ #endif
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_ComputeRowOrderVector2);
++MKALIAS (dd_CopyLPSolution);
++MKALIAS (dd_CreateLPData);
++MKALIAS (dd_CreateLP_H_ImplicitLinearity);
++MKALIAS (dd_CreateLP_H_Redundancy);
++MKALIAS (dd_CreateLP_V_ImplicitLinearity);
++MKALIAS (dd_CreateLP_V_Redundancy);
++MKALIAS (dd_CreateLP_V_SRedundancy);
++MKALIAS (dd_CrissCrossMaximize);
++MKALIAS (dd_CrissCrossMinimize);
++MKALIAS (dd_CrissCrossSolve);
++MKALIAS (dd_DualSimplexMaximize);
++MKALIAS (dd_DualSimplexMinimize);
++MKALIAS (dd_DualSimplexSolve);
++MKALIAS (dd_ExistsRestrictedFace);
++MKALIAS (dd_ExistsRestrictedFace2);
++MKALIAS (dd_FindDualFeasibleBasis);
++MKALIAS (dd_FindLPBasis);
++MKALIAS (dd_FindLPBasis2);
++MKALIAS (dd_FindRelativeInterior);
++MKALIAS (dd_FreeLPData);
++MKALIAS (dd_FreeLPSolution);
++MKALIAS (dd_FreeOfImplicitLinearity);
++MKALIAS (dd_GaussianColumnPivot);
++MKALIAS (dd_GaussianColumnPivot2);
++MKALIAS (dd_GetRedundancyInformation);
++MKALIAS (dd_ImplicitLinearity);
++MKALIAS (dd_ImplicitLinearityRows);
++MKALIAS (dd_LPCopyRow);
++MKALIAS (dd_LPReplaceRow);
++MKALIAS (dd_LPReverseRow);
++MKALIAS (dd_LPSolve);
++MKALIAS (dd_LPSolve0);
++MKALIAS (dd_MakeLPforInteriorFinding);
++MKALIAS (dd_Matrix2Adjacency);
++MKALIAS (dd_Matrix2Feasibility);
++MKALIAS (dd_Matrix2Feasibility2);
++MKALIAS (dd_Matrix2LP);
++MKALIAS (dd_Matrix2WeakAdjacency);
++MKALIAS (dd_MatrixCanonicalize);
++MKALIAS (dd_MatrixCanonicalizeLinearity);
++MKALIAS (dd_MatrixRedundancyRemove);
++MKALIAS (dd_RandomPermutation2);
++MKALIAS (dd_RayShooting);
++MKALIAS (dd_Redundant);
++MKALIAS (dd_RedundantExtensive);
++MKALIAS (dd_RedundantRows);
++MKALIAS (dd_RedundantRowsViaShooting);
++MKALIAS (dd_ResetTableau);
++MKALIAS (dd_SRedundant);
++MKALIAS (dd_SRedundantRows);
++MKALIAS (dd_SelectCrissCrossPivot);
++MKALIAS (dd_SelectDualSimplexPivot);
++MKALIAS (dd_SelectPivot2);
++MKALIAS (dd_SelectPreorderedNext2);
++MKALIAS (dd_SetNumberType);
++MKALIAS (dd_SetSolutions);
++MKALIAS (dd_TableauEntry);
++MKALIAS (dd_WriteLPResult);
++MKALIAS (dd_WriteSignTableau);
++MKALIAS (dd_WriteSignTableau2);
++MKALIAS (dd_WriteTableau);
++#endif
++
+ /* end of cddlp.c */
+ 
+diff -durpN cddlib-094g.orig/lib-src/cddmp.c cddlib-094g/lib-src/cddmp.c
+--- cddlib-094g.orig/lib-src/cddmp.c	2012-03-23 04:41:02.000000000 -0600
++++ cddlib-094g/lib-src/cddmp.c	2012-12-03 09:35:20.188960406 -0700
+@@ -17,6 +17,7 @@
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. March 16,1995 or later) */
+ #include "cdd.h"
+ 
+@@ -182,4 +183,10 @@ double ddd_get_d(mytype a)
+ }
+ #endif
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_free_global_constants);
++MKALIAS (dd_set_global_constants);
++#endif
++
+ /* end of  cddmp.h  */
+diff -durpN cddlib-094g.orig/lib-src/cddproj.c cddlib-094g/lib-src/cddproj.c
+--- cddlib-094g.orig/lib-src/cddproj.c	2012-03-23 02:29:29.000000000 -0600
++++ cddlib-094g/lib-src/cddproj.c	2012-12-03 09:35:20.188960406 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd.h"
+ #include <stdio.h>
+@@ -231,5 +232,10 @@ dd_MatrixPtr dd_FourierElimination(dd_Ma
+   return Mnew;
+ }
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (dd_BlockElimination);
++MKALIAS (dd_FourierElimination);
++#endif
+ 
+ /* end of cddproj.c */
+diff -durpN cddlib-094g.orig/lib-src/gmpdef.h cddlib-094g/lib-src/gmpdef.h
+--- cddlib-094g.orig/lib-src/gmpdef.h	1969-12-31 17:00:00.000000000 -0700
++++ cddlib-094g/lib-src/gmpdef.h	2012-12-03 09:35:20.189960354 -0700
+@@ -0,0 +1,257 @@
++#ifdef GMPRATIONAL
++#define dd_AppendMatrix dd_AppendMatrix_gmp
++#define dd_AppendMatrix2Poly dd_AppendMatrix2Poly_gmp
++#define dd_ComputeAinc dd_ComputeAinc_gmp
++#define dd_ConeDataLoad dd_ConeDataLoad_gmp
++#define dd_CopyAdjacency dd_CopyAdjacency_gmp
++#define dd_CopyGenerators dd_CopyGenerators_gmp
++#define dd_CopyIncidence dd_CopyIncidence_gmp
++#define dd_CopyInequalities dd_CopyInequalities_gmp
++#define dd_CopyInput dd_CopyInput_gmp
++#define dd_CopyInputAdjacency dd_CopyInputAdjacency_gmp
++#define dd_CopyInputIncidence dd_CopyInputIncidence_gmp
++#define dd_CopyMatrix dd_CopyMatrix_gmp
++#define dd_CopyOutput dd_CopyOutput_gmp
++#define dd_CopyRay dd_CopyRay_gmp
++#define dd_CreatePolyhedraData dd_CreatePolyhedraData_gmp
++#define dd_DDMatrix2Poly dd_DDMatrix2Poly_gmp
++#define dd_DDMatrix2Poly2 dd_DDMatrix2Poly2_gmp
++#define dd_GetNumberType dd_GetNumberType_gmp
++#define dd_InitializeConeData dd_InitializeConeData_gmp
++#define dd_InputAdjacentQ dd_InputAdjacentQ_gmp
++#define dd_MatrixAppend dd_MatrixAppend_gmp
++#define dd_MatrixAppendTo dd_MatrixAppendTo_gmp
++#define dd_MatrixCopy dd_MatrixCopy_gmp
++#define dd_MatrixIntegerFilter dd_MatrixIntegerFilter_gmp
++#define dd_MatrixNormalizedCopy dd_MatrixNormalizedCopy_gmp
++#define dd_MatrixNormalizedSortedCopy dd_MatrixNormalizedSortedCopy_gmp
++#define dd_MatrixNormalizedSortedUniqueCopy dd_MatrixNormalizedSortedUniqueCopy_gmp
++#define dd_MatrixRowRemove dd_MatrixRowRemove_gmp
++#define dd_MatrixRowRemove2 dd_MatrixRowRemove2_gmp
++#define dd_MatrixRowsRemove dd_MatrixRowsRemove_gmp
++#define dd_MatrixRowsRemove2 dd_MatrixRowsRemove2_gmp
++#define dd_MatrixShiftupLinearity dd_MatrixShiftupLinearity_gmp
++#define dd_MatrixSortedUniqueCopy dd_MatrixSortedUniqueCopy_gmp
++#define dd_MatrixSubmatrix dd_MatrixSubmatrix_gmp
++#define dd_MatrixSubmatrix2 dd_MatrixSubmatrix2_gmp
++#define dd_MatrixSubmatrix2L dd_MatrixSubmatrix2L_gmp
++#define dd_MatrixUniqueCopy dd_MatrixUniqueCopy_gmp
++#define dd_PolyFile2Matrix dd_PolyFile2Matrix_gmp
++#define dd_ProcessCommandLine dd_ProcessCommandLine_gmp
++#define dd_SetInputFile dd_SetInputFile_gmp
++#define dd_SetLinearity dd_SetLinearity_gmp
++#define dd_SetWriteFileName dd_SetWriteFileName_gmp
++#define dd_SnapToInteger dd_SnapToInteger_gmp
++#define dd_WriteAdjacency dd_WriteAdjacency_gmp
++#define dd_WriteAmatrix dd_WriteAmatrix_gmp
++#define dd_WriteArow dd_WriteArow_gmp
++#define dd_WriteBmatrix dd_WriteBmatrix_gmp
++#define dd_WriteCompletionStatus dd_WriteCompletionStatus_gmp
++#define dd_WriteDDTimes dd_WriteDDTimes_gmp
++#define dd_WriteErrorMessages dd_WriteErrorMessages_gmp
++#define dd_WriteIncidence dd_WriteIncidence_gmp
++#define dd_WriteInputAdjacency dd_WriteInputAdjacency_gmp
++#define dd_WriteInputIncidence dd_WriteInputIncidence_gmp
++#define dd_WriteLP dd_WriteLP_gmp
++#define dd_WriteLPMode dd_WriteLPMode_gmp
++#define dd_WriteLPStats dd_WriteLPStats_gmp
++#define dd_WriteLPTimes dd_WriteLPTimes_gmp
++#define dd_WriteMatrix dd_WriteMatrix_gmp
++#define dd_WriteNumber dd_WriteNumber_gmp
++#define dd_WritePolyFile dd_WritePolyFile_gmp
++#define dd_WriteProgramDescription dd_WriteProgramDescription_gmp
++#define dd_WriteRay dd_WriteRay_gmp
++#define dd_WriteReal dd_WriteReal_gmp
++#define dd_WriteRunningMode dd_WriteRunningMode_gmp
++#define dd_WriteSetFamily dd_WriteSetFamily_gmp
++#define dd_WriteSetFamilyCompressed dd_WriteSetFamilyCompressed_gmp
++#define dd_WriteTimes dd_WriteTimes_gmp
++#define dd_fread_rational_value dd_fread_rational_value_gmp
++#define dd_sread_rational_value dd_sread_rational_value_gmp
++#define dd_free_global_constants dd_free_global_constants_gmp
++#define dd_set_global_constants dd_set_global_constants_gmp
++#define dd_CheckEmptiness dd_CheckEmptiness_gmp
++#define dd_DDFile2File dd_DDFile2File_gmp
++#define dd_DDInit dd_DDInit_gmp
++#define dd_DDInputAppend dd_DDInputAppend_gmp
++#define dd_DDMain dd_DDMain_gmp
++#define dd_DoubleDescription dd_DoubleDescription_gmp
++#define dd_DoubleDescription2 dd_DoubleDescription2_gmp
++#define dd_InitialDataSetup dd_InitialDataSetup_gmp
++#define dd_choiceLPSolverDefault dd_choiceLPSolverDefault_gmp
++#define dd_choiceLexicoPivotQ dd_choiceLexicoPivotQ_gmp
++#define dd_choiceRedcheckAlgorithm dd_choiceRedcheckAlgorithm_gmp
++#define dd_debug dd_debug_gmp
++#define dd_log dd_log_gmp
++#define dd_minusone dd_minusone_gmp
++#define dd_minuszero dd_minuszero_gmp
++#define dd_one dd_one_gmp
++#define dd_purezero dd_purezero_gmp
++#define dd_statACpivots dd_statACpivots_gmp
++#define dd_statBApivots dd_statBApivots_gmp
++#define dd_statCCpivots dd_statCCpivots_gmp
++#define dd_statDS1pivots dd_statDS1pivots_gmp
++#define dd_statDS2pivots dd_statDS2pivots_gmp
++#define dd_statStartTime dd_statStartTime_gmp
++#define dd_zero dd_zero_gmp
++#define dd_AValue dd_AValue_gmp
++#define dd_AddArtificialRay dd_AddArtificialRay_gmp
++#define dd_AddNewHalfspace1 dd_AddNewHalfspace1_gmp
++#define dd_AddNewHalfspace2 dd_AddNewHalfspace2_gmp
++#define dd_AddRay dd_AddRay_gmp
++#define dd_CheckAdjacency dd_CheckAdjacency_gmp
++#define dd_CheckEquality dd_CheckEquality_gmp
++#define dd_ColumnReduce dd_ColumnReduce_gmp
++#define dd_ComputeRowOrderVector dd_ComputeRowOrderVector_gmp
++#define dd_ConditionalAddEdge dd_ConditionalAddEdge_gmp
++#define dd_CopyAmatrix dd_CopyAmatrix_gmp
++#define dd_CopyArow dd_CopyArow_gmp
++#define dd_CopyBmatrix dd_CopyBmatrix_gmp
++#define dd_CopyNormalizedAmatrix dd_CopyNormalizedAmatrix_gmp
++#define dd_CopyNormalizedArow dd_CopyNormalizedArow_gmp
++#define dd_CreateInitialEdges dd_CreateInitialEdges_gmp
++#define dd_CreateMatrix dd_CreateMatrix_gmp
++#define dd_CreateNewRay dd_CreateNewRay_gmp
++#define dd_CreateSetFamily dd_CreateSetFamily_gmp
++#define dd_DeleteNegativeRays dd_DeleteNegativeRays_gmp
++#define dd_Eliminate dd_Eliminate_gmp
++#define dd_Equal dd_Equal_gmp
++#define dd_EqualToZero dd_EqualToZero_gmp
++#define dd_EvaluateARay1 dd_EvaluateARay1_gmp
++#define dd_EvaluateARay2 dd_EvaluateARay2_gmp
++#define dd_FeasibilityIndices dd_FeasibilityIndices_gmp
++#define dd_FindBasis dd_FindBasis_gmp
++#define dd_FindInitialRays dd_FindInitialRays_gmp
++#define dd_FreeAmatrix dd_FreeAmatrix_gmp
++#define dd_FreeArow dd_FreeArow_gmp
++#define dd_FreeBmatrix dd_FreeBmatrix_gmp
++#define dd_FreeDDMemory dd_FreeDDMemory_gmp
++#define dd_FreeDDMemory0 dd_FreeDDMemory0_gmp
++#define dd_FreeMatrix dd_FreeMatrix_gmp
++#define dd_FreePolyhedra dd_FreePolyhedra_gmp
++#define dd_FreeSetFamily dd_FreeSetFamily_gmp
++#define dd_InitializeAmatrix dd_InitializeAmatrix_gmp
++#define dd_InitializeArow dd_InitializeArow_gmp
++#define dd_InitializeBmatrix dd_InitializeBmatrix_gmp
++#define dd_InnerProduct dd_InnerProduct_gmp
++#define dd_Larger dd_Larger_gmp
++#define dd_LexEqual dd_LexEqual_gmp
++#define dd_LexLarger dd_LexLarger_gmp
++#define dd_LexSmaller dd_LexSmaller_gmp
++#define dd_LinearComb dd_LinearComb_gmp
++#define dd_MatrixRank dd_MatrixRank_gmp
++#define dd_Negative dd_Negative_gmp
++#define dd_Nonnegative dd_Nonnegative_gmp
++#define dd_Nonpositive dd_Nonpositive_gmp
++#define dd_Nonzero dd_Nonzero_gmp
++#define dd_Normalize dd_Normalize_gmp
++#define dd_Partition dd_Partition_gmp
++#define dd_PermuteCopyAmatrix dd_PermuteCopyAmatrix_gmp
++#define dd_PermutePartialCopyAmatrix dd_PermutePartialCopyAmatrix_gmp
++#define dd_Positive dd_Positive_gmp
++#define dd_QuickSort dd_QuickSort_gmp
++#define dd_RandomPermutation dd_RandomPermutation_gmp
++#define dd_SelectNextHalfspace dd_SelectNextHalfspace_gmp
++#define dd_SelectNextHalfspace0 dd_SelectNextHalfspace0_gmp
++#define dd_SelectNextHalfspace1 dd_SelectNextHalfspace1_gmp
++#define dd_SelectNextHalfspace2 dd_SelectNextHalfspace2_gmp
++#define dd_SelectNextHalfspace3 dd_SelectNextHalfspace3_gmp
++#define dd_SelectNextHalfspace4 dd_SelectNextHalfspace4_gmp
++#define dd_SelectNextHalfspace5 dd_SelectNextHalfspace5_gmp
++#define dd_SelectNextHalfspace6 dd_SelectNextHalfspace6_gmp
++#define dd_SelectPreorderedNext dd_SelectPreorderedNext_gmp
++#define dd_SetInequalitySets dd_SetInequalitySets_gmp
++#define dd_SetToIdentity dd_SetToIdentity_gmp
++#define dd_Smaller dd_Smaller_gmp
++#define dd_StoreRay1 dd_StoreRay1_gmp
++#define dd_StoreRay2 dd_StoreRay2_gmp
++#define dd_UniqueRows dd_UniqueRows_gmp
++#define dd_UpdateEdges dd_UpdateEdges_gmp
++#define dd_UpdateRowOrderVector dd_UpdateRowOrderVector_gmp
++#define dd_ZeroIndexSet dd_ZeroIndexSet_gmp
++#define dd_abs dd_abs_gmp
++#define dd_ComputeRowOrderVector2 dd_ComputeRowOrderVector2_gmp
++#define dd_CopyLPSolution dd_CopyLPSolution_gmp
++#define dd_CreateLPData dd_CreateLPData_gmp
++#define dd_CreateLP_H_ImplicitLinearity dd_CreateLP_H_ImplicitLinearity_gmp
++#define dd_CreateLP_H_Redundancy dd_CreateLP_H_Redundancy_gmp
++#define dd_CreateLP_V_ImplicitLinearity dd_CreateLP_V_ImplicitLinearity_gmp
++#define dd_CreateLP_V_Redundancy dd_CreateLP_V_Redundancy_gmp
++#define dd_CreateLP_V_SRedundancy dd_CreateLP_V_SRedundancy_gmp
++#define dd_CrissCrossMaximize dd_CrissCrossMaximize_gmp
++#define dd_CrissCrossMinimize dd_CrissCrossMinimize_gmp
++#define dd_CrissCrossSolve dd_CrissCrossSolve_gmp
++#define dd_DualSimplexMaximize dd_DualSimplexMaximize_gmp
++#define dd_DualSimplexMinimize dd_DualSimplexMinimize_gmp
++#define dd_DualSimplexSolve dd_DualSimplexSolve_gmp
++#define dd_ExistsRestrictedFace dd_ExistsRestrictedFace_gmp
++#define dd_ExistsRestrictedFace2 dd_ExistsRestrictedFace2_gmp
++#define dd_FindDualFeasibleBasis dd_FindDualFeasibleBasis_gmp
++#define dd_FindLPBasis dd_FindLPBasis_gmp
++#define dd_FindLPBasis2 dd_FindLPBasis2_gmp
++#define dd_FindRelativeInterior dd_FindRelativeInterior_gmp
++#define dd_FreeLPData dd_FreeLPData_gmp
++#define dd_FreeLPSolution dd_FreeLPSolution_gmp
++#define dd_FreeOfImplicitLinearity dd_FreeOfImplicitLinearity_gmp
++#define dd_GaussianColumnPivot dd_GaussianColumnPivot_gmp
++#define dd_GaussianColumnPivot2 dd_GaussianColumnPivot2_gmp
++#define dd_GetRedundancyInformation dd_GetRedundancyInformation_gmp
++#define dd_ImplicitLinearity dd_ImplicitLinearity_gmp
++#define dd_ImplicitLinearityRows dd_ImplicitLinearityRows_gmp
++#define dd_LPCopyRow dd_LPCopyRow_gmp
++#define dd_LPReplaceRow dd_LPReplaceRow_gmp
++#define dd_LPReverseRow dd_LPReverseRow_gmp
++#define dd_LPSolve dd_LPSolve_gmp
++#define dd_LPSolve0 dd_LPSolve0_gmp
++#define dd_MakeLPforInteriorFinding dd_MakeLPforInteriorFinding_gmp
++#define dd_Matrix2Adjacency dd_Matrix2Adjacency_gmp
++#define dd_Matrix2Feasibility dd_Matrix2Feasibility_gmp
++#define dd_Matrix2Feasibility2 dd_Matrix2Feasibility2_gmp
++#define dd_Matrix2LP dd_Matrix2LP_gmp
++#define dd_Matrix2WeakAdjacency dd_Matrix2WeakAdjacency_gmp
++#define dd_MatrixCanonicalize dd_MatrixCanonicalize_gmp
++#define dd_MatrixCanonicalizeLinearity dd_MatrixCanonicalizeLinearity_gmp
++#define dd_MatrixRedundancyRemove dd_MatrixRedundancyRemove_gmp
++#define dd_RandomPermutation2 dd_RandomPermutation2_gmp
++#define dd_RayShooting dd_RayShooting_gmp
++#define dd_Redundant dd_Redundant_gmp
++#define dd_RedundantExtensive dd_RedundantExtensive_gmp
++#define dd_RedundantRows dd_RedundantRows_gmp
++#define dd_RedundantRowsViaShooting dd_RedundantRowsViaShooting_gmp
++#define dd_ResetTableau dd_ResetTableau_gmp
++#define dd_SRedundant dd_SRedundant_gmp
++#define dd_SRedundantRows dd_SRedundantRows_gmp
++#define dd_SelectCrissCrossPivot dd_SelectCrissCrossPivot_gmp
++#define dd_SelectDualSimplexPivot dd_SelectDualSimplexPivot_gmp
++#define dd_SelectPivot2 dd_SelectPivot2_gmp
++#define dd_SelectPreorderedNext2 dd_SelectPreorderedNext2_gmp
++#define dd_SetNumberType dd_SetNumberType_gmp
++#define dd_SetSolutions dd_SetSolutions_gmp
++#define dd_TableauEntry dd_TableauEntry_gmp
++#define dd_WriteLPResult dd_WriteLPResult_gmp
++#define dd_WriteSignTableau dd_WriteSignTableau_gmp
++#define dd_WriteSignTableau2 dd_WriteSignTableau2_gmp
++#define dd_WriteTableau dd_WriteTableau_gmp
++#define dd_BlockElimination dd_BlockElimination_gmp
++#define dd_FourierElimination dd_FourierElimination_gmp
++#define set_addelem set_addelem_gmp
++#define set_binwrite set_binwrite_gmp
++#define set_blocks set_blocks_gmp
++#define set_card set_card_gmp
++#define set_compl set_compl_gmp
++#define set_copy set_copy_gmp
++#define set_delelem set_delelem_gmp
++#define set_diff set_diff_gmp
++#define set_emptyset set_emptyset_gmp
++#define set_fbinwrite set_fbinwrite_gmp
++#define set_free set_free_gmp
++#define set_fwrite set_fwrite_gmp
++#define set_fwrite_compl set_fwrite_compl_gmp
++#define set_groundsize set_groundsize_gmp
++#define set_initialize set_initialize_gmp
++#define set_int set_int_gmp
++#define set_member set_member_gmp
++#define set_subset set_subset_gmp
++#define set_uni set_uni_gmp
++#define set_write set_write_gmp
++#endif
+diff -durpN cddlib-094g.orig/lib-src/gmpundef.h cddlib-094g/lib-src/gmpundef.h
+--- cddlib-094g.orig/lib-src/gmpundef.h	1969-12-31 17:00:00.000000000 -0700
++++ cddlib-094g/lib-src/gmpundef.h	2012-12-03 09:35:20.189960354 -0700
+@@ -0,0 +1,258 @@
++#define stringify(sym) #sym
++#define MKALIAS(sym) \
++  extern typeof(sym##_gmp) sym __attribute__((alias (stringify(sym##_gmp))))
++#undef dd_AppendMatrix
++#undef dd_AppendMatrix2Poly
++#undef dd_ComputeAinc
++#undef dd_ConeDataLoad
++#undef dd_CopyAdjacency
++#undef dd_CopyGenerators
++#undef dd_CopyIncidence
++#undef dd_CopyInequalities
++#undef dd_CopyInput
++#undef dd_CopyInputAdjacency
++#undef dd_CopyInputIncidence
++#undef dd_CopyMatrix
++#undef dd_CopyOutput
++#undef dd_CopyRay
++#undef dd_CreatePolyhedraData
++#undef dd_DDMatrix2Poly
++#undef dd_DDMatrix2Poly2
++#undef dd_GetNumberType
++#undef dd_InitializeConeData
++#undef dd_InputAdjacentQ
++#undef dd_MatrixAppend
++#undef dd_MatrixAppendTo
++#undef dd_MatrixCopy
++#undef dd_MatrixIntegerFilter
++#undef dd_MatrixNormalizedCopy
++#undef dd_MatrixNormalizedSortedCopy
++#undef dd_MatrixNormalizedSortedUniqueCopy
++#undef dd_MatrixRowRemove
++#undef dd_MatrixRowRemove2
++#undef dd_MatrixRowsRemove
++#undef dd_MatrixRowsRemove2
++#undef dd_MatrixShiftupLinearity
++#undef dd_MatrixSortedUniqueCopy
++#undef dd_MatrixSubmatrix
++#undef dd_MatrixSubmatrix2
++#undef dd_MatrixSubmatrix2L
++#undef dd_MatrixUniqueCopy
++#undef dd_PolyFile2Matrix
++#undef dd_ProcessCommandLine
++#undef dd_SetInputFile
++#undef dd_SetLinearity
++#undef dd_SetWriteFileName
++#undef dd_SnapToInteger
++#undef dd_WriteAdjacency
++#undef dd_WriteAmatrix
++#undef dd_WriteArow
++#undef dd_WriteBmatrix
++#undef dd_WriteCompletionStatus
++#undef dd_WriteDDTimes
++#undef dd_WriteErrorMessages
++#undef dd_WriteIncidence
++#undef dd_WriteInputAdjacency
++#undef dd_WriteInputIncidence
++#undef dd_WriteLP
++#undef dd_WriteLPMode
++#undef dd_WriteLPStats
++#undef dd_WriteLPTimes
++#undef dd_WriteMatrix
++#undef dd_WriteNumber
++#undef dd_WritePolyFile
++#undef dd_WriteProgramDescription
++#undef dd_WriteRay
++#undef dd_WriteReal
++#undef dd_WriteRunningMode
++#undef dd_WriteSetFamily
++#undef dd_WriteSetFamilyCompressed
++#undef dd_WriteTimes
++#undef dd_fread_rational_value
++#undef dd_sread_rational_value
++#undef dd_free_global_constants
++#undef dd_set_global_constants
++#undef dd_CheckEmptiness
++#undef dd_DDFile2File
++#undef dd_DDInit
++#undef dd_DDInputAppend
++#undef dd_DDMain
++#undef dd_DoubleDescription
++#undef dd_DoubleDescription2
++#undef dd_InitialDataSetup
++#undef dd_choiceLPSolverDefault
++#undef dd_choiceLexicoPivotQ
++#undef dd_choiceRedcheckAlgorithm
++#undef dd_debug
++#undef dd_log
++#undef dd_minusone
++#undef dd_minuszero
++#undef dd_one
++#undef dd_purezero
++#undef dd_statACpivots
++#undef dd_statBApivots
++#undef dd_statCCpivots
++#undef dd_statDS1pivots
++#undef dd_statDS2pivots
++#undef dd_statStartTime
++#undef dd_zero
++#undef dd_AValue
++#undef dd_AddArtificialRay
++#undef dd_AddNewHalfspace1
++#undef dd_AddNewHalfspace2
++#undef dd_AddRay
++#undef dd_CheckAdjacency
++#undef dd_CheckEquality
++#undef dd_ColumnReduce
++#undef dd_ComputeRowOrderVector
++#undef dd_ConditionalAddEdge
++#undef dd_CopyAmatrix
++#undef dd_CopyArow
++#undef dd_CopyBmatrix
++#undef dd_CopyNormalizedAmatrix
++#undef dd_CopyNormalizedArow
++#undef dd_CreateInitialEdges
++#undef dd_CreateMatrix
++#undef dd_CreateNewRay
++#undef dd_CreateSetFamily
++#undef dd_DeleteNegativeRays
++#undef dd_Eliminate
++#undef dd_Equal
++#undef dd_EqualToZero
++#undef dd_EvaluateARay1
++#undef dd_EvaluateARay2
++#undef dd_FeasibilityIndices
++#undef dd_FindBasis
++#undef dd_FindInitialRays
++#undef dd_FreeAmatrix
++#undef dd_FreeArow
++#undef dd_FreeBmatrix
++#undef dd_FreeDDMemory
++#undef dd_FreeDDMemory0
++#undef dd_FreeMatrix
++#undef dd_FreePolyhedra
++#undef dd_FreeSetFamily
++#undef dd_InitializeAmatrix
++#undef dd_InitializeArow
++#undef dd_InitializeBmatrix
++#undef dd_InnerProduct
++#undef dd_Larger
++#undef dd_LexEqual
++#undef dd_LexLarger
++#undef dd_LexSmaller
++#undef dd_LinearComb
++#undef dd_MatrixRank
++#undef dd_Negative
++#undef dd_Nonnegative
++#undef dd_Nonpositive
++#undef dd_Nonzero
++#undef dd_Normalize
++#undef dd_Partition
++#undef dd_PermuteCopyAmatrix
++#undef dd_PermutePartialCopyAmatrix
++#undef dd_Positive
++#undef dd_QuickSort
++#undef dd_RandomPermutation
++#undef dd_SelectNextHalfspace
++#undef dd_SelectNextHalfspace0
++#undef dd_SelectNextHalfspace1
++#undef dd_SelectNextHalfspace2
++#undef dd_SelectNextHalfspace3
++#undef dd_SelectNextHalfspace4
++#undef dd_SelectNextHalfspace5
++#undef dd_SelectNextHalfspace6
++#undef dd_SelectPreorderedNext
++#undef dd_SetInequalitySets
++#undef dd_SetToIdentity
++#undef dd_Smaller
++#undef dd_StoreRay1
++#undef dd_StoreRay2
++#undef dd_UniqueRows
++#undef dd_UpdateEdges
++#undef dd_UpdateRowOrderVector
++#undef dd_ZeroIndexSet
++#undef dd_abs
++#undef dd_ComputeRowOrderVector2
++#undef dd_CopyLPSolution
++#undef dd_CreateLPData
++#undef dd_CreateLP_H_ImplicitLinearity
++#undef dd_CreateLP_H_Redundancy
++#undef dd_CreateLP_V_ImplicitLinearity
++#undef dd_CreateLP_V_Redundancy
++#undef dd_CreateLP_V_SRedundancy
++#undef dd_CrissCrossMaximize
++#undef dd_CrissCrossMinimize
++#undef dd_CrissCrossSolve
++#undef dd_DualSimplexMaximize
++#undef dd_DualSimplexMinimize
++#undef dd_DualSimplexSolve
++#undef dd_ExistsRestrictedFace
++#undef dd_ExistsRestrictedFace2
++#undef dd_FindDualFeasibleBasis
++#undef dd_FindLPBasis
++#undef dd_FindLPBasis2
++#undef dd_FindRelativeInterior
++#undef dd_FreeLPData
++#undef dd_FreeLPSolution
++#undef dd_FreeOfImplicitLinearity
++#undef dd_GaussianColumnPivot
++#undef dd_GaussianColumnPivot2
++#undef dd_GetRedundancyInformation
++#undef dd_ImplicitLinearity
++#undef dd_ImplicitLinearityRows
++#undef dd_LPCopyRow
++#undef dd_LPReplaceRow
++#undef dd_LPReverseRow
++#undef dd_LPSolve
++#undef dd_LPSolve0
++#undef dd_MakeLPforInteriorFinding
++#undef dd_Matrix2Adjacency
++#undef dd_Matrix2Feasibility
++#undef dd_Matrix2Feasibility2
++#undef dd_Matrix2LP
++#undef dd_Matrix2WeakAdjacency
++#undef dd_MatrixCanonicalize
++#undef dd_MatrixCanonicalizeLinearity
++#undef dd_MatrixRedundancyRemove
++#undef dd_RandomPermutation2
++#undef dd_RayShooting
++#undef dd_Redundant
++#undef dd_RedundantExtensive
++#undef dd_RedundantRows
++#undef dd_RedundantRowsViaShooting
++#undef dd_ResetTableau
++#undef dd_SRedundant
++#undef dd_SRedundantRows
++#undef dd_SelectCrissCrossPivot
++#undef dd_SelectDualSimplexPivot
++#undef dd_SelectPivot2
++#undef dd_SelectPreorderedNext2
++#undef dd_SetNumberType
++#undef dd_SetSolutions
++#undef dd_TableauEntry
++#undef dd_WriteLPResult
++#undef dd_WriteSignTableau
++#undef dd_WriteSignTableau2
++#undef dd_WriteTableau
++#undef dd_BlockElimination
++#undef dd_FourierElimination
++#undef set_addelem
++#undef set_binwrite
++#undef set_blocks
++#undef set_card
++#undef set_compl
++#undef set_copy
++#undef set_delelem
++#undef set_diff
++#undef set_emptyset
++#undef set_fbinwrite
++#undef set_free
++#undef set_fwrite
++#undef set_fwrite_compl
++#undef set_groundsize
++#undef set_initialize
++#undef set_int
++#undef set_member
++#undef set_subset
++#undef set_uni
++#undef set_write
+diff -durpN cddlib-094g.orig/lib-src/Makefile.am cddlib-094g/lib-src/Makefile.am
+--- cddlib-094g.orig/lib-src/Makefile.am	2012-03-23 02:43:56.000000000 -0600
++++ cddlib-094g/lib-src/Makefile.am	2012-12-03 09:35:20.190960302 -0700
+@@ -7,7 +7,9 @@ cddmp.c \
+ cddio.c \
+ cddlib.c \
+ cddproj.c \
+-setoper.c
++setoper.c \
++gmpdef.h \
++gmpundef.h
+ 
+ include_HEADERS = \
+ cdd.h \
+diff -durpN cddlib-094g.orig/lib-src/setoper.c cddlib-094g/lib-src/setoper.c
+--- cddlib-094g.orig/lib-src/setoper.c	2012-03-23 02:29:29.000000000 -0600
++++ cddlib-094g/lib-src/setoper.c	2012-12-03 09:35:20.190960302 -0700
+@@ -7,6 +7,7 @@
+    (set_fwrite_compl(), set_groundsize added.  set_compl fixed.)
+  */
+  
++#include "gmpdef.h"
+ #include "setoper.h"
+ 
+ #include <limits.h>
+@@ -313,4 +314,28 @@ void set_fbinwrite(FILE *f,set_type set)
+ 	fprintf(f,"\n");
+ }
+ 
++#ifdef GMPRATIONAL
++#include "gmpundef.h"
++MKALIAS (set_addelem);
++MKALIAS (set_binwrite);
++MKALIAS (set_blocks);
++MKALIAS (set_card);
++MKALIAS (set_compl);
++MKALIAS (set_copy);
++MKALIAS (set_delelem);
++MKALIAS (set_diff);
++MKALIAS (set_emptyset);
++MKALIAS (set_fbinwrite);
++MKALIAS (set_free);
++MKALIAS (set_fwrite);
++MKALIAS (set_fwrite_compl);
++MKALIAS (set_groundsize);
++MKALIAS (set_initialize);
++MKALIAS (set_int);
++MKALIAS (set_member);
++MKALIAS (set_subset);
++MKALIAS (set_uni);
++MKALIAS (set_write);
++#endif
++
+ /* End of the library:  setoper.c  */
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddcore_f.c cddlib-094g/lib-src-gmp/cddcore_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddcore_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddcore_f.c	2012-12-03 09:35:20.191960250 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd_f.h"
+ #include <stdio.h>
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddio_f.c cddlib-094g/lib-src-gmp/cddio_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddio_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddio_f.c	2012-12-03 09:35:20.191960250 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd_f.h"
+ #include <stdio.h>
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddlib_f.c cddlib-094g/lib-src-gmp/cddlib_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddlib_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddlib_f.c	2012-12-03 09:35:20.192960198 -0700
+@@ -31,6 +31,7 @@
+    from the Pascal program pdd.p written by Komei Fukuda. 
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h" 
+   /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd_f.h"
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddlp_f.c cddlib-094g/lib-src-gmp/cddlp_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddlp_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddlp_f.c	2012-12-03 09:35:20.193960146 -0700
+@@ -11,6 +11,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. May 18, 2000 or later) */
+ #include "cdd_f.h"
+ #include <stdio.h>
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddmp_f.c cddlib-094g/lib-src-gmp/cddmp_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddmp_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddmp_f.c	2012-12-03 09:35:20.194960094 -0700
+@@ -17,6 +17,7 @@
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. March 16,1995 or later) */
+ #include "cdd_f.h"
+ 
+diff -durpN cddlib-094g.orig/lib-src-gmp/cddproj_f.c cddlib-094g/lib-src-gmp/cddproj_f.c
+--- cddlib-094g.orig/lib-src-gmp/cddproj_f.c	2012-03-23 04:43:56.000000000 -0600
++++ cddlib-094g/lib-src-gmp/cddproj_f.c	2012-12-03 09:35:20.194960094 -0700
+@@ -10,6 +10,7 @@
+    the manual cddlibman.tex for detail.
+ */
+ 
++#include "gmpdef.h"
+ #include "setoper.h"  /* set operation library header (Ver. June 1, 2000 or later) */
+ #include "cdd_f.h"
+ #include <stdio.h>
+diff -durpN cddlib-094g.orig/lib-src-gmp/Makefile.am cddlib-094g/lib-src-gmp/Makefile.am
+--- cddlib-094g.orig/lib-src-gmp/Makefile.am	2012-03-23 02:44:20.000000000 -0600
++++ cddlib-094g/lib-src-gmp/Makefile.am	2012-12-03 09:43:46.753846543 -0700
+@@ -25,4 +25,18 @@ cddtypes_f.h \
+ setoper.h
+ 
+ AM_CPPFLAGS = -I$(gmpincludedir) -DGMPRATIONAL
+-AM_LDFLAGS = -version-info 0:0:0
++AM_LDFLAGS = -version-info 0:0:0 \
++  -Wl,--defsym=dd_choiceLexicoPivotQ=dd_choiceLexicoPivotQ_gmp \
++  -Wl,--defsym=dd_choiceLPSolverDefault=dd_choiceLPSolverDefault_gmp \
++  -Wl,--defsym=dd_choiceRedcheckAlgorithm=dd_choiceRedcheckAlgorithm_gmp \
++  -Wl,--defsym=dd_statACpivots=dd_statACpivots_gmp \
++  -Wl,--defsym=dd_statBApivots=dd_statBApivots_gmp \
++  -Wl,--defsym=dd_statCCpivots=dd_statCCpivots_gmp \
++  -Wl,--defsym=dd_statDS1pivots=dd_statDS1pivots_gmp \
++  -Wl,--defsym=dd_statDS2pivots=dd_statDS2pivots_gmp \
++  -Wl,--defsym=dd_statStartTime=dd_statStartTime_gmp \
++  -Wl,--defsym=dd_minusone=dd_minusone_gmp \
++  -Wl,--defsym=dd_minuszero=dd_minuszero_gmp \
++  -Wl,--defsym=dd_one=dd_one_gmp \
++  -Wl,--defsym=dd_purezero=dd_purezero_gmp \
++  -Wl,--defsym=dd_zero=dd_zero_gmp
diff --git a/cddlib.spec b/cddlib.spec
index 1cb8a04..9bcbd77 100644
--- a/cddlib.spec
+++ b/cddlib.spec
@@ -1,6 +1,6 @@
 Name:           cddlib
 Version:        094g
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A library for generating all vertices in convex polyhedrons
 Group:          Applications/Engineering
 License:        GPLv2+
@@ -8,15 +8,17 @@ URL:            http://www.ifor.math.ethz.ch/~fukuda/cdd_home/
 Source0:        ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/%{name}-%{version}.tar.gz
 # Extracted from http://www.sagemath.org/packages/standard/cddlib-094f.p11.spkg
 Source1:        cdd_both_reps.c
+# Patch from sagemath to build and test cdd_both_reps
+Patch0:         %{name}-sagemath.patch
+# Create symbol aliases for the gmp build of cddlib.  This is needed by
+# polymake, which links against both versions of cddlib, and needs some way to
+# call functions in both.
+Patch1:         %{name}-polymake.patch
 
-BuildRequires:  autoconf
-BuildRequires:  automake
 BuildRequires:  gmp-devel
 BuildRequires:  libtool
 BuildRequires:  tex(latex)
 
-Patch0:         cddlib-sagemath.patch
-
 %description
 The C-library cddlib is a C implementation of the Double Description 
 Method of Motzkin et al. for generating all vertices (i.e. extreme points)
@@ -66,12 +68,15 @@ Sample binaries that use cddlib.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
-# due to patch0 change to Makefile.am files
+# Regenerate Makefile.in files due to patched Makefile.am files
 autoreconf -ifs
+ln -s ../lib-src/gmpdef.h lib-src-gmp/gmpdef.h
+ln -s ../lib-src/gmpundef.h lib-src-gmp/gmpundef.h
 
-# install sagemath extra source
-cp %{SOURCE1} src
+# Install sagemath extra source
+cp -p %{SOURCE1} src
 ln -sf ../src/cdd_both_reps.c src-gmp/cdd_both_reps.c
 
 # Clean up the examples
@@ -80,7 +85,7 @@ find . -name \.DS_Store\* | xargs rm -f
 rm doc/cddlibman.{aux,blg,dvi,log,pdf,ps}
 
 # Fix the FSF's address
-for f in `find . -type f | xargs grep -Fl '675 Mass'`; do
+for f in `find . -type f -print0 | xargs -0 grep -Fl '675 Mass'`; do
   sed -i.orig \
     's/675 Mass Ave, Cambridge, MA 02139/51 Franklin Street, Suite 500, Boston, MA  02110-1335/' \
     $f
@@ -141,6 +146,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
 
 %changelog
+* Tue Nov 27 2012 Jerry James <loganjerry at gmail.com> - 094g-7
+- Add function aliases in the GMP build for polymake
+- License fixing code now handles names with spaces
+
 * Sat Jul 28 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 094g-6
 - Add libtool to build requires
 


More information about the scm-commits mailing list