-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
49 lines (39 loc) · 1.21 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([admirable], [0.001], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([src/ranker-learn.cc])
AM_INIT_AUTOMAKE #([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
AC_MSG_CHECKING(whether to enable debugging)
debug_default="yes"
AC_ARG_ENABLE(debug, [--enable-debug=[no/yes] turn on debugging
[default=$debug_default]],, enable_debug=$debug_default)
if test "x$enable_debug" = "xyes"; then
CXXFLAGS="$CXXFLAGS -g -DDEBUG -Wall -Wextra -pedantic -std=c++0x"
AC_MSG_RESULT(yes)
else
CXXFLAGS="$CXXFLAGS -O6 -DNDEBUG -Wall -Wextra -pedantic -std=c++0x"
AC_MSG_RESULT(no)
fi
# libtool
#AC_PROG_LIBTOOL
#AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([dup2 strchr strdup strrchr strstr strtol])
AC_OUTPUT(Makefile src/Makefile)