-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
86 lines (75 loc) · 3.3 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
74
75
76
77
78
79
80
81
82
83
84
85
86
# Autoconf script for darwin.
#
# This is part of the darwin program.
#
# darwin. A simple genetic algorithm implementation with a adaptative
# strategy.
#
# Copyright (C) 2015 Marcos Diez García <marcos.diez.garcia@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###############################################################################
# AUTOCONF AND AUTOMAKE SETUP
###############################################################################
# Force autoconf to be, at least, this version number.
AC_PREREQ([2.68])
# Package info.
AC_INIT([darwin], [1.0.0], [marcos.diez.garcia@gmail.com],[darwin],
[https://github.com/marcosdg/darwin])
AC_COPYRIGHT([Copyright (C) 2015 Marcos Diez García])
copyright="Copyright (C) 2015 Marcos Diez García."
AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"],
[Short copyright string for this version of darwin])
AC_SUBST(copyright)
# Safety check: list a source file that would not be in other directories.
AC_CONFIG_SRCDIR([src/genome.h])
# Place configuration results here, so we can easily #include them.
AC_CONFIG_HEADERS([config.h])
# Place autotools auxiliary files in a subdir, not to clutter top dir.
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
# Enable 'automake' to simplify creating Makefiles. The 'subdir-objects'
# options allows us to organize source files in subdirectories.
AM_INIT_AUTOMAKE([1.11 subdir-objects -Wall -Werror])
# Darwin configuration features:
# 1. Debugging mode
AC_ARG_ENABLE([darwin-debug-mode],
[AS_HELP_STRING([--enable-darwin-debug-mode],
[Enable darwin debug mode. Disabled by default.])],
[AC_DEFINE([DARWIN_DEBUG_MODE], [1], [Enabled is 1. Disabled is 0.])],
[AC_DEFINE([DARWIN_DEBUG_MODE], [0], [Enabled is 1. Disabled is 0.])])
###############################################################################
# PERL
###############################################################################
AC_CHECK_PROG(PERL, perl, perl, no)
if test "$PERL" = no; then
AC_MSG_ERROR(Could not find Perl. Perl is required by darwin to generate
certain data files. Please make sure is installed in your system)
fi
###############################################################################
# C
###############################################################################
# Compiler.
AC_PROG_CC
AM_PROG_CC_C_O
# Libraries.
AC_CHECK_LIB([m], [exp])
AC_CHECK_LIB([rt], [clock_gettime])
# Header files.
AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
# Typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
# Library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([clock_gettime memset strdup strstr])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT