Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 278 lines (245 sloc) 9.049 kb
7183c5b from CVS
graziano obertelli authored
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 #
4
5 # Usage:
6 # configure [--with-axis2c=<dir>]
7 # [--with-axis2=<dir>]
8 # [--with-libvirt=<dir>]
9b1361c Added themability at compile time.
graziano authored
9 # [--with-interface-theme=<name>]
10 # [--enable-appliance-store]
7183c5b from CVS
graziano obertelli authored
11 # [--enable-debug]
12
13 AC_PREREQ(2.61)
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
14 AC_INIT(Eucalyptus,
15 m4_esyscmd([cat VERSION| tr -d '\n']),
9769a39 moved to the new URL
graziano obertelli authored
16 support@open.eucalyptus.com)
7183c5b from CVS
graziano obertelli authored
17 AC_CONFIG_SRCDIR([wsdl/eucalyptus_nc.wsdl])
ecfe55d reanamed config.h to eucalyptus-config.h.
graziano authored
18 AC_CONFIG_HEADER([util/eucalyptus-config.h])
7183c5b from CVS
graziano obertelli authored
19 AC_PREFIX_DEFAULT([/opt/eucalyptus/])
20 AC_USE_SYSTEM_EXTENSIONS
47eb0ff @gholms Re-apply build system changes
gholms authored
21 AC_CANONICAL_BUILD
015eb7c changed VERSION to EUCA_VERSION
graziano authored
22 EUCA_VERSION="`cat VERSION`"
7183c5b from CVS
graziano obertelli authored
23
24 # let's figure out where is the source tree
25 if test ${srcdir} = "." ; then
26 TOP=`pwd`
27 else
28 TOP=${srcdir}
29 fi
30
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
31 # variables we'll need later on
75986bc @gholms Attempt to fix missing Apache conf dir
gholms authored
32 APACHE2_MODULE_DIR=""
7183c5b from CVS
graziano obertelli authored
33 AXIS2C_HOME="${AXIS2C_HOME}"
34 AXIS2_HOME="${AXIS2_HOME}"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
35 AXIS2C_SERVICES=""
7183c5b from CVS
graziano obertelli authored
36 LIBVIRT_HOME="${LIBVIRT_HOME}"
5cf21dd added --with-vddk option to configure
root authored
37 VDDK_HOME="${VDDK_HOME}"
9b1361c Added themability at compile time.
graziano authored
38 INTERFACE_THEME="eucalyptus"
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
39 EXTENSIONS=""
7183c5b from CVS
graziano obertelli authored
40 ANT=""
41 JAVA=""
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
42 WSDL2C=""
7183c5b from CVS
graziano obertelli authored
43 java_min_version="1.6.0"
44 ant_min_version="1.6.5"
45
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
46 # these are for large files (>2GB)
47 LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
48 LIBS="`getconf LFS64_LIBS` $LIBS"
49 CFLAGS="`getconf LFS64_CFLAGS`"
50
7183c5b from CVS
graziano obertelli authored
51 # compile options
52 CFLAGS="${CFLAGS} -Wall -Wno-unused-variable -fPIC -DHAVE_CONFIG_H"
53 INCLUDES="${INCLUDES} -I. -I.. -Igenerated -I${TOP}/storage -I${TOP}/node -I${TOP}/util -I${TOP}/net"
54
55 # Arguments checking
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
56 AC_ARG_WITH(axis2c,
57 [ --with-axis2c=<dir> where axis2c is installed],
7183c5b from CVS
graziano obertelli authored
58 [AXIS2C_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
59 AC_ARG_WITH(axis2c-services,
60 [ --with-axis2c-services=<dir> where axis2c services are installed],
61 [AXIS2C_SERVICES="${withval}"])
3f7d1a7 @gholms Let one specify the Apache module dir
gholms authored
62 AC_ARG_WITH(apache2-module-dir,
63 [ --with-apache2-module-dir=<dir> where Apache modules reside],
64 [APACHE2_MODULE_DIR="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
65 AC_ARG_WITH(axis2,
66 [ --with-axis2=<dir> where axis2 is installed],
7183c5b from CVS
graziano obertelli authored
67 [AXIS2_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
68 AC_ARG_WITH(libvirt,
69 [ --with-libvirt=<dir> where libvirt is installed],
7183c5b from CVS
graziano obertelli authored
70 [LIBVIRT_HOME="${withval}"])
47eb0ff @gholms Re-apply build system changes
gholms authored
71 AC_ARG_WITH(wsdl2c-sh,
72 [ --with-wsdl2c-sh=<file> where WSDL2C.sh is installed],
73 [WSDL2C="${withval}"])
5cf21dd added --with-vddk option to configure
root authored
74 AC_ARG_WITH(vddk,
75 [ --with-vddk=<dir> where VMware's VDDK is installed],
76 [VDDK_HOME="${withval}"])
9b1361c Added themability at compile time.
graziano authored
77 AC_ARG_WITH(interface-theme,
2ebf469 typo in configure.ac
root authored
78 [ --with-interface-theme=<name> the theme to be used],
9b1361c Added themability at compile time.
graziano authored
79 [INTERFACE_THEME="${withval}"])
80 AC_ARG_ENABLE(appliance-store,
81 [ --enable-appliance-store enable the store tab],
82 [if test "${enableval}" != "no"; then
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
83 EXTENSIONS="store"
9b1361c Added themability at compile time.
graziano authored
84 fi])
85
7183c5b from CVS
graziano obertelli authored
86 AC_ARG_ENABLE(debug,
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
87 [ --enable-debug include debugging info when compiling],
7183c5b from CVS
graziano obertelli authored
88 [if test "${enableval}" != "no"; then
89 CFLAGS="$CFLAGS -g -DDEBUG"
90 fi])
91
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
92
93 # If we didn't specify the services directory, let's use the default
be76398 fixed condition
graziano obertelli authored
94 if test -z "$AXIS2C_SERVICES" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
95 AXIS2C_SERVICES="${AXIS2C_HOME}/services"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
96 fi
97
3f7d1a7 @gholms Let one specify the Apache module dir
gholms authored
98 # If we didn't specify the location of Apache modules, assume mod_axis2
99 # resides within AXIS2C_HOME
100 if test -z "$APACHE2_MODULE_DIR"; then
101 APACHE2_MODULE_DIR="${AXIS2C_HOME}/lib"
102 fi
103
7183c5b from CVS
graziano obertelli authored
104 # Fix the paths for includes and libraries
105 if test -n "${AXIS2C_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
106 if test -d "${AXIS2C_HOME}"/include ; then
107 for x in `ls ${AXIS2C_HOME}/include`; do
108 INCLUDES="${INCLUDES} -I${AXIS2C_HOME}/include/$x"
109 done
110 fi
111 if test -d "${AXIS2C_HOME}"/lib ; then
112 LIBS="-L${AXIS2C_HOME}/lib ${LIBS}"
113 fi
114 if test -d ${AXIS2C_HOME}/modules/rampart ; then
115 LIBS="-L${AXIS2C_HOME}/modules/rampart ${LIBS}"
116 fi
7183c5b from CVS
graziano obertelli authored
117 fi
118 if test -n "${LIBVIRT_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
119 if test -d "${LIBVIRT_HOME}"/include ; then
120 INCLUDES="${INCLUDES} -I${LIBVIRT_HOME}/include"
121 LIBS="-L${LIBVIRT_HOME}/lib ${LIBS}"
122 fi
7183c5b from CVS
graziano obertelli authored
123 fi
5cf21dd added --with-vddk option to configure
root authored
124 if test -n "${VDDK_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
125 AS_IF([test "x$build_cpu" = "xx86_64"], [LIBS="-L${VDDK_HOME}/lib64 ${LIBS}"],
126 [LIBS="-L${VDDK_HOME}/lib32 ${LIBS}"])
127
128 if test -d "${VDDK_HOME}"/include/ ; then
129 INCLUDES="${INCLUDES} -I${VDDK_HOME}/include/"
130 elif test -d "${VDDK_HOME}"/lib/vmware-vix-disklib/include/ ; then
131 INCLUDES="${INCLUDES} -I${VDDK_HOME}/lib/vmware-vix-disklib/include/"
132 fi
5cf21dd added --with-vddk option to configure
root authored
133 fi
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
134
7183c5b from CVS
graziano obertelli authored
135
136 # Checks for programs.
137 AC_PROG_AWK
138 AC_PROG_CC
139 AC_PROG_INSTALL
140 AC_PROG_MAKE_SET
5015556 Fixed spurios commit with extra characters.
graziano obertelli authored
141 AC_PATH_PROG(RM, rm)
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
142
47eb0ff @gholms Re-apply build system changes
gholms authored
143 if test -z "$WSDL2C"; then
144 # let's search for WSDL2C.sh
145 AC_PATH_PROG([WSDL2C], WSDL2C.sh,,$AXIS2C_HOME/bin/tools/wsdl2c:$PATH)
1fe927f @gholms Fix missing WSDL2C lib (attempt 2)
gholms authored
146 fi
47eb0ff @gholms Re-apply build system changes
gholms authored
147 # check if we found WSDL2C.sh
148 if test -z "$WSDL2C" ; then
149 AC_MSG_ERROR([Cannot find WSDL2C.sh!])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
150 fi
151
152 # we need JAVA_HOME
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
153 if test -z "$JAVA_HOME" ; then
154 AC_MSG_ERROR([JAVA_HOME is not defined!])
155 fi
156
7183c5b from CVS
graziano obertelli authored
157 AC_PATH_PROG([ANT], ant,,$ANT_HOME/bin:$PATH)
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
158 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
7183c5b from CVS
graziano obertelli authored
159
160 # Check the version of java and ant
161 if test -z "$ANT" ; then
162 AC_MSG_ERROR([Cannot find ant!])
163 fi
164 if test -z "$JAVA" ; then
165 AC_MSG_ERROR([Cannot find java!])
166 fi
167 java_version=`$JAVA -version 2>&1 | grep "java version" | \
168 sed -e 's/.*java version "\(.*\)".*/\1/'`
169 goodversion=`expr $java_version ">=" $java_min_version`
170 if test $goodversion -eq 0; then
171 AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
172 fi
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
173
174 # now let's test we have jni.h
175 if test ! -e $JAVA_HOME/include/jni.h ; then
9d27407 debugging the automatic testing scripts
graziano obertelli authored
176 AC_MSG_ERROR([Cannot find jni.h in $JAVA_HOME: do you have a JDK installed?])
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
177 fi
178
7183c5b from CVS
graziano obertelli authored
179 ant_version=`$ANT -version 2>&1 | grep "Ant version" | \
180 sed -e 's/.*Ant version \([[0-9.]]*\).*/\1/'`
181 goodversion=`expr $ant_version ">=" $ant_min_version`
182 if test $goodversion -eq 0; then
183 AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
184 fi
185 # some version of ant picks up the wrong java
186 java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \
187 sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
188 goodversion=`expr $java_version ">=" $java_min_version`
189 if test $goodversion -eq 0; then
190 AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
191 fi
192
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
193
7183c5b from CVS
graziano obertelli authored
194 # Checks for libraries.
195 # FIXME: Replace `main' with a function in the library
196 AC_CHECK_LIB([axis2_axiom],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
197 AC_CHECK_LIB([axis2_engine],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
198 AC_CHECK_LIB([axis2_http_common],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
199 AC_CHECK_LIB([axis2_http_receiver],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
200 AC_CHECK_LIB([axis2_http_sender],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
201 AC_CHECK_LIB([guththila],[main],,AC_MSG_ERROR([Cannot find libguththila!]))
202 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
203 AC_CHECK_LIB([axutil],[main],,AC_MSG_ERROR([Cannot find libaxutil]))
204 AC_CHECK_LIB([m],[main])
205 AC_CHECK_LIB([mod_rampart],[main],,AC_MSG_ERROR([Cannot find libmod_rampart]))
206 AC_CHECK_LIB([neethi],[main],,AC_MSG_ERROR([Cannot find libneethi!]))
207 AC_CHECK_LIB([pthread],[main])
208 AC_CHECK_LIB([rt],[main])
ec3f728 We had a too strict dependency on libvirt: fixed it (only NC depends …
graziano obertelli authored
209 AC_CHECK_LIB([virt],[main],true,AC_MSG_ERROR([Cannot find libvirt!]))
210 AC_CHECK_LIB([curl],[main],true,AC_MSG_ERROR([Cannot find libcurl!]))
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
211 AC_CHECK_LIB([z],[inflate])
720650c brought libcap configure check from main
Dmitrii Zagorodnov authored
212 AC_CHECK_LIB([cap],[cap_from_name],,AC_MSG_WARN([Cannot find sufficiently recent libcap will not use it]))
7183c5b from CVS
graziano obertelli authored
213
214 # Checks for header files.
215 AC_HEADER_DIRENT
216 AC_HEADER_STDC
217 AC_HEADER_SYS_WAIT
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
218 AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h strings.h sys/ioctl.h unistd.h sys/vfs.h zlib.h])
7183c5b from CVS
graziano obertelli authored
219 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
220 dnl AC_CHECK_HEADER([curl/easy.h],,AC_MSG_ERROR([[Cannot find curl/easy.h]]))
221
222 # Checks for typedefs, structures, and compiler characteristics.
223 AC_C_CONST
224 AC_TYPE_MODE_T
225 AC_TYPE_PID_T
226 AC_TYPE_SIZE_T
227 AC_TYPE_SSIZE_T
228 AC_HEADER_TIME
229 AC_STRUCT_TM
230 AC_TYPE_UINT32_T
231
232 # Checks for functions.
233 AC_FUNC_CLOSEDIR_VOID
234 AC_FUNC_FORK
235 AC_FUNC_LSTAT
236 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
237 AC_FUNC_MALLOC
238 AC_FUNC_MEMCMP
239 AC_FUNC_MKTIME
240 AC_FUNC_MMAP
241 AC_FUNC_REALLOC
242 AC_FUNC_SELECT_ARGTYPES
243 AC_FUNC_STAT
244 AC_FUNC_STRNLEN
245 AC_FUNC_VPRINTF
246 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir])
247
248 # Time to substitute and generate the files
249 AC_CONFIG_FILES([Makedefs
ed1f832 first cut at splitting the init.d scripts per service
graziano obertelli authored
250 tools/eucalyptus-cc:tools/eucalyptus-cc.in
251 tools/eucalyptus-nc:tools/eucalyptus-nc.in
b9ee122 euca_conf now searches the conf file in the installed directory
graziano obertelli authored
252 tools/euca_conf:tools/euca_conf.in
efc277f Ready for more testing.
graziano authored
253 tools/eucalyptus-cloud:tools/eucalyptus-cloud.in])
7183c5b from CVS
graziano obertelli authored
254
015eb7c changed VERSION to EUCA_VERSION
graziano authored
255 AC_DEFINE_UNQUOTED(EUCA_VERSION, "$EUCA_VERSION")
7183c5b from CVS
graziano obertelli authored
256
015eb7c changed VERSION to EUCA_VERSION
graziano authored
257 AC_SUBST(EUCA_VERSION)
7183c5b from CVS
graziano obertelli authored
258 AC_SUBST(TOP)
259 AC_SUBST(ANT)
116504e Added uninstall target.
graziano authored
260 AC_SUBST(RM)
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
261 AC_SUBST(WSDL2C)
7183c5b from CVS
graziano obertelli authored
262 AC_SUBST(JAVA_HOME)
263 AC_SUBST(AXIS2C_HOME)
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
264 AC_SUBST(AXIS2C_SERVICES)
7183c5b from CVS
graziano obertelli authored
265 AC_SUBST(AXIS2_HOME)
266 AC_SUBST(LIBVIRT_HOME)
5cf21dd added --with-vddk option to configure
root authored
267 AC_SUBST(VDDK_HOME)
7183c5b from CVS
graziano obertelli authored
268 AC_SUBST(CFLAGS)
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
269 AC_SUBST(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
270 AC_SUBST(LIBS)
271 AC_SUBST(INCLUDES)
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
272 AC_SUBST(EXTENSIONS)
9b1361c Added themability at compile time.
graziano authored
273 AC_SUBST(INTERFACE_THEME)
7183c5b from CVS
graziano obertelli authored
274
275
276
277 AC_OUTPUT
Something went wrong with that request. Please try again.