Skip to content

Commit

Permalink
autotools based build
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Aug 4, 2015
1 parent 98136ae commit edf61ae
Show file tree
Hide file tree
Showing 10 changed files with 198 additions and 102 deletions.
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# created by autoscan

/autom4te.cache
/autoscan.log
/configure.scan

# created by autoreconf -fi (includes autoconf, automake, libtool)

Makefile.in
/aclocal.m4
/autom4te.cache
/compile
/config.guess
/config.h.in*
/config.sub
/configure
/depcomp
/install-sh
/ltmain.sh
/m4
/missing

# created by configure

Makefile
/config.h
/config.log
/config.status
/libtool
/stamp-h1
.deps

# created by make

*.la
*.lo
*.o
.libs
vcftools
*.tar.*
33 changes: 0 additions & 33 deletions Makefile

This file was deleted.

3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src
4 changes: 4 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

mkdir -p m4
autoreconf -fi
71 changes: 71 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([vcftools], [0.1.13], [https://github.com/vcftools/vcftools/issues])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_SRCDIR([src/cpp/vcftools.cpp])
AC_CONFIG_HEADERS([config.h])

# Automake invocation.
AM_INIT_AUTOMAKE([foreign])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP

# Checks for perl.
AC_PATH_PROGS([PERL], [perl] [perl5], [false])
if test "x$PERL" = xfalse ; then
AC_MSG_ERROR([Perl not found; check your \$PATH.])
fi

pmdir_relative_path=`\
$PERL -MConfig \
-wle '($_ = $Config{installsitelib})
=~ s!^\Q$Config{siteprefix}/!!; \
print'`

AC_ARG_WITH(
[pmdir],
AS_HELP_STRING(
[--with-pmdir=DIR],
[install Perl modules in DIR]),
[PMDIR=${withval}],
[PMDIR='${prefix}'/"$pmdir_relative_path"])

AC_SUBST([PMDIR])

# Checks for libraries.
PKG_CHECK_MODULES(ZLIB, zlib)

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h stdint.h stdlib.h string.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FSEEKO
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gethostbyaddr gethostbyname memset pow select socket sqrt strchr strdup strerror strstr strtol])

AC_CONFIG_FILES([Makefile
src/Makefile
src/cpp/Makefile
src/perl/Makefile])
AC_OUTPUT
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = cpp perl
56 changes: 0 additions & 56 deletions src/cpp/Makefile

This file was deleted.

47 changes: 47 additions & 0 deletions src/cpp/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
AM_CFLAGS = -D_FILE_OFFSET_BITS=64
AM_CXXFLAGS = -D_FILE_OFFSET_BITS=64

bin_PROGRAMS = vcftools

vcftools_CPPFLAGS = $(ZLIB_CPPFLAGS)
vcftools_LDADD = $(ZLIB_LIBS)

vcftools_SOURCES = \
bcf_entry.cpp \
bcf_entry.h \
bcf_entry_setters.cpp \
bcf_file.cpp \
bcf_file.h \
bgzf.c \
bgzf.h \
entry.cpp \
entry_filters.cpp \
entry_getters.cpp \
entry.h \
entry_setters.cpp \
gamma.cpp \
gamma.h \
header.cpp \
header.h \
khash.h \
knetfile.c \
knetfile.h \
output_log.cpp \
output_log.h \
parameters.cpp \
parameters.h \
variant_file.cpp \
variant_file_diff.cpp \
variant_file_filters.cpp \
variant_file_format_convert.cpp \
variant_file.h \
variant_file_output.cpp \
vcf_entry.cpp \
vcf_entry.h \
vcf_entry_setters.cpp \
vcf_file.cpp \
vcf_file.h \
vcftools.cpp \
vcftools.h

dist_man_MANS = vcftools.1
13 changes: 0 additions & 13 deletions src/perl/Makefile

This file was deleted.

32 changes: 32 additions & 0 deletions src/perl/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
dist_bin_SCRIPTS = \
fill-aa \
fill-an-ac \
fill-fs \
fill-ref-md5 \
vcf-annotate \
vcf-compare \
vcf-concat \
vcf-consensus \
vcf-contrast \
vcf-convert \
vcf-fix-newlines \
vcf-fix-ploidy \
vcf-indel-stats \
vcf-isec \
vcf-merge \
vcf-phased-join \
vcf-query \
vcf-shuffle-cols \
vcf-sort \
vcf-stats \
vcf-subset \
vcf-to-tab \
vcf-tstv \
vcf-validator

pmdir = $(PMDIR)

dist_pm_DATA = \
FaSlice.pm \
Vcf.pm \
VcfStats.pm

0 comments on commit edf61ae

Please sign in to comment.