1
################################################################################
2
# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package
3
# Copyright (C) 2007 Ilsoo Byun, ETRI <widepis@etri.re.kr, widepis@empal.com>
5
# This program is being developed under the "OpenDRIM" project.
6
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
7
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
9
# This program is free software; you can redistribute it and/or
10
# modify it under the terms of the GNU General Public License
11
# as published by the Free Software Foundation; version 2
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#################################################################################
24
#################################################################################
25
# To contributors, please leave your contact information in this section
26
# AND comment your changes in the source code.
28
# Modified by 2008 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr, guillaumebottex@gmail.com>
29
################################################################################
31
AC_DEFUN([SHOW_COPYRIGHT],
33
echo "#################################################################################
34
# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package
35
# Copyright (C) 2007 Ilsoo Byun <widepis@etri.re.kr>
37
# This program is being developed under the "OpenDRIM" project.
38
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
39
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
41
# This program is free software; you can redistribute it and/or
42
# modify it under the terms of the GNU General Public License
43
# as published by the Free Software Foundation; version 2
46
# This program is distributed in the hope that it will be useful,
47
# but WITHOUT ANY WARRANTY; without even the implied warranty of
48
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49
# GNU General Public License for more details.
51
# You should have received a copy of the GNU General Public License
52
# along with this program; if not, write to the Free Software
53
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
54
#################################################################################
59
AC_DEFUN([CHECK_CIMSERVER],
61
AC_MSG_CHECKING(for CIM servers)
63
if test x"$CIMSERVER" == x
65
AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]])
68
if test "$CIMSERVER" != pegasus && test "$CIMSERVER" != sfcb && test "$CIMSERVER" != openwbem
70
AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]])
73
if test "$CIMSERVER" == pegasus
75
if !( command -v cimmof > /dev/null )
77
AC_MSG_ERROR([[no. the Pegasus mof compiler could not be found (cimmof)]])
81
if test "$CIMSERVER" == openwbem
83
if !( command -v owmofc > /dev/null)
85
AC_MSG_ERROR([[no. the OpenWBEM mof compiler could not be found (owmofc)]])
89
if test "$CIMSERVER" == sfcb
91
if !( command -v sfcbd > /dev/null )
93
AC_MSG_ERROR([[no. the SBLIM sfcb deamon could not be found (sfcbd)]])
95
if !( command -v sfcbstage > /dev/null )
97
AC_MSG_ERROR([[no. the SBLIM mof stager could not be found (sfcbstage)]])
99
if !( command -v sfcbrepos > /dev/null )
101
AC_MSG_ERROR([[no. the SBLIM repository builder could no be found (sfcbrepos)]])
105
if test "$CIMSERVER" == pegasus
107
if test x"$prefix" == xNONE
109
if test "$HW" == X86_64 || test "$HW" == IA64
111
PROVIDERDIR_TMP=/usr/lib64/Pegasus/providers
112
COMMONLIBDIR_TMP=/usr/lib64
113
OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64
115
PROVIDERDIR_TMP=/usr/lib/Pegasus/providers
116
COMMONLIBDIR_TMP=/usr/lib
117
OPENDRIMCOMMONLIBDIR_TMP=/usr/lib
119
OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM
121
if test "$HW" == X86_64 || test "$HW" == IA64
123
PROVIDERDIR_TMP=$prefix/lib64/Pegasus/providers
124
COMMONLIBDIR_TMP=$prefix/lib64
125
OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib64
127
PROVIDERDIR_TMP=$prefix/lib/Pegasus/providers
128
COMMONLIBDIR_TMP=$prefix/lib
129
OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib
131
OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM
134
if test x"$PEGASUS_HOME" != x
136
PROVIDERDIR_TMP=$PEGASUS_HOME/lib
137
COMMONLIBDIR_TMP=$PEGASUS_HOME/lib
138
OPENDRIMCOMMONLIBDIR_TMP=$PEGASUS_HOME/lib
139
OPENDRIMCOMMONINCLUDE_TMP=$PEGASUS_HOME/include/OpenDRIM
143
if test "$CIMSERVER" == sfcb
145
if test x"$prefix" == xNONE
147
PROVIDERDIR_TMP=$ac_default_prefix/lib/cmpi
148
COMMONLIBDIR_TMP=$ac_default_prefix/lib
149
OPENDRIMCOMMONLIBDIR_TMP=$ac_default_prefix/lib
150
OPENDRIMCOMMONINCLUDE_TMP=$ac_default_prefix/include/OpenDRIM
152
PROVIDERDIR_TMP=$prefix/lib/cmpi
153
COMMONLIBDIR_TMP=$prefix/lib
154
OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib
155
OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM
159
if test "$CIMSERVER" == openwbem
161
if test x"$prefix" == xNONE
163
if test "$HW" == X86_64 || test "$HW" == IA64
165
PROVIDERDIR_TMP=/usr/lib64/openwbem/cmpiproviders
166
COMMONLIBDIR_TMP=/usr/lib64
167
OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64
169
PROVIDERDIR_TMP=/usr/lib/openwbem/cmpiproviders
170
COMMONLIBDIR_TMP=/usr/lib
171
OPENDRIMCOMMONLIBDIR_TMP=/usr/lib
173
OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM
175
PROVIDERDIR_TMP=$prefix/lib/openwbem/cmpiproviders
176
COMMONLIBDIR_TMP=$prefix/lib
177
OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib
178
OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM
182
if test x"$PROVIDERDIR" = x
184
PROVIDERDIR=$PROVIDERDIR_TMP
187
if test x"$COMMONLIBDIR" = x
189
COMMONLIBDIR=$COMMONLIBDIR_TMP
192
if test x"$OPENDRIMCOMMONLIBDIR" = x
194
OPENDRIMCOMMONLIBDIR=$OPENDRIMCOMMONLIBDIR_TMP
197
if test x"$OPENDRIMCOMMONINCLUDE" = x
199
OPENDRIMCOMMONINCLUDE=$OPENDRIMCOMMONINCLUDE_TMP
202
TEMP_CPPFLAGS="$CPPFLAGS -D_REENTRANT"
203
CFLAGS="-Wall -Wunused -fPIC -O2 $CFLAGS"
204
CXXFLAGS="-Wall -Wunused -fPIC -fno-rtti -fno-exceptions -O2 $CXXFLAGS"
205
LDFLAGS="$LDFLAGS -L. -L$PROVIDERDIR -L$COMMONLIBDIR"
211
AC_DEFUN([CHECK_CIMNAMESPACE],
213
if test x"$CIMNAMESPACE" == x
215
CIMNAMESPACE=root/cimv2
217
TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_NAMESPACE=\\\"$CIMNAMESPACE\\\""
221
AC_DEFUN([CHECK_INTEROPNAMESPACE],
223
if test x"$INTEROPNAMESPACE" == x
225
if test "$CIMSERVER" == pegasus
227
INTEROPNAMESPACE=Interop
229
if test "$CIMSERVER" == openwbem
231
INTEROPNAMESPACE=root/Interop
233
if test "$CIMSERVER" == sfcb
235
INTEROPNAMESPACE=Interop
238
TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_INTEROP_NAMESPACE=\\\"$INTEROPNAMESPACE\\\""
242
AC_DEFUN([CHECK_OPENDRIMCOMMONHEADERS],
244
AC_MSG_CHECKING(for OpenDRIM Common headers)
245
_HEADERS="Common.h Datastore.h CMPIBroking.h Association.h Indication.h Instance.h Objectpath.h Transtype.h"
246
for _HEADER in $_HEADERS
248
if !( test -e $OPENDRIMCOMMONINCLUDE/$_HEADER )
250
AC_MSG_ERROR([[no. Could not find OpenDRIM Common headers:] $_HEADER])
257
AC_DEFUN([CHECK_OPENDRIMCOMMONLIBRARY],
259
AC_MSG_CHECKING(for OpenDRIM Common library)
261
if test -e $OPENDRIMCOMMONLIBDIR/libopendrim.so
265
AC_MSG_ERROR([[no. The OpenDRIM Common library could not be found (libopendrim.so)]])
270
AC_DEFUN([_CHECK_CMPIHEADERS],
275
#include <cmpimacs.h>
281
CMPIStatus status = {CMPI_RC_OK, NULL};
282
CMPIString *s = CMNewString(&broker, "TEST", &status);
293
AC_DEFUN([CHECK_CMPIHEADERS],
295
AC_MSG_CHECKING(for CMPI headers)
297
CPPFLAGS="$TEMP_CPPFLAGS -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I$OPENDRIMCOMMONINCLUDE/cmpi"
298
_CHECK_CMPIHEADERS($OPENDRIMCOMMONINCLUDE)
299
if test "$have_CMPI" == "yes"
301
CPPFLAGS="$TEMP_CPPFLAGS"
304
_CHECK_CMPIHEADERS(standard)
305
if test "$have_CMPI" == "yes"
307
CPPFLAGS="$TEMP_CPPFLAGS"
312
if test "$have_CMPI" == "no"
314
AC_MSG_ERROR([[no. The CMPI headers could not be found (cmpidt.h, cmpimacs.h, cmpift.h)]])