Package: bliss / 0.73-1

upstream-autotoolization.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
Description: upstream: autotoolization
 Attempt to provide an autotools chain for bliss;
 meant to be submitted to the upstrema team.
Origin: debian
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2016-03-31

--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,37 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.69])
+LT_PREREQ([2.4.2])
+dnl
+AC_INIT([bliss],[0.73],
+	[tommi.junttila@aalto.fi],[bliss],
+	[http://www.tcs.hut.fi/Software/bliss/])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_SRCDIR([bliss_C.h])
+AC_CONFIG_HEADERS([bliss_config.h])
+AM_SILENT_RULES([yes])
+AM_INIT_AUTOMAKE([foreign])
+AM_MAINTAINER_MODE([])
+
+AC_CANONICAL_HOST
+
+dnl libtool
+LT_INIT
+
+dnl Checks for programs:
+AC_PROG_CXX
+AC_PROG_CC
+
+dnl Checks for libraries:
+dnl GNU MultiPrecision arithmetic library (GMP)
+AM_PATH_GMP([6.1.0],[],[AC_MSG_ERROR(could not find required version of GMP)])
+
+AC_CONFIG_FILES([
+	include/Makefile
+	include/bliss/Makefile
+	Makefile
+	])
+AC_OUTPUT
+
+dnl eof
+
--- /dev/null
+++ b/m4/adhoc_gmp.m4
@@ -0,0 +1,282 @@
+# adhoc_gmp.m4 serial 2
+dnl m4/adhoc_gmp.m4 -- M4 macro processor include script
+dnl
+dnl Copyright (C) 2015 Jerome Benoit <jgmbenoit@rezozer.net>
+dnl
+dnl Based on macros by Owen Taylor, modified by:
+dnl Hans Petter Jansson, 2001-04-09;
+dnl Allin Cottrell, April 2003;
+dnl and certainly others.
+dnl
+dnl Copying and distribution of this file, with or without modification, are
+dnl permitted in any medium without royalty provided the copyright notice and
+dnl this notice are preserved. This file is offered as-is, without any warranty.
+dnl
+dnl
+dnl NOTE:
+dnl  m4/adhoc_gmp.m4 is a digest version of m4/mpria_ax_prog_path_gmp_cc.m4
+dnl  written and copyrighted by the same author Jerome Benoit for the
+dnl  GNU MPRIA project <http://www.gnu.org/software/mpria/>.
+dnl
+
+dnl _adhoc_AC_PROG_PATH_GMP_CC_ARG_WITH
+AC_DEFUN_ONCE([_adhoc_AC_PROG_PATH_GMP_CC_ARG_WITH],[dnl
+AC_ARG_WITH([gmp-prefix],
+	[AS_HELP_STRING([--with-gmp-prefix=PREFIX],
+		[specify prefix for the installed GMP [standard search prefixes]])],
+	[gmp_config_prefix="$withval"],[gmp_config_prefix=""])
+AC_ARG_WITH([gmp-include],
+	[AS_HELP_STRING([--with-gmp-include=PATH],
+		[specify directory for the installed GMP header file [standard search paths]])],
+	[gmp_config_include_prefix="$withval"],[gmp_config_include_prefix=""])
+AC_ARG_WITH([gmp-lib],
+	[AS_HELP_STRING([--with-gmp-lib=PATH],
+		[specify directory for the installed GMP library [standard search paths]])],
+	[gmp_config_lib_prefix="$withval"],[gmp_config_lib_prefix=""])
+
+	if test "x$gmp_config_include_prefix" = "x" ; then
+		if test "x$gmp_config_prefix" != "x" ; then
+			gmp_config_include_prefix="$gmp_config_prefix/include"
+		fi
+	fi
+	if test "x$gmp_config_lib_prefix" = "x" ; then
+		if test "x$gmp_config_prefix" != "x" ; then
+			gmp_config_lib_prefix="$gmp_config_prefix/lib"
+		fi
+	fi
+
+	GMP_CPPFLAGS=
+	if test "x$gmp_config_include_prefix" != "x" ; then
+		GMP_CPPFLAGS="-I$gmp_config_include_prefix"
+	fi
+
+	GMP_LDFLAGS=
+	if test "x$gmp_config_lib_prefix" != "x" ; then
+		GMP_LDFLAGS="-L$gmp_config_lib_prefix"
+	fi
+
+AC_SUBST(GMP_CPPFLAGS)
+AC_SUBST(GMP_LDFLAGS)
+])
+
+dnl adhoc_AM_PATH_GMP([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+AC_DEFUN([adhoc_AM_PATH_GMP],[dnl
+AC_REQUIRE([AC_PROG_SED])dnl
+AC_REQUIRE([_adhoc_AC_PROG_PATH_GMP_CC_ARG_WITH])dnl
+
+	min_gmp_version=m4_default([$1],[4.1.0])
+	min_gmp_version_0_0_0="$min_gmp_version.0.0.0"
+
+	min_gmp_version_major=`echo $min_gmp_version_0_0_0 | \
+		$SED 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)\(.*\)/\1/'`
+	min_gmp_version_minor=`echo $min_gmp_version_0_0_0 | \
+		$SED 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)\(.*\)/\2/'`
+	min_gmp_version_micro=`echo $min_gmp_version_0_0_0 | \
+		$SED 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)\(.*\)/\3/'`
+
+	min_gmp_dotted_version="$min_gmp_version_major.$min_gmp_version_minor.$min_gmp_version_micro"
+
+	GMP_LIBS="-lgmp"
+
+	AC_MSG_CHECKING([for GMP - version >= $min_gmp_version ])
+
+	ac_save_CPPFLAGS="$CPPFLAGS"
+	ac_save_CFLAGS="$CFLAGS"
+	ac_save_LDFLAGS="$LDFLAGS"
+	ac_save_LIBS="$LIBS"
+
+	CPPFLAGS="$CPPFLAGS $GMP_CPPFLAGS"
+	CFLAGS="$CFLAGS $GMP_CFLAGS"
+	LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
+	LIBS="$LIBS $GMP_LIBS"
+
+	rm -f conf.gmptest
+	AC_RUN_IFELSE([AC_LANG_SOURCE(
+[[
+#include <gmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define PRINTF_MSG_ERROR_MISMATCH_HEADER_LIBRARY \
+	printf("*** This likely indicates either a bad configuration or some\n"); \
+	printf("*** other inconsistency in the development environment. If the\n"); \
+	printf("*** expected GNU MP library cannot be found, it may be sufficient\n"); \
+	printf("*** either to set properly the LD_LIBRARY_PATH environment variable\n"); \
+	printf("*** or to configure ldconfig(8) to consider the installed location.\n"); \
+	printf("*** Otherwise a bad configuration or an inconsistency in the\n"); \
+	printf("*** include/library search paths may be investigated; adjustments\n"); \
+	printf("*** through the use of --with-gmp-(include|lib) configure option\n"); \
+	printf("*** may help.\n"); \
+	printf("***\n"); \
+	printf("*** If an old version is installed, it may be best to remove it and to\n"); \
+	printf("*** reinstall a more recent one; although modifying LD_LIBRARY_PATH\n"); \
+	printf("*** may also get things to work. The latest version of GNU MP is always\n"); \
+	printf("*** available from http://gmplib.org/.\n"); \
+	printf("***\n");
+
+int main ()
+{
+	int gmp_hdr_version_major = 0;
+	int gmp_hdr_version_minor = 0;
+	int gmp_hdr_version_micro = 0;
+	int gmp_lib_version_major = 0;
+	int gmp_lib_version_minor = 0;
+	int gmp_lib_version_micro = 0;
+	char *tmp_version_0;
+	char *tmp_version_1;
+	mpz_t a;
+	mpz_t b;
+	mpz_t c;
+
+	mpz_init (a);
+	mpz_init (b);
+	mpz_init (c);
+	mpz_mul (c, a, b);
+
+	fclose (fopen ("conf.gmptest", "w"));
+
+#ifdef __GMP_CC
+#define GMPM4_CC __GMP_CC
+#else
+#define GMPM4_CC ""
+#endif
+
+#ifdef __GMP_CFLAGS
+#define GMPM4_CFLAGS __GMP_CFLAGS
+#else
+#define GMPM4_CFLAGS ""
+#endif
+
+#ifdef __GNU_MP_VERSION
+	gmp_hdr_version_major = __GNU_MP_VERSION;
+#endif
+
+#ifdef __GNU_MP_VERSION_MINOR
+	gmp_hdr_version_minor = __GNU_MP_VERSION_MINOR;
+#endif
+
+#ifdef __GNU_MP_VERSION_PATCHLEVEL
+	gmp_hdr_version_micro = __GNU_MP_VERSION_PATCHLEVEL;
+#endif
+
+	/* HP/UX 9 (%@#!) writes to sscanf strings */
+	tmp_version_0 = strdup(gmp_version);
+	tmp_version_1 = strdup(gmp_version);
+	if (sscanf(tmp_version_0, "%d.%d.%d",
+			&gmp_lib_version_major, &gmp_lib_version_minor, &gmp_lib_version_micro) != 3) {
+		gmp_lib_version_micro = 0;
+		if (sscanf(tmp_version_1, "%d.%d",
+				&gmp_lib_version_major, &gmp_lib_version_minor) != 2) {
+			printf("\n***\n");
+			printf("*** unexpected GMP library version string\n");
+			printf("***\n");
+			exit(1);
+			}
+	}
+
+	if (
+			(gmp_lib_version_major != gmp_hdr_version_major) ||
+			(gmp_lib_version_minor != gmp_hdr_version_minor) ||
+			(gmp_lib_version_micro != gmp_hdr_version_micro)
+		) {
+		printf("\n***\n");
+		printf("*** GNU MP header version numbers (%d.%d.%d) and\n",
+			gmp_hdr_version_major, gmp_hdr_version_minor, gmp_hdr_version_micro);
+		printf("*** GNU MP library version numbers (%d.%d.%d)\n",
+			gmp_lib_version_major, gmp_lib_version_minor, gmp_lib_version_micro);
+		printf("*** do not match.\n");
+		printf("***\n");
+		PRINTF_MSG_ERROR_MISMATCH_HEADER_LIBRARY
+		}
+	else if (
+			($min_gmp_version_major < gmp_hdr_version_major) ||
+			(
+				($min_gmp_version_major == gmp_hdr_version_major) &&
+				($min_gmp_version_minor < gmp_hdr_version_minor)
+				) ||
+			(
+				($min_gmp_version_major == gmp_hdr_version_major) &&
+				($min_gmp_version_minor == gmp_hdr_version_minor) &&
+				($min_gmp_version_micro <= gmp_hdr_version_micro)
+				)
+		) {
+		return (0);
+		}
+	else {
+		printf("\n***\n");
+		printf("*** GNU MP version $min_gmp_dotted_version or higher is required:\n");
+		printf("*** an older version of GNU MP (%d.%d.%d) was found.\n",
+			gmp_hdr_version_major, gmp_hdr_version_minor, gmp_hdr_version_micro);
+		printf("*** The latest version of GNU MP is always available from http://gmplib.org/.\n");
+		printf("***\n");
+		}
+
+	return (1);
+}
+]]
+)],[],[no_gmp=yes],[AC_MSG_WARN([$ac_n "cross compiling; assumed OK... $ac_c])])
+
+	CPPFLAGS="$ac_save_CPPFLAGS"
+	CFLAGS="$ac_save_CFLAGS"
+	LDFLAGS="$ac_save_LDFLAGS"
+	LIBS="$ac_save_LIBS"
+
+	if test "x$no_gmp" = "x" ; then
+		AC_MSG_RESULT([yes])
+		$2
+	else
+		AC_MSG_RESULT([no])
+		if test -f conf.gmptest ; then
+			:
+		else
+			echo "***"
+			echo "*** Could not run GNU MP test program, checking why..."
+			CPPFLAGS="$CPPFLAGS $GMP_CPPFLAGS"
+			CFLAGS="$CFLAGS $GMP_CFLAGS"
+			LDFLAGS="$CFLAGS $GMP_LDFLAGS"
+			LIBS="$LIBS $GMP_LIBS"
+			AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[
+#include <gmp.h>
+#include <stdio.h>
+]],
+[[ return (1); ]]
+)],
+[
+echo "***"
+echo "*** The test program compiled, but did not run. This usually means"
+echo "*** that the run-time linker is not finding GNU MP or finding the wrong"
+echo "*** version of GNU MP. If it is not finding GNU MP, you'll need to set your"
+echo "*** LD_LIBRARY_PATH environment variable, or configure ldconfig(8) to consider"
+echo "*** the installed location."
+echo "***"
+echo "*** If you have an old version installed, it is best to remove it; although"
+echo "*** modifying LD_LIBRARY_PATH may also get things to work. The latest version"
+echo "*** of GNU MP is always available from http://gmplib.org/."
+echo "***"
+],
+[
+echo "***"
+echo "*** The test program failed to compile or link. See the file config.log for the"
+echo "*** exact error that occured. This usually means GNU MP was incorrectly installed"
+echo "*** or that you have moved GNU MP since it was installed."
+echo "***"
+])
+			CPPFLAGS="$ac_save_CPPFLAGS"
+			CFLAGS="$ac_save_CFLAGS"
+			LDFLAGS="$ac_save_LDFLAGS"
+			LIBS="$ac_save_LIBS"
+		fi
+		rm -f conf.gmptest
+		m4_default([$3],[AC_MSG_ERROR([no suitable GNU MP library found])])
+	fi
+	rm -f conf.gmptest
+
+AC_SUBST(GMP_LIBS)
+])
+
+dnl alias
+AU_ALIAS([AM_PATH_GMP],[adhoc_AM_PATH_GMP])
+
+dnl eof
--- a/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-CFLAGS = -I.
-CFLAGS += -g
-#CFLAGS += -pg
-CFLAGS += -Wall
-CFLAGS += --pedantic
-CFLAGS += -O9
-#CFLAGS += -DBLISS_DEBUG
-CFLAGS += -fPIC
-
-SRCS = defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc
-SRCS += timer.cc utils.cc bliss_C.cc
-
-OBJS = $(addsuffix .o, $(basename $(SRCS)))
-
-GMPOBJS = $(addsuffix g,  $(OBJS))
-
-LIB =
-#LIB += /usr/lib/ccmalloc.o -ldl
-
-CC = g++
-RANLIB = ranlib
-AR = ar
-BLISSLIB = libbliss.a
-
-gmp:	LIB += -lgmp
-gmp:	CFLAGS += -DBLISS_USE_GMP
-
-normal:	bliss
-gmp:	bliss_gmp
-
-
-all:: lib bliss
-
-%.o %.og:	%.cc
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-lib: $(OBJS)
-	rm -f $(BLISSLIB)
-	$(AR) cr $(BLISSLIB) $(OBJS)
-	$(RANLIB) $(BLISSLIB)
-
-lib_gmp: $(GMPOBJS)
-	rm -f $(BLISSLIB)
-	$(AR) cr $(BLISSLIB) $(GMPOBJS)
-	$(RANLIB) $(BLISSLIB)
-
-bliss: bliss.o lib $(OBJS)
-	$(CC) $(CFLAGS) -o bliss bliss.o $(OBJS) $(LIB)
-
-bliss_gmp: bliss.og lib_gmp $(GMPOBJS)
-	$(CC) $(CFLAGS) -o bliss bliss.og $(GMPOBJS) $(LIB)
-
-
-clean:
-	rm -f bliss $(BLISSLIB) $(OBJS) bliss.o $(GMPOBJS) bliss.og
-
-# DO NOT DELETE
--- /dev/null
+++ b/Makefile.upstream
@@ -0,0 +1,57 @@
+CFLAGS = -I.
+CFLAGS += -g
+#CFLAGS += -pg
+CFLAGS += -Wall
+CFLAGS += --pedantic
+CFLAGS += -O9
+#CFLAGS += -DBLISS_DEBUG
+CFLAGS += -fPIC
+
+SRCS = defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc
+SRCS += timer.cc utils.cc bliss_C.cc
+
+OBJS = $(addsuffix .o, $(basename $(SRCS)))
+
+GMPOBJS = $(addsuffix g,  $(OBJS))
+
+LIB =
+#LIB += /usr/lib/ccmalloc.o -ldl
+
+CC = g++
+RANLIB = ranlib
+AR = ar
+BLISSLIB = libbliss.a
+
+gmp:	LIB += -lgmp
+gmp:	CFLAGS += -DBLISS_USE_GMP
+
+normal:	bliss
+gmp:	bliss_gmp
+
+
+all:: lib bliss
+
+%.o %.og:	%.cc
+	$(CC) $(CFLAGS) -c -o $@ $<
+
+lib: $(OBJS)
+	rm -f $(BLISSLIB)
+	$(AR) cr $(BLISSLIB) $(OBJS)
+	$(RANLIB) $(BLISSLIB)
+
+lib_gmp: $(GMPOBJS)
+	rm -f $(BLISSLIB)
+	$(AR) cr $(BLISSLIB) $(GMPOBJS)
+	$(RANLIB) $(BLISSLIB)
+
+bliss: bliss.o lib $(OBJS)
+	$(CC) $(CFLAGS) -o bliss bliss.o $(OBJS) $(LIB)
+
+bliss_gmp: bliss.og lib_gmp $(GMPOBJS)
+	$(CC) $(CFLAGS) -o bliss bliss.og $(GMPOBJS) $(LIB)
+
+
+clean:
+	rm -f bliss $(BLISSLIB) $(OBJS) bliss.o $(GMPOBJS) bliss.og
+
+# DO NOT DELETE
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,71 @@
+ACLOCAL_AMFLAGS = -I m4
+
+AUTOMAKE_OPTIONS = \
+	dist-xz \
+	dist-bzip2 \
+	dist-zip
+
+AM_DISTCHECK_CONFIGURE_FLAGS ?= \
+	--disable-maintainer-mode \
+	--enable-extended-tests
+
+## Library versioning (C:R:A == current:revision:age)
+## 0.73 2:0:0
+LIBBLISS_LT_VERSION = 2:0:0
+
+SUBDIRS = include .
+
+AM_CFLAGS = -g -pedantic -Wall -O3
+
+pkginclude_HEADERS = \
+	bignum.hh \
+	kqueue.hh \
+	kstack.hh \
+	defs.hh \
+	graph.hh \
+	partition.hh \
+	orbit.hh \
+	uintseqhash.hh \
+	heap.hh \
+	timer.hh \
+	utils.hh \
+	bliss_C.h
+
+lib_LTLIBRARIES = libbliss.la
+
+bin_PROGRAMS = bliss
+
+libbliss_la_SOURCES = \
+	defs.cc \
+	graph.cc \
+	partition.cc \
+	orbit.cc \
+	uintseqhash.cc \
+	heap.cc \
+	timer.cc \
+	utils.cc \
+	bliss_C.cc
+
+libbliss_la_CXXFLAGS = \
+	-D BLISS_USE_GMP \
+	-I $(top_builddir)/include \
+	$(GMP_CFLAGS)
+
+libbliss_la_CFLAGS = \
+	$(libbliss_la_CXXFLAGS)
+
+libbliss_la_LDFLAGS = \
+	-version-info $(LIBBLISS_LT_VERSION)
+
+libbliss_la_LIBADD = \
+	$(GMP_LIBS)
+
+bliss_SOURCES = \
+	bliss.cc
+
+bliss_CXXFLAGS = \
+	$(libbliss_la_CXXFLAGS)
+
+bliss_LDADD = \
+	$(top_builddir)/libbliss.la \
+	$(GMP_LIBS)
--- /dev/null
+++ b/include/bliss/Makefile.am
@@ -0,0 +1,13 @@
+header-links: remove-links
+	HEADERLIST="$(top_srcdir)/bliss_*.h $(top_srcdir)/*.hh" ; \
+	for hh in $$HEADERLIST; do \
+		BASENAME=`basename $$hh`; \
+		test -e $$BASENAME || $(LN_S) $$hh $$BASENAME; \
+	done
+
+remove-links:
+	$(RM) bliss_*.h *.hh
+
+all-local: header-links
+
+clean-local: remove-links
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = bliss