Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 215 lines (187 sloc) 6.623 kb
7183c5b from CVS
graziano obertelli authored
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 #
4 # $Id: configure.ac,v 1.4 2008-12-24 18:28:07 nurmi Exp $
5
6 # Usage:
7 # configure [--with-axis2c=<dir>]
8 # [--with-axis2=<dir>]
9 # [--with-libvirt=<dir>]
10 # [--enable-debug]
11
12 AC_PREREQ(2.61)
13 AC_INIT(Eucalyptus,
14 m4_esyscmd([cat VERSION| tr -d '\n']),
15 support@eucalyptus.cs.ucsb.edu)
16 AC_CONFIG_SRCDIR([wsdl/eucalyptus_nc.wsdl])
17 AC_CONFIG_HEADER([util/config.h])
18 AC_PREFIX_DEFAULT([/opt/eucalyptus/])
19 AC_USE_SYSTEM_EXTENSIONS
20 VERSION="`cat VERSION`"
21
22 # let's figure out where is the source tree
23 if test ${srcdir} = "." ; then
24 TOP=`pwd`
25 else
26 TOP=${srcdir}
27 fi
28
29 # variables we'll need later on
30 AXIS2C_HOME="${AXIS2C_HOME}"
31 AXIS2_HOME="${AXIS2_HOME}"
32 LIBVIRT_HOME="${LIBVIRT_HOME}"
33 ANT=""
34 JAVA=""
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
35 WSDL2C=""
7183c5b from CVS
graziano obertelli authored
36 java_min_version="1.6.0"
37 ant_min_version="1.6.5"
38
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
39 # these are for large files (>2GB)
40 LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
41 LIBS="`getconf LFS64_LIBS` $LIBS"
42 CFLAGS="`getconf LFS64_CFLAGS`"
43
7183c5b from CVS
graziano obertelli authored
44 # compile options
45 CFLAGS="${CFLAGS} -Wall -Wno-unused-variable -fPIC -DHAVE_CONFIG_H"
46 INCLUDES="${INCLUDES} -I. -I.. -Igenerated -I${TOP}/storage -I${TOP}/node -I${TOP}/util -I${TOP}/net"
47
48 # Arguments checking
49 AC_ARG_WITH(axis2c,
50 [ --with-axis2c=<dir> where axis2c is installed],
51 [AXIS2C_HOME="${withval}"])
52 AC_ARG_WITH(axis2,
53 [ --with-axis2=<dir> where axis2 is installed],
54 [AXIS2_HOME="${withval}"])
55 AC_ARG_WITH(libvirt,
56 [ --with-libvirt=<dir> where libvirt is installed],
57 [LIBVIRT_HOME="${withval}"])
58 AC_ARG_ENABLE(debug,
59 [ --enable-debug include debugging info when compiling],
60 [if test "${enableval}" != "no"; then
61 CFLAGS="$CFLAGS -g -DDEBUG"
62 fi])
63
64 # Fix the paths for includes and libraries
65 if test -n "${AXIS2C_HOME}" ; then
66 if test -d "${AXIS2C_HOME}"/include ; then
67 for x in `ls ${AXIS2C_HOME}/include`; do
68 INCLUDES="${INCLUDES} -I${AXIS2C_HOME}/include/$x"
69 done
70 LIBS="-L${AXIS2C_HOME}/lib ${LIBS}"
71 fi
72 fi
73 if test -n "${LIBVIRT_HOME}" ; then
74 if test -d "${LIBVIRT_HOME}"/include ; then
75 INCLUDES="${INCLUDES} -I${LIBVIRT_HOME}/include"
76 LIBS="-L${LIBVIRT_HOME}/lib ${LIBS}"
77 fi
78 fi
79
80
81 # Checks for programs.
82 AC_PROG_AWK
83 AC_PROG_CC
84 AC_PROG_INSTALL
85 AC_PROG_MAKE_SET
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
86
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
87 # let's search for WSDL2C.sh
88 # we cannot use AC_PROG_PATH because WSDL2C.sh is not executable
89 #AC_PATH_PROG([WSDL2C], WSDL2C.sh,,$AXIS2C_HOME/bin/tools/wsdl2c:$PATH)
90 WSDL2C=$AXIS2C_HOME/bin/tools/wsdl2c/WSDL2C.sh
91 AC_CHECK_FILE($WSDL2C,,WSDL2C="")
92 if test -z "$WSDL2C" ; then
93 AC_MSG_ERROR([Cannot find WSDL2C.sh!])
94 fi
95
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
96 # we need JAVA_HOME
97 if test -z "$JAVA_HOME" ; then
98 AC_MSG_ERROR([JAVA_HOME is not defined!])
99 fi
100
7183c5b from CVS
graziano obertelli authored
101 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
102 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
7183c5b from CVS
graziano obertelli authored
103
104 # Check the version of java and ant
105 if test -z "$ANT" ; then
106 AC_MSG_ERROR([Cannot find ant!])
107 fi
108 if test -z "$JAVA" ; then
109 AC_MSG_ERROR([Cannot find java!])
110 fi
111 java_version=`$JAVA -version 2>&1 | grep "java version" | \
112 sed -e 's/.*java version "\(.*\)".*/\1/'`
113 goodversion=`expr $java_version ">=" $java_min_version`
114 if test $goodversion -eq 0; then
115 AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
116 fi
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
117
118 # now let's test we have jni.h
119 if test ! -e $JAVA_HOME/include/jni.h ; then
9d27407 debugging the automatic testing scripts
graziano obertelli authored
120 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
121 fi
122
7183c5b from CVS
graziano obertelli authored
123 ant_version=`$ANT -version 2>&1 | grep "Ant version" | \
124 sed -e 's/.*Ant version \([[0-9.]]*\).*/\1/'`
125 goodversion=`expr $ant_version ">=" $ant_min_version`
126 if test $goodversion -eq 0; then
127 AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
128 fi
129 # some version of ant picks up the wrong java
130 java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \
131 sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
132 goodversion=`expr $java_version ">=" $java_min_version`
133 if test $goodversion -eq 0; then
134 AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
135 fi
136
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
137
7183c5b from CVS
graziano obertelli authored
138 # Checks for libraries.
139 # FIXME: Replace `main' with a function in the library
140 AC_CHECK_LIB([axis2_axiom],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
141 AC_CHECK_LIB([axis2_engine],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
142 AC_CHECK_LIB([axis2_http_common],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
143 AC_CHECK_LIB([axis2_http_receiver],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
144 AC_CHECK_LIB([axis2_http_sender],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
145 AC_CHECK_LIB([guththila],[main],,AC_MSG_ERROR([Cannot find libguththila!]))
146 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
147 AC_CHECK_LIB([axutil],[main],,AC_MSG_ERROR([Cannot find libaxutil]))
148 AC_CHECK_LIB([m],[main])
149 AC_CHECK_LIB([mod_rampart],[main],,AC_MSG_ERROR([Cannot find libmod_rampart]))
150 AC_CHECK_LIB([neethi],[main],,AC_MSG_ERROR([Cannot find libneethi!]))
151 AC_CHECK_LIB([omxmlsec],[main],,AC_MSG_ERROR([Cannot find libomxmlsec!]))
152 AC_CHECK_LIB([oxstokens],[main],,AC_MSG_ERROR([Cannot find liboxstokens!]))
153 AC_CHECK_LIB([pthread],[main])
154 AC_CHECK_LIB([rt],[main])
ec3f728 We had a too strict dependency on libvirt: fixed it (only NC depends …
graziano obertelli authored
155 AC_CHECK_LIB([virt],[main],true,AC_MSG_ERROR([Cannot find libvirt!]))
156 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
157 AC_CHECK_LIB([z],[inflate])
7183c5b from CVS
graziano obertelli authored
158
159 # Checks for header files.
160 AC_HEADER_DIRENT
161 AC_HEADER_STDC
162 AC_HEADER_SYS_WAIT
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
163 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
164 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
165 dnl AC_CHECK_HEADER([curl/easy.h],,AC_MSG_ERROR([[Cannot find curl/easy.h]]))
166
167 # Checks for typedefs, structures, and compiler characteristics.
168 AC_C_CONST
169 AC_TYPE_MODE_T
170 AC_TYPE_PID_T
171 AC_TYPE_SIZE_T
172 AC_TYPE_SSIZE_T
173 AC_HEADER_TIME
174 AC_STRUCT_TM
175 AC_TYPE_UINT32_T
176
177 # Checks for functions.
178 AC_FUNC_CLOSEDIR_VOID
179 AC_FUNC_FORK
180 AC_FUNC_LSTAT
181 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
182 AC_FUNC_MALLOC
183 AC_FUNC_MEMCMP
184 AC_FUNC_MKTIME
185 AC_FUNC_MMAP
186 AC_FUNC_REALLOC
187 AC_FUNC_SELECT_ARGTYPES
188 AC_FUNC_STAT
189 AC_FUNC_STRNLEN
190 AC_FUNC_VPRINTF
191 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir])
192
193 # Time to substitute and generate the files
194 AC_CONFIG_FILES([Makedefs
195 tools/eucalyptus:tools/eucalyptus.in])
196
197 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
198
199 AC_SUBST(VERSION)
200 AC_SUBST(TOP)
201 AC_SUBST(ANT)
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
202 AC_SUBST(WSDL2C)
7183c5b from CVS
graziano obertelli authored
203 AC_SUBST(JAVA_HOME)
204 AC_SUBST(AXIS2C_HOME)
205 AC_SUBST(AXIS2_HOME)
206 AC_SUBST(LIBVIRT_HOME)
207 AC_SUBST(CFLAGS)
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
208 AC_SUBST(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
209 AC_SUBST(LIBS)
210 AC_SUBST(INCLUDES)
211
212
213
214 AC_OUTPUT
Something went wrong with that request. Please try again.