Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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