]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined
authorvsr <vsr@opencascade.com>
Thu, 13 Aug 2009 04:50:10 +0000 (04:50 +0000)
committervsr <vsr@opencascade.com>
Thu, 13 Aug 2009 04:50:10 +0000 (04:50 +0000)
configure.ac
idl/Makefile.am
salome_adm/unix/SALOMEconfig.ref.in
salome_adm/unix/make_common_starter.am
src/Batch/Batch_BatchManager_Local_RSH.cxx
src/Batch/Batch_BatchManager_Local_SH.cxx
src/Batch/Batch_BatchManager_Local_SSH.cxx
src/Batch/Makefile.am
src/DSC/DSC_User/Datastream/Calcium/Makefile.am

index ee29069197711abb0bfb60c04a5a6ce4bcf699da..724fe66b545d679fdd4b102c208c55ecef5eca5e 100644 (file)
@@ -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
 
 # ----------------------------------------------------------------------------
 
index ee74ca5867d756b6510a7c8000acf8deb8c743cc..bc2535a660519c034b8543b02017cf762be31865 100644 (file)
@@ -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
index add14555f74d00ba096edb231e73772c4f97f6cb..9849e32b461f07c4854c26282fb5ccbe28bdbee7 100644 (file)
 //  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
 #ifdef PACKAGE_VERSION
 #undef PACKAGE_VERSION
 #endif
+#ifdef VERSION
+#undef VERSION
+#endif
 
 #ifdef _POSIX_C_SOURCE
 #undef _POSIX_C_SOURCE
 #endif
-
-#endif
index 13a4014ad9905cf026d87a075f3fa0da87ad83da..deb5ea9b3a2ac3e6075eed034e596bf2355640b6 100644 (file)
 #
 #  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
index 5165ba9811292fd04e7ee9dfe2bc3c5543ba1561..9392f8d633a1295410ecb5662d471430e6cf39b6 100644 (file)
@@ -29,7 +29,7 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_SALOME_CONFIG
 #  include <SALOMEconfig.h>
 #endif
 
index 797f55c4295e8f3aab1ec7118887952691f036a3..6eb7909334fcc0b66a57725ec8769e1aa0bda118 100644 (file)
@@ -29,7 +29,7 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_SALOME_CONFIG
 #  include <SALOMEconfig.h>
 #endif
 
index 723f91dbe9140e0aad134c63f400cb6ee7eede74..59c77fccc9f6c36f8eb0447a80c1bbd89e6244ed 100644 (file)
@@ -29,7 +29,7 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_SALOME_CONFIG
 #  include <SALOMEconfig.h>
 #endif
 
index 8d115a68fff492db3fc6de0d83d932b51157c999..75bf277bc83e5fa3203a0155fdb290a136499089 100644 (file)
@@ -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
 
 #
index 93fc4ad0b78705f873dd76692b8e7fd4e87053c5..ef082a8b679d322c289f6fde0313b2b5ad47be90 100644 (file)
@@ -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@