Skip to content

Commit

Permalink
Merge pull request #46 from kamalsaleh/master
Browse files Browse the repository at this point in the history
relax CddInterface header inclusion of "setoper.h"
  • Loading branch information
kamalsaleh authored Sep 24, 2024
2 parents d43b3e2 + 395ca9d commit 0773351
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ current_cddlib
*~
autom4te.cache/
bin/
src/config.*
config.log
config.status
configure
Expand Down
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "CddInterface",
Subtitle := "Gap interface to Cdd package",
Version := "2024.09.01",
Version := "2024.09.02",
Date := ~.Version{[ 1 .. 10 ]},
Date := Concatenation( ~.Date{[ 9, 10 ]}, "/", ~.Date{[ 6, 7 ]}, "/", ~.Date{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Regenerate configure from configure.ac. Requires GNU autoconf.
set -ex
autoconf -Wall -f
autoreconf -Wall -f
11 changes: 10 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ AC_PREREQ([2.68])
AC_INIT([CddInterface], [package])
AC_CONFIG_SRCDIR([src/CddInterface.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])
m4_include([m4/find_gap.m4])

dnl ##
Expand Down Expand Up @@ -62,7 +63,15 @@ old_CPPFLAGS="$CPPFLAGS"
old_LDFLAGS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $CDD_CPPFLAGS"
LDFLAGS="$LDFLAGS $CDD_LDFLAGS"
AC_CHECK_HEADER([setoper.h], [], [AC_MSG_ERROR([could not use setoper.h])], [])

AC_CHECK_HEADER(
[cddlib/setoper.h],
[AC_DEFINE([HAVE_CDDLIB_SETOPER_H], [1], [setting HAVE_CDDLIB_SETOPER_H=1])],
[AC_CHECK_HEADER(
[setoper.h],
[AC_DEFINE([HAVE_CDDLIB_SETOPER_H], [0], [setting HAVE_CDDLIB_SETOPER_H=0])],
[AC_MSG_ERROR([could not find setoper.h])])])

AC_CHECK_LIB([cddgmp],[dd_SetLinearity])
CPPFLAGS="$old_CPPFLAGS"
LDFLAGS="$old_LDFLAGS"
Expand Down
12 changes: 9 additions & 3 deletions src/CddInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
*/

#include "compiled.h" // GAP headers

#include "setoper.h"
#include "cdd.h"
#include "config.h"

#if HAVE_CDDLIB_SETOPER_H == 1
#include <cddlib/setoper.h>
#include <cddlib/cdd.h>
#else
#include <setoper.h>
#include <cdd.h>
#endif

#include "gmp.h"

Expand Down

0 comments on commit 0773351

Please sign in to comment.