Commit cfa66d11 authored by Olivier Aubert's avatar Olivier Aubert

Proper fix for corba building problem (use AM_CONDITIONAL)

parent c56d3b79
......@@ -3558,6 +3558,8 @@ fi
dnl
dnl corba (ORBit) plugin
dnl
dnl Default: do not enable corba
enablecorba=false
AC_ARG_ENABLE(corba,
[ --enable-corba corba interface support (default disabled)])
if test "${enable_corba}" = "yes"; then
......@@ -3568,11 +3570,14 @@ if test "${enable_corba}" = "yes"; then
gobject-2.0 >= $GLIB_VERSION \
gthread-2.0 >= $GLIB_VERSION,
[
enablecorba=true
AX_ADD_LDFLAGS([corba],[$CORBA_LIBS])
AX_ADD_CFLAGS([corba],[$CORBA_CFLAGS])
AX_ADD_PLUGINS([corba snapshot]) ],
[ AC_MSG_WARN(corba library not found) ])
[ enablecorba=false
AC_MSG_WARN(corba library not found) ])
fi
AM_CONDITIONAL(ENABLE_CORBA, test x$enablecorba = xtrue)
AC_ARG_WITH(,[Misc options:])
......
......@@ -8,41 +8,41 @@ nodist_SOURCES_corba = \
MediaControl.h \
$(NULL)
CORBAIDLFILE=MediaControl.idl
if ENABLE_CORBA
corbaidldir = $(datadir)/idl
corbaidl_DATA = MediaControl.idl
corbaidl_DATA = $(CORBAIDLFILE)
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
EXTRA_DIST += $(corbaidl_DATA)
EXTRA_DIST += $(CORBAIDLFILE)
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)
GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
BUILT_SOURCES += $(GENERATEDFILES) MediaControl-imodule.c
## corba.c: MediaControl.h
## Needed for both MediaControl.so and libcorba_plugin compilation
INCLUDES = $(CORBA_CFLAGS)
## MediaControl.so rules
MediaControl.so: MediaControl-imodule.c
[ -z "$(CORBA_CFLAGS)" ] || $(CC) -fPIC -o MediaControl-imodule.o -c $< $(CORBA_CFLAGS)
[ -z "$(CORBA_CFLAGS)" ] || $(CC) -shared -o $@ MediaControl-imodule.o $(CORBA_LIBS)
$(CC) -fPIC -o MediaControl-imodule.o -c $< $(CORBA_CFLAGS)
$(CC) -shared -o $@ MediaControl-imodule.o $(CORBA_LIBS)
$(GENERATEDFILES): $(corbaidl_DATA)
[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) $(corbaidl_DATA)
$(GENERATEDFILES): $(CORBAIDLFILE)
$(ORBIT_IDL) $<
## We invoke 2 times $(ORBIT_IDL), else the --imodule
## We have to invoke 2 times $(ORBIT_IDL), else the --imodule
## invocation builds MediaControl-common.c without some
## glue code that is needed.
MediaControl-imodule.c: $(corbaidl_DATA)
[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) --imodule $<
[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) $<
MediaControl-imodule.c: $(CORBAIDLFILE)
$(ORBIT_IDL) --imodule $<
$(ORBIT_IDL) $<
clean:
$(RM) -f $(GENERATEDFILES)
$(RM) -f MediaControl-imodule.c
endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment