annotate ezBAMQC/src/htslib/configure.ac @ 1:b4ff32b63fcd

Uploaded
author cshl-bsr
date Tue, 29 Mar 2016 15:25:51 -0400
parents dfa3745e5fd8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
1 # Configure script for htslib, a C library for high-throughput sequencing data.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
2 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
3 # Copyright (C) 2015 Genome Research Ltd.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
4 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
5 # Author: John Marshall <jm18@sanger.ac.uk>
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
6 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
7 # Permission is hereby granted, free of charge, to any person obtaining a copy
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
8 # of this software and associated documentation files (the "Software"), to deal
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
9 # in the Software without restriction, including without limitation the rights
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
10 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
11 # copies of the Software, and to permit persons to whom the Software is
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
12 # furnished to do so, subject to the following conditions:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
13 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
14 # The above copyright notice and this permission notice shall be included in
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
15 # all copies or substantial portions of the Software.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
16 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
20 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
22 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
23 # DEALINGS IN THE SOFTWARE.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
24
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
25 dnl Process this file with autoconf to produce a configure script
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
26 AC_INIT([HTSlib], m4_esyscmd_s([make print-version]),
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
27 [samtools-help@lists.sourceforge.net], [], [http://www.htslib.org/])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
28 AC_PREREQ(2.63) dnl This version introduced 4-argument AC_CHECK_HEADER
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
29 AC_CONFIG_SRCDIR(hts.c)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
30
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
31 dnl Copyright notice to be copied into the generated configure script
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
32 AC_COPYRIGHT([Portions copyright (C) 2015 Genome Research Ltd.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
33
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
34 This configure script is free software: you are free to change and
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
35 redistribute it. There is NO WARRANTY, to the extent permitted by law.])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
36
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
37 AC_PROG_CC
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
38 AC_PROG_RANLIB
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
39
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
40 AC_ARG_WITH([irods],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
41 [AS_HELP_STRING([[--with-irods[=DIR]]],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
42 [use RodsAPIs library (in DIR) to support iRODS URLs])],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
43 [case $withval in
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
44 no) irods=disabled ;;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
45 yes) irods=enabled ;;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
46 *) irods=enabled; IRODS_HOME=$withval ;;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
47 esac],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
48 [irods=disabled])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
49
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
50 save_LIBS=$LIBS
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
51 zlib_devel=ok
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
52 dnl Set a trivial non-empty INCLUDES to avoid excess default includes tests
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
53 AC_CHECK_HEADER([zlib.h], [], [zlib_devel=missing], [;])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
54 AC_CHECK_LIB(z, inflate, [], [zlib_devel=missing])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
55 LIBS=$save_LIBS
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
56
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
57 if test $zlib_devel != ok; then
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
58 AC_MSG_ERROR([zlib development files not found
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
59
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
60 HTSlib uses compression routines from the zlib library <http://zlib.net>.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
61 Building HTSlib requires zlib development files to be installed on the build
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
62 machine; you may need to ensure a package such as zlib1g-dev (on Debian or
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
63 Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions) is installed.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
64
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
65 FAILED. This error must be resolved in order to build HTSlib successfully.])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
66 fi
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
67
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
68 if test $irods = enabled; then
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
69 # TODO Also test whether we require libgssapi_krb5 and AC_CHECK_LIB it
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
70 save_LDFLAGS=$LDFLAGS
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
71 LDFLAGS="$LDFLAGS -L$IRODS_HOME/lib/core/obj"
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
72 AC_CHECK_LIB([RodsAPIs], [getRodsEnvFileName],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
73 [case $with_irods in
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
74 yes) define_IRODS_HOME='# Uses $(IRODS_HOME) from the environment' ;;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
75 *) define_IRODS_HOME="IRODS_HOME = $with_irods" ;;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
76 esac],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
77 [AC_MSG_ERROR([iRODS development files not found
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
78
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
79 Support for iRODS URLs requires the libRodsAPI client library and headers.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
80 Configure with --with-irods=DIR (or just --with-irods if \$IRODS_HOME has
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
81 been exported with a suitable value), where DIR is the base of an iRODS tree
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
82 such that the library is present as DIR/lib/core/obj/libRodsAPI.* and headers
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
83 are present under DIR/lib/api/include and so on.])],
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
84 [-lgssapi_krb5 -lpthread])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
85 LDFLAGS=$save_LDFLAGS
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
86 else
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
87 define_IRODS_HOME='IRODS_HOME ?= /disabled'
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
88 fi
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
89 AC_SUBST([irods])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
90 AC_SUBST([define_IRODS_HOME])
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
91
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
92 AC_CONFIG_FILES(config.mk)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
93 AC_OUTPUT