Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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