[PATCH xaw3d 2/2] Restore recording of build options in Xaw3dP.h

Javier Pello javier.pello at urjc.es
Mon May 6 04:09:14 PDT 2013


Xaw3d 1.5 had special magic in Imakefile to record the options
with which the library was built (internationalization, xpm support,
gray stipples, arrow scrollbars) in Xaw3dP.h, but this was lost in
commits 892b45fdb681a18c7ecaf456457fd7e4c588998d and
85bdcab66a56ca93a7eee0eadf12a90056dfa41d. Restore this behaviour by
making Xaw3dP.h be generated at configure time, so that old packages
continue to build against newer libXaw3d.

Signed-off-by: Javier Pello <javier.pello at urjc.es>
---
 .gitignore                                  |  1 +
 configure.ac                                | 12 ++++++++----
 include/Makefile.am                         |  4 +++-
 include/X11/Xaw3d/{Xaw3dP.h => Xaw3dP.h.in} |  8 ++++----
 4 files changed, 16 insertions(+), 9 deletions(-)
 rename include/X11/Xaw3d/{Xaw3dP.h => Xaw3dP.h.in} (94%)

diff --git a/.gitignore b/.gitignore
index 2f10f060..c569ad9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,3 +76,4 @@ core
 #		Edit the following section as needed
 # For example, !report.pc overrides *.pc. See 'man gitignore'
 #
+include/X11/Xaw3d/Xaw3dP.h
diff --git a/configure.ac b/configure.ac
index 32e21e97..59e0fb72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ([2.60])
 AC_INIT([libXaw3d], [1.6.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw3d])
 AC_CONFIG_SRCDIR([Makefile.am])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([config.h include/X11/Xaw3d/Xaw3dP.h])
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -43,6 +43,7 @@ AC_ARG_ENABLE([internationalization],
     [XAW_I18N=$enableval], [XAW_I18N=yes])
 if test "x$XAW_I18N" = xyes; then
     XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_INTERNATIONALIZATION"
+    AC_DEFINE([XAW_INTERNATIONALIZATION], [], [I18n support])
 fi
 AM_CONDITIONAL(XAW_INTERNATIONALIZATION, [test "x$XAW_I18N" = xyes])
 
@@ -52,7 +53,8 @@ AC_ARG_ENABLE([multiplane-bitmaps],
     [enable_multiplane_bitmaps=no])
 
 AS_IF([test "x$enable_multiplane_bitmaps" != xno],
-     [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_MULTIPLANE_PIXMAPS" dnl
+    [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_MULTIPLANE_PIXMAPS"
+      AC_DEFINE([XAW_MULTIPLANE_PIXMAPS], [], [XPM support])
       PKG_CHECK_MODULES(XPM, xpm)])
 
 AC_ARG_ENABLE([gray-stipples],
@@ -61,7 +63,8 @@ AC_ARG_ENABLE([gray-stipples],
     [enable_gray_stipples=no])
 
 AS_IF([test "x$enable_gray_stipples" != xno],
-    [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_GRAY_BLKWHT_STIPPLES"])
+    [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_GRAY_BLKWHT_STIPPLES"
+      AC_DEFINE([XAW_GRAY_BLKWHT_STIPPLES], [], [gray stipples])])
 
 AC_ARG_ENABLE([arrow-scrollbars],
     [AS_HELP_STRING([--enable-arrow-scrollbars], [enable arrow scrollbars])],
@@ -69,7 +72,8 @@ AC_ARG_ENABLE([arrow-scrollbars],
     [enable_arrow_scrollbars=no])
 
 AS_IF([test "x$enable_arrow_scrollbars" != xno],
-    [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_ARROW_SCROLLBARS"])
+    [XAW3D_CPPFLAGS="${XAW3D_CPPFLAGS} -DXAW_ARROW_SCROLLBARS"
+      AC_DEFINE([XAW_ARROW_SCROLLBARS], [], [arrow scrollbars])])
 
 AC_SUBST(XAW3D_CPPFLAGS)
 
diff --git a/include/Makefile.am b/include/Makefile.am
index 56824af6..1fa77345 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,8 @@
 xaw3dincludedir=${includedir}/X11/Xaw3d
 
+nodist_xaw3dinclude_HEADERS = \
+	X11/Xaw3d/Xaw3dP.h
+
 if XAW_INTERNATIONALIZATION
 I18N_HDRS = \
        X11/Xaw3d/MultiSrc.h \
@@ -78,7 +81,6 @@ xaw3dinclude_HEADERS = \
 	X11/Xaw3d/TreeP.h \
 	X11/Xaw3d/Viewport.h \
 	X11/Xaw3d/ViewportP.h \
-	X11/Xaw3d/Xaw3dP.h \
 	X11/Xaw3d/XawInit.h \
 	$(I18N_HDRS)
 
diff --git a/include/X11/Xaw3d/Xaw3dP.h b/include/X11/Xaw3d/Xaw3dP.h.in
similarity index 94%
rename from include/X11/Xaw3d/Xaw3dP.h
rename to include/X11/Xaw3d/Xaw3dP.h.in
index 9082fbff..d2f8af25 100644
--- a/include/X11/Xaw3d/Xaw3dP.h
+++ b/include/X11/Xaw3d/Xaw3dP.h.in
@@ -33,10 +33,10 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <X11/IntrinsicP.h>
 
 /* These are set during the build to reflect capability and options. */
-/* I18n support */
-/* XPM support */
-/* gray stipples */
-/* arrow scrollbars */
+#undef XAW_INTERNATIONALIZATION
+#undef XAW_MULTIPLANE_PIXMAPS
+#undef XAW_GRAY_BLKWHT_STIPPLES
+#undef XAW_ARROW_SCROLLBARS
 
 #ifndef XtX
 #define XtX(w)			(((RectObj)w)->rectangle.x)
-- 
1.8.2



More information about the xorg-devel mailing list