drop-config-h
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
committerAdam C. Powell, IV <hazelsct@debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
Unlike upstream, we do not install config.h since applications
built with OpenCascade may want to ship their own config.h file.
Installed headers must then not #include <config.h>

Unfortunately the situation became worse in 6.5.0, upstream relies
on config.h being included by all files; we have to include
config.h in recently added C++ files.

Gbp-Pq: Name drop-config-h.patch

16 files changed:
ros/Makefile.am
ros/inc/OpenGl_TextRender.hxx
ros/inc/Standard_Macro.hxx
ros/inc/Standard_Stream.hxx
ros/inc/Standard_values.h
ros/inc/Xw_Extension.h
ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx
ros/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
ros/src/Image/Image_PixMap.cxx
ros/src/OSD/OSD.cxx
ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx
ros/src/OpenGl/OpenGl_TextRender.cxx
ros/src/OpenGl/OpenGl_TextRender.hxx
ros/src/OpenGl/OpenGl_attri.cxx
ros/src/Standard/Standard_MMgrTBBalloc.cxx

index 37ae6f2eb81f8961bd94307d25756243356ffaeb..e5ba1d0bb9e2a640c6a93be3f5212f1b8ec4de49 100644 (file)
@@ -106,14 +106,9 @@ install-exec-local:
                cp -fr$(CP_$(platform)) $(top_srcdir)/inc $(DESTDIR)$(prefix); \
        fi; \
        if [ "$$pd" != "$$bd" ]; then \
-               cp -fr$(CP_$(platform)) $$bd/config.h $(DESTDIR)$(prefix); \
                $(INSTALL) -d $(DESTDIR)$(prefix)/inc/arch-6.5.0; \
                cp -f$(CP_$(platform)) $$bd/inc/arch-6.5.0/Standard_Macro64.hxx $(DESTDIR)$(prefix)/inc/arch-6.5.0; \
        fi
-       if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
-               unlink $(DESTDIR)$(prefix)/inc/config.h; \
-       fi
-       cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h 
        bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \
        if [ "$$pd" != "$$sd" -a -d $(top_srcdir)/src/UnitsAPI ]; then \
                $(INSTALL) -d $(DESTDIR)$(prefix)/src; \
index f6ff347264410e5d8c96077b1da3bd2818d07ed6..6bdc003c26ad8f140314b5700897c3ea86f81f4d 100644 (file)
@@ -22,9 +22,7 @@ public:
   void   RenderText( const Standard_Integer id, const char* text);
   void   RenderText( char*, GLuint, int, GLfloat, GLfloat, GLfloat );
   void   ExportText( char* str, char* fontname, GLfloat height, GLfloat angle, GLint alingment, GLfloat x, GLfloat y, GLfloat z, GLboolean is2d );
-#ifdef HAVE_GL2PS
   static void getGL2PSFontName(char *src_font, char *ps_font);
-#endif
   
 private:
 
@@ -32,9 +30,7 @@ private:
   static int curSize  ;
   static int curScale ;
   static int curTexFont ; 
-#ifdef HAVE_GL2PS
   int alignmentforgl2ps(int Hmode, int Vmode);
-#endif
 
   struct FontMapNode 
   {
index 96bae49c74fcce0b8b235ae98864ba33561b850f..0df32b7add8717f75e44e1d0e1467ddd75c9aa0d 100644 (file)
@@ -7,10 +7,6 @@
 #ifndef _Standard_Macro_HeaderFile
 # define _Standard_Macro_HeaderFile
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
-
 // Standard OCC macros: Handle(), STANDARD_TYPE()
 # define   Handle(ClassName)  Handle_##ClassName
 # define   STANDARD_TYPE(aType)   aType##_Type_()
index 5cd5666334fc00cfea557ea8eb4b1d98ac331ab2..9ffb0138fc457180ef77f2661fce30cd4015da6e 100644 (file)
 // Unix variant
 #ifndef WNT
 
-#ifdef HAVE_IOSTREAM
   #include <iostream>
   #define USE_STL_STREAM
-#elif defined (HAVE_IOSTREAM_H)
-  #include <iostream.h>
-#else
-  #error "check config.h file or compilation options: either HAVE_IOSTREAM or HAVE_IOSTREAM_H should be defined"
-#endif
 
-#ifdef HAVE_IOMANIP
   #include <iomanip>
-#elif defined (HAVE_IOMANIP_H)
-  #include <iomanip.h>
-#endif
 
-#ifdef HAVE_FSTREAM
   #include <fstream>
-#elif defined (HAVE_FSTREAM_H)
-  #include <fstream.h>
-#endif
 
 // Windows variant
 #else /* WNT */
index 917255b5b12cc3b75b8066caf6653a24ab7740ce..623800a1a5675887057a7a8b77d29fee61f13627 100644 (file)
@@ -23,17 +23,7 @@ Facility : CAS-CADE V1.3A
 #endif
 
 #ifndef WNT
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_LIMITS
-# include <limits>
-#elif defined (HAVE_LIMITS_H)
 # include <limits.h>
-#else
-#error "check config.h file or compilation options: either HAVE_LIMITS or HAVE_LIMITS_H should be defined"
-#endif
 #endif
 
 
index 57023a8a4c8ac81c16639927dc4366caed3b9c02..df6f35b916fbb0e05c3f1b278115bd5b796d19d2 100644 (file)
 #define min(a,b)       (a>b ? b : a)
 #endif
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #ifdef HAVE_X11_EXTENSIONS_TRANSOLV_H
 #include <X11/extensions/transovl.h>
 #endif
index f75c47d15b2cc370a70d753e452620ca4a9b3692..4a0488593283dc69b41757e188ada8404eb4aaa3 100644 (file)
 
 #include <vector>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 // NOTE: replaced by more correct check
 // #if defined(WNT) || defined(LIN)
 // #define HAVE_TBB 1
index dd3763e0914faaad7eecea6099221d3251375a7f..a95cab8e161e173259d3714b61099a8d5545e75a 100644 (file)
 
 #include <vector>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 // NOTE: to be replaced by more correct check
 // #if defined(WNT) || defined(LIN)
 // #define HAVE_TBB 1
index 9633e8952f4842bc717c43b19ad604540f9951ea..c43b51bd0fc2c084d2362fe86cba7ee00612f670 100644 (file)
 #include <TDocStd_Document.hxx>
 #include <TDocStd_Owner.hxx>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #define SHAPESECTION_POS "SHAPE_SECTION_POS:"
 #define SIZEOFSHAPELABEL  18
 
index 22f64f3fef5b88338a27e5eabc729aa4829883b4..c48d837aebc928a56ee9f3b5a0c83000e55e2b6e 100644 (file)
@@ -3,6 +3,10 @@
 // Author     KGV
 // Copyright  OpenCASCADE 2010
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifdef HAVE_FREEIMAGE
   #include <FreeImagePlus.h>
   #include <Image_PixMap.ixx>
index 13782d4f19c58f8af7449f193ef3b9391287ec8f..58e75b1fab248305dc4e95d36a0375c221022e42 100644 (file)
@@ -1,6 +1,10 @@
 
 #include <OSD.ixx>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <math.h>
 #if HAVE_IEEEFP_H
index 0f57d20b63373175f56554b7bf08a2172abe51d5..d17480feaeadbdbf2dc810daff3565b380596552 100644 (file)
@@ -5,6 +5,10 @@
 #include <OpenGl_GraphicDriver.jxx>
 #include <OSD_Localizer.hxx>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifdef HAVE_GL2PS
 #include <gl2ps.h>
 #endif
index 85760417aee700da69651c56f03dc61fdaa7a453..2acbadd9487f525f7d30bffe60223a2ba507f387 100644 (file)
 #include <Quantity_NameOfColor.hxx>
 #include <AlienImage.hxx>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #ifdef HAVE_GL2PS
 #include <gl2ps.h>
 #endif
index 8edfb6a84236633c5a272216e8cc8da450c0ce0e..8a28d0fd7293bec2225f8e892e184f2459f522ad 100644 (file)
@@ -22,9 +22,7 @@ public:
   void   RenderText( const Standard_Integer id, const char* text);
   void   RenderText( char*, GLuint, int, GLfloat, GLfloat, GLfloat );
   void   ExportText( char* str, char* fontname, GLfloat height, GLfloat angle, GLint alingment, GLfloat x, GLfloat y, GLfloat z, GLboolean is2d );
-#ifdef HAVE_GL2PS
   static void getGL2PSFontName(char *src_font, char *ps_font);
-#endif
   
 private:
 
@@ -32,9 +30,7 @@ private:
   static int curSize  ;
   static int curScale ;
   static int curTexFont ; 
-#ifdef HAVE_GL2PS
   int alignmentforgl2ps(int Hmode, int Vmode);
-#endif
 
   struct FontMapNode 
   {
index 9739ba6e963770acecda08bb0c0fe9c8fc80ef09..0e95e4a99bb16d55b01815cdda79a27baa8cb8f9 100644 (file)
@@ -93,6 +93,10 @@ used in immediat mode context.
 #define NO_TRACE_MATRIX     
 #define NO_TRACE_TEXT       
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 /*----------------------------------------------------------------------*/
 /*
 * Includes
index ad4ee431025d2b29a10f119df50170159c124d79..dbc7ef99b67366b2ecbc846a025511ff8f3bf6fc 100644 (file)
@@ -5,6 +5,10 @@
 #include <Standard_MMgrTBBalloc.hxx>
 #include <Standard_OutOfMemory.hxx>
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 // NOTE: replaced by more correct check
 //#if defined(WNT) || defined(LIN)
 //#define HAVE_TBB 1