-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfigure.in
More file actions
169 lines (138 loc) · 4.96 KB
/
configure.in
File metadata and controls
169 lines (138 loc) · 4.96 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT(krake, 0.2.1, paulyang.inf@gmail.com, krake, http://sourceforge.net/projects/krake)
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(krake, 0.2.1)
# Checks for programs.
AC_PROG_CC
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging options],
[ if test -n "$GCC"; then
CFLAGS="-g -O0 -Wall"
fi
CPPFLAGS="${CPPFLAGS} -DKRK_DEBUG" ],)
# for libevent
AC_ARG_WITH(libevent_includes,
[ --with-libevent-includes=DIR libevent include directory],
[with_libevent_includes="$withval"],
[with_libevent_includes=no])
AC_ARG_WITH(libevent_libraries,
[ --with-libevent-libraries=DIR libevent library directory],
[with_libevent_libraries="$withval"],
[with_libevent_libraries=no])
# for openssl lib
AC_ARG_WITH(libssl_includes,
[ --with-libssl-includes=DIR openssl include directory],
[with_libssl_includes="$withval"],
[with_libssl_includes=no])
AC_ARG_WITH(libssl_libraries,
[ --with-libssl-libraries=DIR openssl library directory],
[with_libssl_libraries="$withval"],
[with_libssl_libraries=no])
# for xml2 lib
AC_ARG_WITH(libxml2_includes,
[ --with-libxml2-includes=DIR libxml2 include directory],
[with_libxml2_includes="$withval"],
[with_libxml2_includes=no])
AC_ARG_WITH(libxml2_libraries,
[ --with-libxml2-libraries=DIR libxml2 library directory],
[with_libxml2_libraries="$withval"],
[with_libxml2_libraries=no])
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include/libxml2"
if test "$with_libevent_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_libevent_includes}"
fi
if test "$with_libssl_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_libssl_includes}"
fi
if test "$with_libxml2_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_libxml2_includes}"
fi
LIBS="${LIBS} -L/usr/local/lib -L/usr/local/lib/event2"
if test "$with_libevent_libraries" != "no"; then
LIBS="${LIBS} -L${with_libevent_libraries}"
fi
if test "$with_libssl_libraries" != "no"; then
LIBS="${LIBS} -L${with_libssl_libraries}"
fi
if test "$with_libxml2_libraries" != "no"; then
LIBS="${LIBS} -L${with_libxml2_libraries}"
fi
# Checks for libraries.
LEVENT=""
AC_CHECK_LIB([event], [event_base_dispatch], , LEVENT="no")
if test "$LEVENT" = "no"; then
echo
echo " ERROR! libevent2 library not found, go get it from"
echo " http://monkey.org/~provos/libevent/"
echo " or use the --with-libevent-* options, if you have it installed"
echo " in unusual place"
exit
fi
LSSL=""
AC_CHECK_LIB([crypto], [OPENSSL_config], , LSSL="no")
AC_CHECK_LIB([ssl], [SSL_library_init], , LSSL="no")
#AC_CHECK_LIB([ssl], [SSL_load_error_strings], , LSSL="no")
#AC_CHECK_LIB([crypto], [EVP_cleanup], , LSSL="no")
if test "$LSSL" = "no"; then
echo
echo " ERROR! openssl library not found, go get it from"
echo " http://www.openssl.org/source/"
echo " or use the --with-libssl-* options, if you have it installed"
echo " in unusual place"
exit
fi
LXML2=""
AC_CHECK_LIB([xml2], [xmlDocGetRootElement], , LXML2="no")
if test "$LXML2" = "no"; then
echo
echo " ERROR! libxml2 library not found, go get it from"
echo " http://www.xmlsoft.org/downloads.html"
echo " or use the --with-libxml2-* options, if you have it installed"
echo " in unusual place"
exit
fi
# Checks for header files.
LEVENT=""
AC_CHECK_HEADERS([event2/event.h], , LEVENT="no")
if test "$LEVENT" = "no"; then
echo
echo " ERROR! libevent2 headers not found, go get it from"
echo " http://monkey.org/~provos/libevent/"
echo " or use the --with-libevent-* options, if you have it installed"
echo " in unusual place"
exit
fi
LSSL=""
AC_CHECK_HEADERS([openssl/ssl.h], , LSSL="no")
AC_CHECK_HEADERS([openssl/evp.h], , LSSL="no")
AC_CHECK_HEADERS([openssl/conf.h], , LSSL="no")
AC_CHECK_HEADERS([openssl/err.h], , LSSL="no")
AC_CHECK_HEADERS([openssl/engine.h], , LSSL="no")
if test "$LSSL" = "no"; then
echo
echo " ERROR! openssl headers not found, go get it from"
echo " http://www.openssl.org/source/"
echo " or use the --with-libssl-* options, if you have it installed"
echo " in unusual place"
exit
fi
LXML2=""
AC_CHECK_HEADERS([libxml/xmlmemory.h], , LXML2="no")
AC_CHECK_HEADERS([libxml/parser.h], , LXML2="no")
if test "$LXML2" = "no"; then
echo
echo " ERROR! libxml2 headers not found, go get it from"
echo " http://www.xmlsoft.org/downloads.html"
echo " or use the --with-libxml2-* options, if you have it installed"
echo " in unusual place"
exit
fi
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile
config/Makefile
src/Makefile
src/daemon/Makefile])
AC_OUTPUT(config_layout.h)