summaryrefslogtreecommitdiff
blob: d30c51622e2e74028494edcd461edf04fe54a9a7 (plain)
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
Replace simple Makefile by autotools
- allow shared library
- parallel build
- added pkg-config support

Author: Christoph Junghans <ottxor@gentoo.org>

diff -Naur bliss-0.72-fedora/config/.dummy bliss-0.72/config/.dummy
--- bliss-0.72-fedora/config/.dummy	1969-12-31 17:00:00.000000000 -0700
+++ bliss-0.72/config/.dummy	2013-04-28 14:43:06.143760368 -0600
@@ -0,0 +1 @@
+Dummy file to make patch create config dir, which is needed for autotools
diff -Naur bliss-0.72-fedora/configure.ac bliss-0.72/configure.ac
--- bliss-0.72-fedora/configure.ac	1969-12-31 17:00:00.000000000 -0700
+++ bliss-0.72/configure.ac	2013-04-28 14:40:42.283242722 -0600
@@ -0,0 +1,31 @@
+AC_PREREQ([2.65])
+AC_INIT([bliss], [0.72], [Tommi.Junttil@kk.fi])
+
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR(config)
+
+AM_INIT_AUTOMAKE([1.8 foreign])
+
+SHARED_VERSION_INFO="1:0:0"
+AC_SUBST(SHARED_VERSION_INFO)
+
+# Checks for programs.
+AC_PROG_CXX
+
+LT_INIT
+# Checks for libraries.
+AC_ARG_WITH([gmp],
+  [AS_HELP_STRING([--with-gmp], [enable support for GNU Multiple Precision Arithmetic Library @<:@default=check@:>@])],
+  [], [with_readline=no])
+AS_IF([test "x$with_readline" != xno],
+  [AC_CHECK_HEADERS([gmp.h],,AC_MSG_ERROR([Cannot find gmp.h header]))
+    AC_CHECK_LIB([gmp],_init,,AC_MSG_ERROR([Cannot find gmp library]))
+    AC_SUBST([GMP],[-lgmp])
+    [CPPFLAGS="$CPPFLAGS -DBLISS_USE_GMP"]])
+
+AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no)
+AM_CONDITIONAL(HAVE_DOXYGEN,[test .$DOXYGEN != .no])
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([bliss.pc])
+AC_OUTPUT
diff -Naur bliss-0.72-fedora/bliss.pc.in bliss-0.72/bliss.pc.in
--- bliss-0.72-fedora/bliss.pc.in	1969-12-31 17:00:00.000000000 -0700
+++ bliss-0.72/bliss.pc.in	2013-04-28 14:40:54.223285686 -0600
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bliss
+Description: Library for Computing Automorphism Groups and Canonical Labelings of Graphs 
+URL: http://www.tcs.hut.fi/Software/bliss/index.shtml
+Version: @VERSION@
+Requires: 
+Libs: -L${libdir} -lbliss @GMP@
+Libs.private: -lm
+Cflags: -I${includedir}
diff -Naur bliss-0.72-fedora/Makefile bliss-0.72/Makefile
--- bliss-0.72-fedora/Makefile	2013-04-28 14:40:10.543128514 -0600
+++ bliss-0.72/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -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
diff -Naur bliss-0.72-fedora/Makefile.am bliss-0.72/Makefile.am
--- bliss-0.72-fedora/Makefile.am	1969-12-31 17:00:00.000000000 -0700
+++ bliss-0.72/Makefile.am	2013-04-28 14:47:26.944698789 -0600
@@ -0,0 +1,30 @@
+ACLOCAL_AMFLAGS = -I config
+
+lib_LTLIBRARIES = libbliss.la
+
+libbliss_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+libbliss_la_SOURCES = \
+	defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc \
+	timer.cc utils.cc bliss_C.cc
+
+pkginclude_HEADERS = \
+	bignum.hh bliss_C.h defs.hh graph.hh heap.hh kqueue.hh kstack.hh \
+	orbit.hh partition.hh timer.hh uintseqhash.hh utils.hh
+
+bin_PROGRAMS = bliss
+bliss_SOURCES = bliss.cc
+bliss_LDADD = libbliss.la
+dist_man1_MANS = bliss.1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bliss.pc
+
+html-local: Doxyfile
+if HAVE_DOXYGEN
+	$(DOXYGEN) $(srcdir)/Doxyfile
+else
+	@echo "doxygen was not found, please re-run configure"
+endif
+
+clean-local:
+	-rm -rf html