Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 286 lines (254 sloc) 9.528 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
87fee16 @gholms Fix typo
gholms authored
56 AC_ARG_WITH(apache2-module-dir,
57 [ --with-apache2-module-dir=<dir> where Apache modules are installed],
58 [APACHE2_MODULE_DIR="${withval}"])
59 AC_ARG_WITH(axis2,
60 [ --with-axis2=<dir> where axis2 is installed],
61 [AXIS2_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
62 AC_ARG_WITH(axis2c,
63 [ --with-axis2c=<dir> where axis2c is installed],
7183c5b from CVS
graziano obertelli authored
64 [AXIS2C_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
65 AC_ARG_WITH(axis2c-services,
66 [ --with-axis2c-services=<dir> where axis2c services are installed],
67 [AXIS2C_SERVICES="${withval}"])
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 if test -d "${VDDK_HOME}"/include/ ; then
2c263e1 @gholms Fix VDDK link failure when building against its installed version
gholms authored
126 # Using tarball direct from VMware
47eb0ff @gholms Re-apply build system changes
gholms authored
127 INCLUDES="${INCLUDES} -I${VDDK_HOME}/include/"
2c263e1 @gholms Fix VDDK link failure when building against its installed version
gholms authored
128 AS_IF([test "x$build_cpu" = "xx86_64"], [LIBS="-L${VDDK_HOME}/lib64 ${LIBS}"],
129 [LIBS="-L${VDDK_HOME}/lib32 ${LIBS}"])
47eb0ff @gholms Re-apply build system changes
gholms authored
130 elif test -d "${VDDK_HOME}"/lib/vmware-vix-disklib/include/ ; then
2c263e1 @gholms Fix VDDK link failure when building against its installed version
gholms authored
131 # Using installed tarball
47eb0ff @gholms Re-apply build system changes
gholms authored
132 INCLUDES="${INCLUDES} -I${VDDK_HOME}/lib/vmware-vix-disklib/include/"
87fee16 @gholms Fix typo
gholms authored
133 LIBS="-L${VDDK_HOME}/lib ${LIBS}"
47eb0ff @gholms Re-apply build system changes
gholms authored
134 fi
5cf21dd added --with-vddk option to configure
root authored
135 fi
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
136
7183c5b from CVS
graziano obertelli authored
137
138 # Checks for programs.
139 AC_PROG_AWK
140 AC_PROG_CC
141 AC_PROG_INSTALL
142 AC_PROG_MAKE_SET
5015556 Fixed spurios commit with extra characters.
graziano obertelli authored
143 AC_PATH_PROG(RM, rm)
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
144
47eb0ff @gholms Re-apply build system changes
gholms authored
145 if test -z "$WSDL2C"; then
146 # let's search for WSDL2C.sh
c7499b9 @gholms Fix failure to find WSDL2C.sh when it is not +x
gholms authored
147 AC_PATH_PROG([WSDL2C], WSDL2C.sh,,${AXIS2C_HOME}/bin/tools/wsdl2c:$PATH)
148 fi
149 ## HACK: Sometimes WSDL2C.sh isn't executable for some reason. We call sh on
150 ## it directly, so look for a non-executable file just in case.
151 if test -z "$WSDL2C" && test -f ${AXIS2C_HOME}/bin/tools/wsdl2c/WSDL2C.sh; then
152 WSDL2C=${AXIS2C_HOME}/bin/tools/wsdl2c/WSDL2C.sh
1fe927f @gholms Fix missing WSDL2C lib (attempt 2)
gholms authored
153 fi
47eb0ff @gholms Re-apply build system changes
gholms authored
154 # check if we found WSDL2C.sh
155 if test -z "$WSDL2C" ; then
156 AC_MSG_ERROR([Cannot find WSDL2C.sh!])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
157 fi
158
159 # we need JAVA_HOME
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
160 if test -z "$JAVA_HOME" ; then
161 AC_MSG_ERROR([JAVA_HOME is not defined!])
162 fi
163
7183c5b from CVS
graziano obertelli authored
164 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
165 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
7183c5b from CVS
graziano obertelli authored
166
167 # Check the version of java and ant
168 if test -z "$ANT" ; then
169 AC_MSG_ERROR([Cannot find ant!])
170 fi
171 if test -z "$JAVA" ; then
172 AC_MSG_ERROR([Cannot find java!])
173 fi
174 java_version=`$JAVA -version 2>&1 | grep "java version" | \
175 sed -e 's/.*java version "\(.*\)".*/\1/'`
176 goodversion=`expr $java_version ">=" $java_min_version`
177 if test $goodversion -eq 0; then
178 AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
179 fi
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
180
181 # now let's test we have jni.h
182 if test ! -e $JAVA_HOME/include/jni.h ; then
9d27407 debugging the automatic testing scripts
graziano obertelli authored
183 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
184 fi
185
7183c5b from CVS
graziano obertelli authored
186 ant_version=`$ANT -version 2>&1 | grep "Ant version" | \
187 sed -e 's/.*Ant version \([[0-9.]]*\).*/\1/'`
188 goodversion=`expr $ant_version ">=" $ant_min_version`
189 if test $goodversion -eq 0; then
190 AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
191 fi
192 # some version of ant picks up the wrong java
193 java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \
194 sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
195 goodversion=`expr $java_version ">=" $java_min_version`
196 if test $goodversion -eq 0; then
197 AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
198 fi
199
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
200
7183c5b from CVS
graziano obertelli authored
201 # Checks for libraries.
202 # FIXME: Replace `main' with a function in the library
203 AC_CHECK_LIB([axis2_axiom],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
204 AC_CHECK_LIB([axis2_engine],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
205 AC_CHECK_LIB([axis2_http_common],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
206 AC_CHECK_LIB([axis2_http_receiver],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
207 AC_CHECK_LIB([axis2_http_sender],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
208 AC_CHECK_LIB([guththila],[main],,AC_MSG_ERROR([Cannot find libguththila!]))
209 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
210 AC_CHECK_LIB([axutil],[main],,AC_MSG_ERROR([Cannot find libaxutil]))
211 AC_CHECK_LIB([m],[main])
212 AC_CHECK_LIB([mod_rampart],[main],,AC_MSG_ERROR([Cannot find libmod_rampart]))
213 AC_CHECK_LIB([neethi],[main],,AC_MSG_ERROR([Cannot find libneethi!]))
214 AC_CHECK_LIB([pthread],[main])
215 AC_CHECK_LIB([rt],[main])
ec3f728 We had a too strict dependency on libvirt: fixed it (only NC depends …
graziano obertelli authored
216 AC_CHECK_LIB([virt],[main],true,AC_MSG_ERROR([Cannot find libvirt!]))
217 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
218 AC_CHECK_LIB([z],[inflate])
720650c @dmitrii brought libcap configure check from main
dmitrii authored
219 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
220
221 # Checks for header files.
222 AC_HEADER_DIRENT
223 AC_HEADER_STDC
224 AC_HEADER_SYS_WAIT
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
225 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
226 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
227 dnl AC_CHECK_HEADER([curl/easy.h],,AC_MSG_ERROR([[Cannot find curl/easy.h]]))
228
229 # Checks for typedefs, structures, and compiler characteristics.
230 AC_C_CONST
231 AC_TYPE_MODE_T
232 AC_TYPE_PID_T
233 AC_TYPE_SIZE_T
234 AC_TYPE_SSIZE_T
235 AC_HEADER_TIME
236 AC_STRUCT_TM
237 AC_TYPE_UINT32_T
238
239 # Checks for functions.
240 AC_FUNC_CLOSEDIR_VOID
241 AC_FUNC_FORK
242 AC_FUNC_LSTAT
243 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
244 AC_FUNC_MALLOC
245 AC_FUNC_MEMCMP
246 AC_FUNC_MKTIME
247 AC_FUNC_MMAP
248 AC_FUNC_REALLOC
249 AC_FUNC_SELECT_ARGTYPES
250 AC_FUNC_STAT
251 AC_FUNC_STRNLEN
252 AC_FUNC_VPRINTF
253 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir])
254
255 # Time to substitute and generate the files
256 AC_CONFIG_FILES([Makedefs
ed1f832 first cut at splitting the init.d scripts per service
graziano obertelli authored
257 tools/eucalyptus-cc:tools/eucalyptus-cc.in
258 tools/eucalyptus-nc:tools/eucalyptus-nc.in
b9ee122 euca_conf now searches the conf file in the installed directory
graziano obertelli authored
259 tools/euca_conf:tools/euca_conf.in
efc277f Ready for more testing.
graziano authored
260 tools/eucalyptus-cloud:tools/eucalyptus-cloud.in])
7183c5b from CVS
graziano obertelli authored
261
015eb7c changed VERSION to EUCA_VERSION
graziano authored
262 AC_DEFINE_UNQUOTED(EUCA_VERSION, "$EUCA_VERSION")
7183c5b from CVS
graziano obertelli authored
263
015eb7c changed VERSION to EUCA_VERSION
graziano authored
264 AC_SUBST(EUCA_VERSION)
7183c5b from CVS
graziano obertelli authored
265 AC_SUBST(TOP)
266 AC_SUBST(ANT)
116504e Added uninstall target.
graziano authored
267 AC_SUBST(RM)
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
268 AC_SUBST(WSDL2C)
7183c5b from CVS
graziano obertelli authored
269 AC_SUBST(JAVA_HOME)
0e47422 @gholms Attempt to fix missing Apache module dir (try 3)
gholms authored
270 AC_SUBST(APACHE2_MODULE_DIR)
7183c5b from CVS
graziano obertelli authored
271 AC_SUBST(AXIS2C_HOME)
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
272 AC_SUBST(AXIS2C_SERVICES)
7183c5b from CVS
graziano obertelli authored
273 AC_SUBST(AXIS2_HOME)
274 AC_SUBST(LIBVIRT_HOME)
5cf21dd added --with-vddk option to configure
root authored
275 AC_SUBST(VDDK_HOME)
7183c5b from CVS
graziano obertelli authored
276 AC_SUBST(CFLAGS)
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
277 AC_SUBST(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
278 AC_SUBST(LIBS)
279 AC_SUBST(INCLUDES)
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
280 AC_SUBST(EXTENSIONS)
9b1361c Added themability at compile time.
graziano authored
281 AC_SUBST(INTERFACE_THEME)
7183c5b from CVS
graziano obertelli authored
282
283
284
285 AC_OUTPUT
Something went wrong with that request. Please try again.