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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT(ProbABEL, 0.4.3, genabel-devel@r-forge.wu-wien.ac.at)
AM_INIT_AUTOMAKE([silent-rules subdir-objects])
AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([src/data.h])
AC_CONFIG_HEADERS([src/config.h])
# Add the --disable-maintainer-mode option used by e.g. Debian and
# Gentoo to disable rebuilding the autotools-generated files after
# e.g. a patch has been applied to them. The default is 'disabled', we
# change it here to keep the old behaviour by default.
AM_MAINTAINER_MODE([enable])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
if test -z "$CXXFLAGS"; then
# User did not set CXXFLAGS, so we can put in our own defaults
CXXFLAGS="-g -O2"
fi
if test -z "$CPPFLAGS"; then
# User did not set CPPFLAGS, so we can put in our own defaults
CPPFLAGS="-Wall"
fi
# If CXXFLAGS/CPPFLAGS are already set AC_PROG_CXX will not overwrite them
# with its own defaults
AC_PROG_CXX
#Tell compiler to build not R version of filevector
CXXFLAGS+=" -D_NOT_R_FILEVECTOR"
# Since most of our code is in C++, set that language as the default
# for the subsequent checks
AC_LANG_PUSH([C++])
# Checks for libraries.
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([float.h inttypes.h libintl.h limits.h stddef.h \
stdint.h stdlib.h string.h sys/param.h \
wchar.h wctype.h])
# See if we want use of the Eigen library enabled (yes by default) and if so,
# whether we can find the library files.
AC_ARG_WITH([eigen],
AS_HELP_STRING([--with-eigen], [Use the Eigen template library for fast \
linear algebra (Eigen can be downloaded \
from eigen.tuxfamily.org); this is enabled \
by default]
)
)
if test "x$with_eigen" != "xno"; then
AC_MSG_NOTICE([building using the Eigen headers enabled])
AC_ARG_WITH([eigen-include-path],
[AS_HELP_STRING([--with-eigen-include-path],
[location of the Eigen headers, defaults to /usr/include/eigen3])],
[CXXFLAGS+=" -I${withval}"
CPPFLAGS+=" -I${withval}"],
[CXXFLAGS+=' -I/usr/include/eigen3'
CPPFLAGS+=' -I/usr/include/eigen3'])
# Check for the EIGEN header files
AC_CHECK_HEADERS([Eigen/Dense Eigen/LU])
if test x$ac_cv_header_Eigen_Dense = xno; then
AC_MSG_ERROR([Could not find the Eigen header files. Did you specify \
--with-eigen-include-path correctly? Or use --without-eigen \
to disable use of fast linear algebra.])
fi
else
AC_MSG_NOTICE([not using Eigen for linear algebra])
fi
AM_CONDITIONAL([WITH_EIGEN], test "x$with_eigen" != "xno")
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
# Disabled the next line to make cross compiling for Windows work.
#AC_FUNC_MALLOC
AC_CHECK_FUNCS([pow putenv sqrt strdup strncasecmp floor])
# Check if we can use large (>2GB) files on 32 bit platforms
AC_SYS_LARGEFILE
if test $ac_cv_sys_file_offset_bits != 'no'; then
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
fi
AC_FUNC_FSEEKO
# Check for presence of sed. Needed to replace path to /etc in probabel.pl
AC_PROG_SED
# Check for the presence of awk. Needed in the test suite
AC_PROG_AWK
# Check for presence of pdfLaTeX
AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex)
if test -z "$PDFLATEX"; then
AC_MSG_WARN([Unable to create PDF version of the user manual])
fi
AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX")
# Check for presence of R
AC_CHECK_PROG(R, R, R)
if test -z "$R"; then
AC_MSG_NOTICE([Unable to do tests comparing ProbABEL output against R output])
fi
AM_CONDITIONAL([HAVE_R], test -n "$R")
# Building of each of the three modules can be disabled on request
AC_ARG_ENABLE([palinear],
[AS_HELP_STRING([--disable-palinear], [disable building the palinear program])],
[palinear=no],
[palinear=yes])
if test "x$palinear" = "xyes"; then
AC_MSG_NOTICE([building of palinear is enabled])
fi
AM_CONDITIONAL([BUILD_palinear], test "x$palinear" = "xyes")
AC_ARG_ENABLE([palogist],
[AS_HELP_STRING([--disable-palogist], [disable building the palogist program])],
[palogist=no],
[palogist=yes])
if test "x$palogist" = "xyes"; then
AC_MSG_NOTICE([building of palogist is enabled])
fi
AM_CONDITIONAL([BUILD_palogist], test "x$palogist" = "xyes")
AC_ARG_ENABLE([pacoxph],
[AS_HELP_STRING([--disable-pacoxph], [disable building the pacoxph program])],
[pacoxph=no],
[pacoxph=yes])
if test "x$pacoxph" = "xyes"; then
AC_MSG_NOTICE([building of pacoxph is enabled])
fi
AM_CONDITIONAL([BUILD_pacoxph], test "x$pacoxph" = "xyes")
AC_ARG_ENABLE([extract-snp],
[AS_HELP_STRING([--enable-extract-snp], [enable building the
extract-snp program. NOTE: this program is not finished yet!])],
[extractsnp=yes],
[extractsnp=no])
if test "x$extractsnp" = "xyes"; then
AC_MSG_NOTICE([building of extract-snp is enabled])
fi
AM_CONDITIONAL([BUILD_extractsnp], test "x$extractsnp" = "xyes")
# Files to be generated by autotools
AC_CONFIG_FILES([
Makefile
src/Makefile
doc/Makefile
examples/Makefile
checks/Makefile
checks/R-tests/Makefile
])
# Create output files
AC_OUTPUT
|