forked from apache/singa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
119 lines (109 loc) · 3.53 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
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
#/**
# * Copyright 2015 The Apache Software Foundation
# *
# * Licensed to the Apache Software Foundation (ASF) under one
# * or more contributor license agreements. See the NOTICE file
# * distributed with this work for additional information
# * regarding copyright ownership. The ASF licenses this file
# * to you under the Apache License, Version 2.0 (the
# * "License"); you may not use this file except in compliance
# * with the License. You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(singa, 0.1, dev@singa.incubator.apache.org)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_CONFIG_SRCDIR([src/utils/common.cc])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
ACLOCAL_AMFLAGS = -I m4 --install
# Checks for programs.
AC_PROG_CXX([g++])
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
AC_SEARCH_LIBS([cblas_sgemm], [openblas], [], [
AC_MSG_ERROR([unable to find cblas_sgemm() function])
])
AC_SEARCH_LIBS([zmq_ctx_new], [zmq], [], [
AC_MSG_ERROR([unable to find zmq_ctx_new() function])
])
AC_SEARCH_LIBS([zmsg_new], [czmq], [], [
AC_MSG_ERROR([unable to find zmsg_new() function])
])
AC_CHECK_LIB([glog], [main], [], [
AC_MSG_ERROR([unable to find glog library])
])
AC_CHECK_LIB([protobuf], [main], [], [
AC_MSG_ERROR([unable to find protobuf library])
])
AC_ARG_ENABLE(lmdb,
AS_HELP_STRING([--enable-lmdb],[enable debug option]),
[enable_lmdb=yes],[enable_lmdb=no])
AM_CONDITIONAL(LMDB, test "$enable_lmdb" = yes)
if test x"$enable_lmdb" = x"yes"; then
AC_SEARCH_LIBS([mdb_env_create], [lmdb], [], [
AC_MSG_ERROR([unable to find mdb_env_create() function])
])
AC_DEFINE(LMDB, 1, [Enable Option layer])
fi
AC_ARG_ENABLE(test,
AS_HELP_STRING([--enable-test],[enable singa test]),
[enable_test=yes],[enable_test=no])
AM_CONDITIONAL(SINGATEST, test "$enable_test" = yes)
if test x"$enable_test" != x"no"; then
PROGS='singatest'
LTLIBS='libgtest.la'
else
PROGS=''
LTLIBS=''
fi
AC_SUBST([PROGS])
AC_SUBST([LTLIBS])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[enable debug mode]),
[enable_debug=yes],[enable_debug=no])
AM_CONDITIONAL(DEBUG, test "$enable_debug" = yes)
if test x"$enable_debug" != x"no"; then
DEBUG='-g'
else
DEBUG=''
fi
AC_SUBST([DEBUG])
#AC_CHECK_LIB([opencv_imgproc], [main], [], [
# AC_MSG_ERROR([unable to find opencv_imgproc lib])
# ])
#AC_CHECK_LIB([opencv_highgui], [main], [], [
# AC_MSG_ERROR([unable to find opencv_highgui lib])
# ])
#AC_CHECK_LIB([opencv_core], [main], [], [
# AC_MSG_ERROR([unable to find opencv_core lib])
# ])
AC_CHECK_LIB([zookeeper_mt], [main], [], [
AC_MSG_ERROR([unable to find zookeeper])
])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h malloc.h stdlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([gethostname memset mkdir pow sqrt])
AC_OUTPUT(Makefile)