-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
73 lines (64 loc) · 2.59 KB
/
configure.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([fcgene], [1.0.7],[roshyra@yahoo.com])
AC_CONFIG_SRCDIR([src/fcgene.cpp])
AC_CONFIG_HEADER([src/config.h])
AC_INIT_AUTOMAKE
AC_PROG_INSTALL
##########################################################################
# use the C++ compiler for the following checks
AC_LANG([C++])
##########################################################################
AM_INIT_AUTOMAKE
##########################################################################
# Checks for programs.
AC_SUBST([AC_LDFLAGS])
##########################################################################
# check for XXX headers
##########################################################################
# store current CFLAGS and merge with AC_CXXFLAGS for compilation check
AC_CHECK_HEADERS([stdlib.h sys/timeb.h zlib.h])
# check for XXX library headers
AC_MSG_CHECKING([for the MATH library headers])
# try to compile a file that includes a header of the library XXX
AC_COMPILE_IFELSE([[#include <math.h>]],
[AC_MSG_RESULT([MATH Library was found])
HAVE_MATH_H=1; AC_LDFLAGS="-lm";],
[AC_MSG_RESULT([MATH LIBRARY NOT FOUND not found])
HAVE_MATH_H=0;])
###
AC_MSG_CHECKING([for the ZLIB library headers])
AC_COMPILE_IFELSE([[#include "zlib.h"]],
[AC_MSG_RESULT([ZLIB Library was found ])
HAVE_ZLIB_H=1; AC_LDFLAGS="$AC_LDFLAGS -lz";],
[AC_MSG_RESULT([ZLLIB was not found])
HAVE_ZLIB_H=0;])
# handle results
if test $HAVE_ZLIB_H != 1; then
echo "------------------------------------------------------------------------"
AC_MSG_NOTICE([The ZLIB library was not found.
That means fcGENE won't be able to read gzipped files.
If you want to read gezipped files, please first install zlib library
and then start ./configure again.!])
echo "------------------------------------------------------------------------"
else
echo "------------------------------------------------------------------------"
AC_MSG_NOTICE([ fcGENE can read and write gezipped files ending with *.gz.])
echo "------------------------------------------------------------------------"
fi
##########################################################################
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_HEADER_MAJOR
AC_FUNC_MALLOC
AC_CHECK_FUNCS([floor pow])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT