summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-08-01 23:52:31 -0400
committerMatt Turner <mattst88@gmail.com>2011-08-01 23:52:31 -0400
commit85bdcab66a56ca93a7eee0eadf12a90056dfa41d (patch)
tree908fb38b78c57e5bb0e088a67c73e7cde6ee164f /src
parent892b45fdb681a18c7ecaf456457fd7e4c588998d (diff)
Replace Imake with autotools build system.
Partially based on the work of David Leverton <levertond@googlemail.com> Rafał Mużyło <galtgendo@o2.pl> https://bugs.gentoo.org/show_bug.cgi?id=290410 Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/Imakefile157
-rw-r--r--src/Imakefrag.X11R533
-rw-r--r--src/Makefile.am86
3 files changed, 86 insertions, 190 deletions
diff --git a/src/Imakefile b/src/Imakefile
deleted file mode 100644
index 81e9a0a..0000000
--- a/src/Imakefile
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifndef XCOMM
-#define XCOMM #
-#endif
-
-XCOMM Build options. Have you read the README.XAW3D file yet?
-XCOMM
-XCOMM For color pixmaps, define MULTIPLANE_PIXMAPS:
-#undef MULTIPLANE_PIXMAPS
-XCOMM For grayed stipple shadows, define GRAY_BLKWHT_STIPPLES:
-#define GRAY_BLKWHT_STIPPLES
-XCOMM For scrollbars with arrows, define ARROW_SCROLLBARS:
-#undef ARROW_SCROLLBARS
-
-#define DoNormalLib NormalLibXaw
-#define DoSharedLib SharedLibXaw
-#define DoDebugLib DebugLibXaw
-#define DoProfileLib ProfileLibXaw
-#define HasSharedData YES
-#define LibName Xaw3d
-#define SoRev SOXAWREV
-#define IncSubdir X11
-#define IncSubSubdir Xaw3d
-
-XCOMM When building outside an X11 source tree:
-XCOMM EXTRA_INCLUDES = -I.
-
-#ifdef SharedXawReqs
-REQUIREDLIBS = SharedXawReqs
-#endif
-
-LINTLIBS = $(LINTXLIB) $(LINTXTOOL)
-
-BASE_HDRS = AllWidgets.h AsciiSink.h AsciiSinkP.h AsciiSrc.h AsciiSrcP.h \
- AsciiText.h AsciiTextP.h Box.h BoxP.h Cardinals.h Command.h \
- CommandP.h Dialog.h DialogP.h Form.h FormP.h Grip.h GripP.h \
- Label.h LabelP.h Layout.h LayoutP.h List.h ListP.h MenuButton.h \
- MenuButtoP.h Paned.h PanedP.h Panner.h PannerP.h Porthole.h \
- PortholeP.h Repeater.h RepeaterP.h Reports.h Scrollbar.h \
- ScrollbarP.h Simple.h SimpleP.h SimpleMenu.h SimpleMenP.h Sme.h \
- SmeP.h SmeBSB.h SmeBSBP.h SmeLine.h SmeLineP.h SmeThreeD.h \
- SmeThreeDP.h StripChart.h StripCharP.h Template.c Template.h \
- TemplateP.h Text.h TextP.h TextSink.h TextSinkP.h TextSrc.h \
- TextSrcP.h ThreeD.h ThreeDP.h Tip.h TipP.h Toggle.h ToggleP.h \
- Tree.h TreeP.h Viewport.h ViewportP.h Xaw3dP.h XawInit.h
-
-I18N_HDRS = MultiSrc.h MultiSrcP.h MultiSink.h MultiSinkP.h VendorEP.h \
- XawImP.h
-
-BASE_SRCS = AllWidgets.c AsciiSink.c AsciiSrc.c AsciiText.c Box.c \
- Command.c Dialog.c Form.c Grip.c Label.c Layout.c List.c \
- MenuButton.c Paned.c Panner.c Porthole.c Repeater.c Scrollbar.c \
- Simple.c SimpleMenu.c Sme.c SmeBSB.c SmeLine.c SmeThreeD.c \
- StripChart.c Text.c TextSink.c TextSrc.c TextAction.c TextPop.c \
- TextTr.c ThreeD.c Tip.c Toggle.c Tree.c Vendor.c Viewport.c \
- Xaw3dP.c XawInit.c sharedlib.c laygram.c laylex.c
-
-I18N_SRCS = MultiSrc.c MultiSink.c XawIm.c XawI18n.c
-
-#if SharedDataSeparation
-UNSHAREDOBJS = AllWidgets.o sharedlib.o
-#endif
-
-BASE_OBJS = AllWidgets.o AsciiSink.o AsciiSrc.o AsciiText.o Box.o \
- Command.o Dialog.o Form.o Grip.o Label.o Layout.o List.o \
- MenuButton.o Paned.o Panner.o Porthole.o Repeater.o Scrollbar.o \
- Simple.o SimpleMenu.o Sme.o SmeBSB.o SmeLine.o SmeThreeD.o \
- StripChart.o Text.o TextSink.o TextSrc.o TextAction.o TextPop.o \
- TextTr.o ThreeD.o Tip.o Toggle.o Tree.o Vendor.o Viewport.o \
- Xaw3dP.o XawInit.o laygram.o laylex.o
-
-I18N_OBJS = MultiSrc.o MultiSink.o XawIm.o XawI18n.o
-
-#ifdef XawI18nDefines
-#define INTERNATIONALIZATION
-HEADERS = $(BASE_HDRS) $(I18N_HDRS)
-SRCS = $(BASE_SRCS) $(I18N_SRCS)
-OBJS = $(BASE_OBJS) $(I18N_OBJS)
-#else
-#undef INTERNATIONALIZATION
-HEADERS = $(BASE_HDRS)
-SRCS = $(BASE_SRCS)
-OBJS = $(BASE_OBJS)
-#endif
-
-#include <Library.tmpl>
-
-#if DoSharedLib && SharedDataSeparation
-SpecialCObjectRule(sharedlib.o,NullParameter,$(SHLIBDEF))
-#endif
-
-XCOMM At least one X11R5 distribution needs this:
-XCOMM #include "Imakefrag.X11R5"
-
-#ifdef LexCmd
-LEX = LexCmd
-#endif
-#ifdef YaccCmd
-YACC = YaccCmd
-#endif
-
-#ifdef INTERNATIONALIZATION
-XAW_INTERNATIONALIZATION = \
- -e 's/\/\* I18n support \*\//\#define XAW_INTERNATIONALIZATION/'
-#else
-XAW_INTERNATIONALIZATION = \
- -e 's/\/\* I18n support \*\//\#undef XAW_INTERNATIONALIZATION/'
-#endif
-#ifdef MULTIPLANE_PIXMAPS
-XAW_MULTIPLANE_PIXMAPS = \
- -e 's/\/\* XPM support \*\//\#define XAW_MULTIPLANE_PIXMAPS/'
-#else
-XAW_MULTIPLANE_PIXMAPS = \
- -e 's/\/\* XPM support \*\//\#undef XAW_MULTIPLANE_PIXMAPS/'
-#endif
-#ifdef GRAY_BLKWHT_STIPPLES
-XAW_GRAY_BLKWHT_STIPPLES = \
- -e 's/\/\* gray stipples \*\//\#define XAW_GRAY_BLKWHT_STIPPLES/'
-#else
-XAW_GRAY_BLKWHT_STIPPLES = \
- -e 's/\/\* gray stipples \*\//\#undef XAW_GRAY_BLKWHT_STIPPLES/'
-#endif
-#ifdef ARROW_SCROLLBARS
-XAW_ARROW_SCROLLBARS = \
- -e 's/\/\* arrow scrollbars \*\//\#define XAW_ARROW_SCROLLBARS/'
-#else
-XAW_ARROW_SCROLLBARS = \
- -e 's/\/\* arrow scrollbars \*\//\#undef XAW_ARROW_SCROLLBARS/'
-#endif
-
-depend:: laygram.c laygram.h laylex.c Xaw3dP.h
-
-clean::
- $(RM) laygram.c laygram.h laylex.c Xaw3dP.h
-
-distclean::
- LibCleanDir(X11)
-
-laygram.c: laygram.y
- $(YACC) -d laygram.y
- sed -e 's/yy/LayYY/g' y.tab.c > laygram.c
- sed -e 's/yy/LayYY/g' y.tab.h > laygram.h
- $(RM) y.tab.c y.tab.h
-
-laylex.c: laylex.l
- $(LEX) laylex.l
- sed -e 's/yy/LayYY/g' lex.yy.c > laylex.c
- $(RM) lex.yy.c
-
-Xaw3dP.h: Xaw3dP.h.sed
- sed $(XAW_INTERNATIONALIZATION) $(XAW_MULTIPLANE_PIXMAPS) \
- $(XAW_GRAY_BLKWHT_STIPPLES) $(XAW_ARROW_SCROLLBARS) \
- Xaw3dP.h.sed > Xaw3dP.h
-
-$(OBJS): Xaw3dP.h
-
-DependTarget()
-
diff --git a/src/Imakefrag.X11R5 b/src/Imakefrag.X11R5
deleted file mode 100644
index 6c26ddc..0000000
--- a/src/Imakefrag.X11R5
+++ /dev/null
@@ -1,33 +0,0 @@
-XCOMM make rules for X11R5 -------------------------------
-
-#if DoSharedLib
-#if DoNormalLib
-SharedLibraryTarget(Xaw3d,$(SOXAWREV),$(OBJS),shared,..)
-#else
-SharedLibraryTarget(Xaw3d,$(SOXAWREV),$(OBJS),.,.)
-#endif
-SharedLibraryDataTarget(Xaw3d,$(SOXAWREV),$(UNSHAREDOBJS))
-InstallSharedLibrary(Xaw3d,$(SOXAWREV),$(USRLIBDIR))
-InstallSharedLibraryData(Xaw3d,$(SOXAWREV),$(USRLIBDIR))
-#endif
-#if DoNormalLib
-NormalLibraryTarget(Xaw3d,$(OBJS))
-InstallLibrary(Xaw3d,$(USRLIBDIR))
-#endif
-#if DoProfileLib
-ProfiledLibraryTarget(Xaw3d,$(OBJS))
-InstallLibrary(Xaw3d_p,$(USRLIBDIR))
-#endif
-#if DoDebugLib
-DebuggedLibraryTarget(Xaw3d,$(OBJS))
-InstallLibrary(Xaw3d_d,$(USRLIBDIR))
-#endif
-
-LintLibraryTarget(Xaw3d,$(SRCS))
-InstallLintLibrary(Xaw3d,$(LINTLIBDIR))
-
-BuildIncludes($(HEADERS),Xaw3d,..)
-
-InstallMultiple($(HEADERS),$(INCDIR)/Xaw3d)
-
-XCOMM end make rules for X11R5 ---------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..e3469eb
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,86 @@
+lib_LTLIBRARIES = libXaw3d.la
+
+#
+# This doesn't appear to be used on any
+# current systems -- it requires SUNSHLIB and !SHAREDCODE,
+# but only sunLib.rules defines SUNSHLIB and that file also
+# always defines SHAREDCODE. Go figure
+#
+# SHAREDLIB_SOURCES = sharedlib.c
+
+libXaw3d_la_SOURCES = \
+ AllWidgets.c \
+ AsciiSink.c \
+ AsciiSrc.c \
+ AsciiText.c \
+ Box.c \
+ Command.c \
+ Dialog.c \
+ Form.c \
+ Grip.c \
+ Label.c \
+ Layout.c \
+ List.c \
+ MenuButton.c \
+ MultiSink.c \
+ MultiSrc.c \
+ Paned.c \
+ Panner.c \
+ Porthole.c \
+ Repeater.c \
+ Scrollbar.c \
+ sharedlib.c \
+ Simple.c \
+ SimpleMenu.c \
+ SmeBSB.c \
+ Sme.c \
+ SmeLine.c \
+ SmeThreeD.c \
+ StripChart.c \
+ Template.c \
+ TextAction.c \
+ Text.c \
+ TextPop.c \
+ TextSink.c \
+ TextSrc.c \
+ TextTr.c \
+ ThreeD.c \
+ Tip.c \
+ Toggle.c \
+ Tree.c \
+ Vendor.c \
+ Viewport.c \
+ Xaw3dP.c \
+ XawI18n.c \
+ XawIm.c \
+ XawInit.c
+
+libXaw3d_la_CFLAGS = \
+ $(CWARNFLAGS)
+
+libXaw3d_la_CPPFLAGS = \
+ -I${top_srcdir}/include \
+ -I${top_srcdir}/include/X11/Xaw3d \
+ -DPROJECT_ROOT=\"$(prefix)\"
+
+libXaw3d_la_LDFLAGS = -version-info 8:0:0 -no-undefined
+
+if !PLATFORM_WIN32
+install-exec-hook::
+if PLATFORM_DARWIN
+ -rm -f $(DESTDIR)$(libdir)/libXaw3d.8.@LIBEXT@
+ (cd $(DESTDIR)$(libdir) && ln -s libXaw3d.8.@LIBEXT@ libXaw3d.8.@LIBEXT@)
+else
+ -rm -f $(DESTDIR)$(libdir)/libXaw3d.@LIBEXT@.8
+ (cd $(DESTDIR)$(libdir) && ln -s libXaw3d.@LIBEXT@.8 libXaw3d.@LIBEXT@.8)
+endif
+
+uninstall-local::
+if PLATFORM_DARWIN
+ -rm -f $(DESTDIR)$(libdir)/libXaw3d.8.@LIBEXT@
+else
+ -rm -f $(DESTDIR)$(libdir)/libXaw3d.@LIBEXT@.8
+endif
+endif
+
+EXTRA_DIST = sharedlib.c