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