From: vsr Date: Thu, 13 Aug 2009 04:50:10 +0000 (+0000) Subject: Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined X-Git-Tag: V5_1_3rc1~90 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17d2cc18e87d527025d83a35bb7789c66ffeb839;p=modules%2Fkernel.git Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined --- diff --git a/configure.ac b/configure.ac index ee2906919..724fe66b5 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,9 @@ AC_ARG_WITH(onlylauncher, [], [with_onlylauncher="no"]) AM_CONDITIONAL(WITHONLYLAUNCHER, test x$with_onlylauncher = xyes) +if test "$with_onlylauncher" != "yes"; then + AC_DEFINE([HAVE_SALOME_CONFIG], [], [True if SALOMEconfig.h file is used]) +fi # ---------------------------------------------------------------------------- diff --git a/idl/Makefile.am b/idl/Makefile.am index ee74ca586..bc2535a66 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -26,7 +26,7 @@ # include $(top_srcdir)/salome_adm/unix/make_common_starter.am -AM_CXXFLAGS = -fPIC +AM_CXXFLAGS += -fPIC BASEIDL_FILES = \ SALOME_Exception.idl \ @@ -226,15 +226,13 @@ SALOME_ParamPortsPaCO.idl SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx : lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB) nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS) -libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ - -I$(top_builddir)/idl \ +libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@ nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO) -libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ - -I$(top_builddir)/idl \ +libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ @PACO_INCLUDES@ libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0 diff --git a/salome_adm/unix/SALOMEconfig.ref.in b/salome_adm/unix/SALOMEconfig.ref.in index add14555f..9849e32b4 100644 --- a/salome_adm/unix/SALOMEconfig.ref.in +++ b/salome_adm/unix/SALOMEconfig.ref.in @@ -20,42 +20,62 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef SALOME_CONFIG_H -#define SALOME_CONFIG_H - -#define DEBUG +/* Debug mode ??? */ +#ifndef DEBUG +# define DEBUG +#endif -#define QUOTE(x) #x -#define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) -#define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) +/* CORBA headers include rules */ +#ifndef CORBA_CLIENT_HEADER +# define QUOTE(x) #x +# define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) +# define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) +#endif +/* Platform definition */ #ifndef @MACHINE@ #define @MACHINE@ #endif - /* A path to a rcp-like command */ -#define RCP "@RCP@" +#ifndef RCP +# define RCP "@RCP@" +#endif /* A path to a rm-like command */ -#define RM "@RM@" +#ifndef RM +# define RM "@RM@" +#endif /* A path to a cp-like command */ +#ifndef CP #define CP "@CP@" +#endif /* A path to a rsh-like command */ +#ifndef RSH #define RSH "@RSH@" +#endif /* A path to a scp-like command */ +#ifndef SCP #define SCP "@SCP@" +#endif /* A path to a sh-like command */ +#ifndef SH #define SH "@SH@" +#endif /* A path to a ssh-like command */ +#ifndef SSH #define SSH "@SSH@" +#endif // This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names) +#ifdef PACKAGE +#undef PACKAGE +#endif #ifdef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT #endif @@ -71,9 +91,10 @@ #ifdef PACKAGE_VERSION #undef PACKAGE_VERSION #endif +#ifdef VERSION +#undef VERSION +#endif #ifdef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE #endif - -#endif diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am index 13a4014ad..deb5ea9b3 100644 --- a/salome_adm/unix/make_common_starter.am +++ b/salome_adm/unix/make_common_starter.am @@ -19,6 +19,19 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +# ============================================================ +# The following is to avoid PACKAGE_... env variable +# redefinition compilation warnings +# ============================================================ +if !WITHONLYLAUNCHER + AM_CXXFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h + AM_CPPFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h +else WITHONLYLAUNCHER + AM_CXXFLAGS = + AM_CPPFLAGS = +endif + # ============================================================ # This file defines the common definitions used in several # Makefile. This file must be included, if needed, by the file diff --git a/src/Batch/Batch_BatchManager_Local_RSH.cxx b/src/Batch/Batch_BatchManager_Local_RSH.cxx index 5165ba981..9392f8d63 100644 --- a/src/Batch/Batch_BatchManager_Local_RSH.cxx +++ b/src/Batch/Batch_BatchManager_Local_RSH.cxx @@ -29,7 +29,7 @@ * */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_SALOME_CONFIG # include #endif diff --git a/src/Batch/Batch_BatchManager_Local_SH.cxx b/src/Batch/Batch_BatchManager_Local_SH.cxx index 797f55c42..6eb790933 100644 --- a/src/Batch/Batch_BatchManager_Local_SH.cxx +++ b/src/Batch/Batch_BatchManager_Local_SH.cxx @@ -29,7 +29,7 @@ * */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_SALOME_CONFIG # include #endif diff --git a/src/Batch/Batch_BatchManager_Local_SSH.cxx b/src/Batch/Batch_BatchManager_Local_SSH.cxx index 723f91dbe..59c77fccc 100644 --- a/src/Batch/Batch_BatchManager_Local_SSH.cxx +++ b/src/Batch/Batch_BatchManager_Local_SSH.cxx @@ -29,7 +29,7 @@ * */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_SALOME_CONFIG # include #endif diff --git a/src/Batch/Makefile.am b/src/Batch/Makefile.am index 8d115a68f..75bf277bc 100644 --- a/src/Batch/Makefile.am +++ b/src/Batch/Makefile.am @@ -118,12 +118,7 @@ LIB_SRC = \ Batch_JobInfo_eSGE.cxx \ MpiImpl.cxx - LIB_CPPFLAGS = ${PYTHON_INCLUDES} -if !WITHONLYLAUNCHER - LIB_CPPFLAGS += -I$(top_builddir)/salome_adm/unix -endif - LIB_LIBADD = $(PYTHON_LIBS) # @@ -160,10 +155,6 @@ LIB_SRC +=\ Batch_Job_Local.cxx \ Batch_IOMutex.cxx -if !WITHONLYLAUNCHER - LIB_CPPFLAGS += -DHAVE_CONFIG_H -endif - endif # diff --git a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am index 93fc4ad0b..ef082a8b6 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Makefile.am +++ b/src/DSC/DSC_User/Datastream/Calcium/Makefile.am @@ -89,7 +89,6 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \ -I$(top_srcdir)/src/Utils \ -I$(top_srcdir)/src/Container \ -I$(top_srcdir)/src/Notification \ - -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \ -I$(top_builddir)/idl \ -I$(top_builddir)/src/DSC/DSC_User/Datastream/Calcium \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@