summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Mużyło <galtgendo@o2.pl>2011-08-03 17:05:14 +0200
committerMatt Turner <mattst88@gmail.com>2011-08-03 17:15:28 -0400
commitd5fc71efc7cb10728b1cfbadc16afef22b2ca12f (patch)
treec1527607fb653018de1554b92be88f26e81584cd
parentd651581036e9ee0048c6c25b37fb0f7b9e87789b (diff)
use four build time defines
Signed-off-by: Rafał Mużyło <galtgendo@o2.pl> Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--configure.ac25
-rw-r--r--include/Makefile.am19
-rw-r--r--src/Makefile.am17
3 files changed, 47 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index ac67a22..3e1bead 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,31 @@ PKG_CHECK_MODULES(X11, [x11 xt xmu])
AC_CHECK_HEADERS([wctype.h wchar.h widec.h])
AC_CHECK_FUNCS([iswspace])
+XAW3D_CFLAGS=
+
+AC_ARG_ENABLE([internationalization],
+ [AS_HELP_STRING([--enable-internationalization], dnl
+ [enable utf8 strings])], [XAW3D_CFLAGS="${XAW3D_CFLAGS} -DXAW_INTERNATIONALIZATION"])
+
+AM_CONDITIONAL(XAW_INTERNATIONALIZATION,
+ [test x${enable_internationalization} = xyes])
+
+AC_ARG_ENABLE([multiplane-bitmaps],
+ [AS_HELP_STRING([--enable-multiplane-bitmaps], dnl
+ [enable XPM support])],
+ [XAW3D_CFLAGS="${XAW3D_CFLAGS} -DXAW_MULTIPLANE_PIXMAPS" dnl
+ PKG_CHECK_MODULES(XPM, xpm)])
+
+AC_ARG_ENABLE([gray-stipples],
+ [AS_HELP_STRING([--enable-gray-stipples], dnl
+ [enable gray stipples])], [XAW3D_CFLAGS="${XAW3D_CFLAGS} -DXAW_GRAY_BLKWHT_STIPPLES"])
+
+AC_ARG_ENABLE([arrow-scrollbars],
+ [AS_HELP_STRING([--enable-arrow-scrollbars], dnl
+ [enable arrow scrollbars])], [XAW3D_CFLAGS="${XAW3D_CFLAGS} -DXAW_ARROW_SCROLLBARS"])
+
+AC_SUBST(XAW3D_CFLAGS)
+
AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile])
diff --git a/include/Makefile.am b/include/Makefile.am
index a7c73f5..2037424 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,15 @@
xaw3dincludedir=${includedir}
+if XAW_INTERNATIONALIZATION
+I18N_HDRS = \
+ X11/Xaw3d/MultiSrc.h \
+ X11/Xaw3d/MultiSrcP.h \
+ X11/Xaw3d/MultiSink.h \
+ X11/Xaw3d/MultiSinkP.h \
+ X11/Xaw3d/VendorEP.h \
+ X11/Xaw3d/XawImP.h
+endif
+
xaw3dinclude_HEADERS = \
X11/Xaw3d/AllWidgets.h \
X11/Xaw3d/AsciiSink.h \
@@ -27,10 +37,6 @@ xaw3dinclude_HEADERS = \
X11/Xaw3d/ListP.h \
X11/Xaw3d/MenuButton.h \
X11/Xaw3d/MenuButtoP.h \
- X11/Xaw3d/MultiSink.h \
- X11/Xaw3d/MultiSinkP.h \
- X11/Xaw3d/MultiSrc.h \
- X11/Xaw3d/MultiSrcP.h \
X11/Xaw3d/Paned.h \
X11/Xaw3d/PanedP.h \
X11/Xaw3d/Panner.h \
@@ -70,12 +76,11 @@ xaw3dinclude_HEADERS = \
X11/Xaw3d/ToggleP.h \
X11/Xaw3d/Tree.h \
X11/Xaw3d/TreeP.h \
- X11/Xaw3d/VendorEP.h \
X11/Xaw3d/Viewport.h \
X11/Xaw3d/ViewportP.h \
X11/Xaw3d/Xaw3dP.h \
- X11/Xaw3d/XawImP.h \
- X11/Xaw3d/XawInit.h
+ X11/Xaw3d/XawInit.h \
+ $(I18N_HDRS)
EXTRA_DIST = \
X11/Xaw3d/Template.h \
diff --git a/src/Makefile.am b/src/Makefile.am
index a559632..88f01d9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,6 +8,10 @@ lib_LTLIBRARIES = libXaw3d.la
#
# SHAREDLIB_SOURCES = sharedlib.c
+if XAW_INTERNATIONALIZATION
+I18N_SRCS = MultiSrc.c MultiSink.c XawIm.c XawI18n.c XawI18n.h
+endif
+
libXaw3d_la_SOURCES = \
AllWidgets.c \
AsciiSink.c \
@@ -22,8 +26,6 @@ libXaw3d_la_SOURCES = \
Layout.c \
List.c \
MenuButton.c \
- MultiSink.c \
- MultiSrc.c \
Paned.c \
Panner.c \
Porthole.c \
@@ -49,21 +51,22 @@ libXaw3d_la_SOURCES = \
Vendor.c \
Viewport.c \
Xaw3dP.c \
- XawI18n.c \
- XawIm.c \
XawInit.c \
laygram.y \
- laylex.l
+ laylex.l \
+ $(I18N_SRCS)
libXaw3d_la_CFLAGS = \
- $(CWARNFLAGS) $(X11_CFLAGS)
+ $(CWARNFLAGS)
libXaw3d_la_LIBADD = \
- $(X11_LIBS)
+ $(X11_LIBS) $(XPM_LIBS)
libXaw3d_la_CPPFLAGS = \
-I${top_srcdir}/include \
-I${top_srcdir}/include/X11/Xaw3d \
+ $(XAW3D_CFLAGS) \
+ $(X11_CFLAGS) $(XPM_CFLAGS) \
-DPROJECT_ROOT=\"$(prefix)\"
libXaw3d_la_LDFLAGS = -version-info 8:0:0 -no-undefined