Package: libfastahack / 1.0.0+dfsg-7

autoconf.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
Author: Andreas Tille <tille@debian.org>,
        Adrian Bunk <bunk@debian.org>
Last-Update: Sat, 18 Aug 2018 02:26:01 +0300
Description: Add autoconf stuff to enable simple library creation

--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,16 @@
+lib_LTLIBRARIES  = libfastahack.la
+
+libfastahackdir=$(includedir)/fastahack
+libfastahack_HEADERS=Fasta.h LargeFileSupport.h Region.h split.h
+libfastahack_la_SOURCES = Fasta.cpp split.cpp
+libfastahack_la_LDFLAGS = -version-info @LIB_VERSION@
+
+libfastahack_la_CPPFLAGS = $(INCLUDES)
+
+bin_PROGRAMS = fastahack
+fastahack_SOURCES = FastaHack.cpp
+LDADD = libfastahack.la -ldisorder
+
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA = libfastahack.pc
+
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,61 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT(fastahack, 0.0, erik.garrison@bc.edu)
+AC_CONFIG_HEADERS([config.h])
+
+AC_PREREQ(2.57)
+
+#	Directory that contains install-sh and other auxiliary files
+AC_CONFIG_AUX_DIR([config])
+
+################################################################################
+#	According to (http://www.mail-archive.com/autoconf@gnu.org/msg14232.html)
+#		this macro should be after AC_INIT but before AM_INIT_AUTOMAKE
+################################################################################
+AC_CONFIG_MACRO_DIR(config)
+
+AM_INIT_AUTOMAKE([1.6 foreign dist-zip tar-ustar filename-length-max=299])
+
+LIB_VERSION=0:0
+
+AC_SUBST([VERSION])
+AC_SUBST([LIB_VERSION])
+
+AC_SUBST([VERSION])
+
+# Checks for programs.
+AC_PROG_LN_S
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+################################################################################
+# calling AC_PROG_CXX resets CXXFLAGS, we use our own flags set in the
+#	the AX_CXXFLAGS macro below.
+# So we cache the argument to configure
+#	here in ARG_CXX_FLAGS (so that our macro does not override them)
+################################################################################
+ARG_CXX_FLAGS="$CXXFLAGS"
+AC_PROG_CXX
+
+#Ranlib handled by check for libtool
+CXXFLAGS="$ARG_CXX_FLAGS"
+AX_CXXFLAGS
+
+AC_SUBST(CXXFLAGS)
+
+CPPFLAGS="-I\$(top_srcdir) $CPPFLAGS"
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stdlib.h])
+
+AC_PROG_MAKE_SET
+
+AC_CONFIG_FILES([
+	Makefile
+	libfastahack.pc
+	])
+AC_OUTPUT
+
--- /dev/null
+++ b/libfastahack.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/fastahack
+
+
+Name: libfastahack
+Version: @VERSION@
+Description: utilities for indexing and sequence extraction from FASTA files
+Libs: -L${libdir} -lfastahack
+Cflags: -I${includedir}
--- a/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-
-# Use ?= to allow overriding from the env or command-line
-CXX ?=		g++
-CXXFLAGS ?=	-O3
-PREFIX ?=	./stage
-STRIP_CMD ?=	strip
-INSTALL ?=	install -c
-MKDIR ?=	mkdir -p
-
-# Required flags that we shouldn't override
-CXXFLAGS +=	-D_FILE_OFFSET_BITS=64
-
-OBJS =	Fasta.o FastaHack.o split.o disorder.o
-
-all:	fastahack
-
-fastahack: $(OBJS)
-	$(CXX) $(CXXFLAGS) $(OBJS) -o fastahack
-
-FastaHack.o: Fasta.h FastaHack.cpp
-	$(CXX) $(CXXFLAGS) -c FastaHack.cpp
-
-Fasta.o: Fasta.h Fasta.cpp
-	$(CXX) $(CXXFLAGS) -c Fasta.cpp
-
-split.o: split.h split.cpp
-	$(CXX) $(CXXFLAGS) -c split.cpp
-
-disorder.o: disorder.c disorder.h
-	$(CXX) $(CXXFLAGS) -c disorder.c
-
-install: fastahack
-	$(MKDIR) $(DESTDIR)$(PREFIX)/bin
-	$(INSTALL) fastahack $(DESTDIR)$(PREFIX)/bin
-
-install-strip: install
-	$(STRIP_CMD) $(DESTDIR)$(PREFIX)/bin/fastahack
-
-clean:
-	rm -rf fastahack *.o stage
-
-.PHONY: clean