forked from liudf0716/apfree-wifidog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
120 lines (100 loc) · 3.24 KB
/
configure.in
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
## -*-m4-*-
# $Id: configure.in 1346M 2009-09-25 14:51:29Z (local) $
dnl Process this file with autoconf to produce a configure script.
# FILE:
# configure.in
#
# FUNCTION:
# implements checks for a variety of system-specific functions
AC_INIT(src/common.h)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(config)
AC_PROG_CC
AC_PROG_CXX
#AC_PROG_RANLIB
AC_SUBST(BUILDROOT)
WIFIDOG_MAJOR_VERSION=2
WIFIDOG_MINOR_VERSION=1
WIFIDOG_MICRO_VERSION=1
WIFIDOG_VERSION=`date "+%Y%m%d"`
AC_SUBST(WIFIDOG_MAJOR_VERSION)
AC_SUBST(WIFIDOG_MINOR_VERSION)
AC_SUBST(WIFIDOG_MICRO_VERSION)
AC_SUBST(WIFIDOG_VERSION)
AM_INIT_AUTOMAKE(wifidog,$WIFIDOG_VERSION)
#liudf added 20140822
OBJECT=`git branch|grep '*'|cut -d' ' -f 2`
AM_CONDITIONAL(LOCAL_AUTH, test x$OBJECT = xweixin)
AM_CONDITIONAL(LOCAL_AUTH_CHEAP, test x$OBJECT = xweixin_cheap)
AM_CONDITIONAL(LOCAL_AUTH_FREE, test x$OBJECT = xweixin_dev)
#txn added 20150309
AM_CONDITIONAL(TARGET_X86, test x$OBJECT = xyun_x86)
AM_MAINTAINER_MODE
AC_PROG_INSTALL
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_ISC_POSIX
AC_C_BIGENDIAN
AC_PROG_MAKE_SET
AC_HEADER_STDC
# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
# ----------------------------------------------------------------------------
AC_DEFUN([BB_ENABLE_DOXYGEN],
[
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
if test "x$enable_doxygen" = xno; then
enable_doc=no
else
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
if test x$DOXYGEN = x; then
if test "x$enable_doxygen" = xyes; then
AC_MSG_ERROR([could not find doxygen])
fi
enable_doc=no
else
enable_doc=yes
AC_PATH_PROG(DOT, dot, , $PATH)
fi
fi
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
if test x$DOT = x; then
if test "x$enable_dot" = xyes; then
AC_MSG_ERROR([could not find dot])
fi
enable_dot=no
else
enable_dot=yes
fi
AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
AC_SUBST(enable_dot)
AC_SUBST(enable_html_docs)
AC_SUBST(enable_latex_docs)
])
# Acutally perform the doxygen check
BB_ENABLE_DOXYGEN
# check for pthread
AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR(You need the pthread headers) )
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(You need the pthread library) )
# libhttpd dependencies
echo "Begining libhttpd dependencies check"
AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h)
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(nsl)
AC_HAVE_LIBRARY(crypto)
AC_HAVE_LIBRARY(m)
AC_HAVE_LIBRARY(json-c)
AC_HAVE_LIBRARY(ip4tc)
AC_HAVE_LIBRARY(ssl)
AC_HAVE_LIBRARY(event2)
echo "libhttpd dependencies check complete"
AC_OUTPUT( Makefile
wifidog.spec
wifidog-msg.html
wifidog-redir.html
src/Makefile
libhttpd/Makefile
doc/Makefile
)