Skip to content

Commit d62351a

Browse files
committed
Merge pull request #37 from andrewjpage/master
Reduce times input file is opened
2 parents c4bf70d + 8f954a8 commit d62351a

File tree

14 files changed

+165
-531
lines changed

14 files changed

+165
-531
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.3
1+
2.1.0

configure.ac

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
AC_INIT([snp-sites], [1])
2-
AM_INIT_AUTOMAKE([foreign])
2+
AM_INIT_AUTOMAKE([foreign subdir-objects])
33
AC_CONFIG_SRCDIR([configure.ac])
44
AC_CONFIG_HEADERS([config.h])
55
AC_CONFIG_MACRO_DIR([m4])
66

7+
AC_CANONICAL_HOST
8+
9+
case $host_os in
10+
*linux*)
11+
HOST_OS=linux
12+
;;
13+
*) ;;
14+
esac
15+
16+
AM_CONDITIONAL([HOST_LINUX],[test x$HOST_OS = xlinux])
17+
18+
AC_CHECK_HEADERS([zlib.h math.h])
19+
720
AC_PROG_LIBTOOL
821
AC_PROG_CC
922
AC_PROG_CXX
1023

1124
AC_CONFIG_FILES([Makefile src/Makefile])
1225
AC_OUTPUT
13-
14-
AC_CHECK_HEADERS([zlib.h math.h])

src/Makefile.am

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# ship these headers in the "make dist" target
2-
3-
#This is how the header files were originaly being installed.
4-
#dist_data_DATA = alignment-file.h vcf.h phylib-of-snp-sites.h snp-sites.h fasta-of-snp-sites.h parse-phylip.h string-cat.h kseq.h
5-
6-
#The problem with the above is that the header files end up in /usr/share, which is far from ideal.
7-
#They should all be installed to /usr/include/snp-sites/.
8-
#Having spoken to John Marshall, this is how it should be done
91
snpsitesincludedir=$(includedir)/snp-sites
10-
snpsitesinclude_HEADERS=alignment-file.h vcf.h phylib-of-snp-sites.h snp-sites.h fasta-of-snp-sites.h parse-phylip.h string-cat.h kseq.h
11-
2+
snpsitesinclude_HEADERS=alignment-file.h vcf.h phylib-of-snp-sites.h snp-sites.h fasta-of-snp-sites.h kseq.h
123

13-
# snp_sites is our top level progra
144
bin_PROGRAMS = snp-sites
155
snp_sites_SOURCES = main.c
16-
snp_sites_LDADD=-lm libsnp-sites.la -lz -lpthread -lrt
6+
7+
8+
snp_sites_LDADD =-lm libsnp-sites.la -lz -lpthread
9+
if HOST_LINUX
10+
snp_sites_LDADD += -lrt
11+
endif
1712

1813
# libsnp_sites.so is our library
1914
lib_LTLIBRARIES = libsnp-sites.la
20-
libsnp_sites_la_SOURCES = alignment-file.c vcf.c phylib-of-snp-sites.c snp-sites.c fasta-of-snp-sites.c parse-phylip.c string-cat.c
15+
libsnp_sites_la_SOURCES = alignment-file.c vcf.c phylib-of-snp-sites.c snp-sites.c fasta-of-snp-sites.c
2116
libsnp_sites_la_LDFLAGS= -version-info 1:0
2217

2318
# "make check" target
@@ -29,4 +24,8 @@ run_all_tests_SOURCES = \
2924
../tests/helper-methods.c \
3025
../tests/run-all-tests.c
3126
run_all_tests_CFLAGS = -I../tests
32-
run_all_tests_LDADD = -lm -lcheck -lsubunit libsnp-sites.la -lz -lpthread -lrt
27+
28+
run_all_tests_LDADD = -lm -lcheck libsnp-sites.la -lz -lpthread
29+
if HOST_LINUX
30+
run_all_tests_LDADD += -lrt
31+
endif

0 commit comments

Comments
 (0)