-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.mac.ac
58 lines (46 loc) · 2.33 KB
/
configure.mac.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT(rnabridge-align, 1.0.1, [email protected])
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([src/main.cc])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
# Check environmental variables
#AS_IF([test "s$HTSLIB" = "s"],[AC_MSG_ERROR([*** Please set environment variable HTSLIB ***])])
#AS_IF([test "s$CLP_HOME" = "s"],[AC_MSG_ERROR([*** Please set environment variable CLP_HOME ***])])
#AS_IF([test "s$BOOST_HOME" = "s"],[AC_MSG_ERROR([*** Please set environment variable BOOST_HOME ***])])
# Check home directories for external libraries
AC_ARG_WITH(boost, AS_HELP_STRING([--with-boost], [home directory for boost]), BOOST_HOME=$withval, BOOST_HOME=)
AC_ARG_WITH(htslib, AS_HELP_STRING([--with-htslib], [home directory for htslib]), HTSLIB_HOME=$withval, HTSLIB_HOME=)
AC_ARG_WITH(zlib, AS_HELP_STRING([--with-zlib], [home directory for zlib]), ZLIB_HOME=$withval, ZLIB_HOME=)
# Assign CXXFLAGS
AS_IF([test "x$BOOST_HOME" != "x"], [AC_SUBST([CXXFLAGS], ["-I$BOOST_HOME $CXXFLAGS"])], [])
AS_IF([test "x$HTSLIB_HOME" != "x"], [AC_SUBST([CXXFLAGS], ["-I$HTSLIB_HOME/include $CXXFLAGS"])], [])
# Check whether static is enabled
AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static], [enable static linking])])
# If statis is enabled, directly assign .a files to LIBS
AS_IF([test "x$enable_static" = "xyes"], [AC_SUBST([LIBS], ["-lz $LIBS"])])
AS_IF([test "x$enable_static" = "xyes"], AS_IF([test "x$HTSLIB_HOME" != "x"], [AC_SUBST([LIBS], ["$HTSLIB_HOME/lib/libhts.a $LIBS"])]))
# If static is NOT enabled, assign LDFLAGS and LIBS
AS_IF([test "x$enable_static" != "xyes"], AS_IF([test "x$HTSLIB_HOME" != "x"], [AC_SUBST([LDFLAGS], ["-L$HTSLIB_HOME/lib $LDFLAGS"])]))
AS_IF([test "x$enable_static" != "xyes"], AC_CHECK_LIB([hts], [hts_open], [], [AC_MSG_ERROR([could not find htslib])]))
# Checks for header files.
AC_CHECK_HEADERS([stdint.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT32_T
# Checks for library functions.
AC_CONFIG_FILES([Makefile
lib/Makefile
lib/util/Makefile
lib/gtf/Makefile
lib/graph/Makefile
src/Makefile])
AC_OUTPUT