Skip to content

Commit 0773351

Browse files
authored
Merge pull request #46 from kamalsaleh/master
relax CddInterface header inclusion of "setoper.h"
2 parents d43b3e2 + 395ca9d commit 0773351

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ current_cddlib
99
*~
1010
autom4te.cache/
1111
bin/
12+
src/config.*
1213
config.log
1314
config.status
1415
configure

PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CddInterface",
1212
Subtitle := "Gap interface to Cdd package",
13-
Version := "2024.09.01",
13+
Version := "2024.09.02",
1414
Date := ~.Version{[ 1 .. 10 ]},
1515
Date := Concatenation( ~.Date{[ 9, 10 ]}, "/", ~.Date{[ 6, 7 ]}, "/", ~.Date{[ 1 .. 4 ]} ),
1616
License := "GPL-2.0-or-later",

autogen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# Regenerate configure from configure.ac. Requires GNU autoconf.
44
set -ex
5-
autoconf -Wall -f
5+
autoreconf -Wall -f

configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ AC_PREREQ([2.68])
1212
AC_INIT([CddInterface], [package])
1313
AC_CONFIG_SRCDIR([src/CddInterface.c])
1414
AC_CONFIG_MACRO_DIR([m4])
15+
AC_CONFIG_HEADERS([src/config.h])
1516
m4_include([m4/find_gap.m4])
1617

1718
dnl ##
@@ -62,7 +63,15 @@ old_CPPFLAGS="$CPPFLAGS"
6263
old_LDFLAGS="$LDFLAGS"
6364
CPPFLAGS="$CPPFLAGS $CDD_CPPFLAGS"
6465
LDFLAGS="$LDFLAGS $CDD_LDFLAGS"
65-
AC_CHECK_HEADER([setoper.h], [], [AC_MSG_ERROR([could not use setoper.h])], [])
66+
67+
AC_CHECK_HEADER(
68+
[cddlib/setoper.h],
69+
[AC_DEFINE([HAVE_CDDLIB_SETOPER_H], [1], [setting HAVE_CDDLIB_SETOPER_H=1])],
70+
[AC_CHECK_HEADER(
71+
[setoper.h],
72+
[AC_DEFINE([HAVE_CDDLIB_SETOPER_H], [0], [setting HAVE_CDDLIB_SETOPER_H=0])],
73+
[AC_MSG_ERROR([could not find setoper.h])])])
74+
6675
AC_CHECK_LIB([cddgmp],[dd_SetLinearity])
6776
CPPFLAGS="$old_CPPFLAGS"
6877
LDFLAGS="$old_LDFLAGS"

src/CddInterface.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
*/
44

55
#include "compiled.h" // GAP headers
6-
7-
#include "setoper.h"
8-
#include "cdd.h"
6+
#include "config.h"
7+
8+
#if HAVE_CDDLIB_SETOPER_H == 1
9+
#include <cddlib/setoper.h>
10+
#include <cddlib/cdd.h>
11+
#else
12+
#include <setoper.h>
13+
#include <cdd.h>
14+
#endif
915

1016
#include "gmp.h"
1117

0 commit comments

Comments
 (0)