summaryrefslogtreecommitdiff
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
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>
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac63
-rw-r--r--include/Makefile.am80
-rw-r--r--src/Imakefile157
-rw-r--r--src/Imakefrag.X11R533
-rw-r--r--src/Makefile.am86
6 files changed, 236 insertions, 190 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..1d2a450
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = include src
+
+install-exec-hook:
+ cd $(DESTDIR)$(libdir) && rm -f libXaw3d.@LIBEXT@ && $(LN_S) $(DEFAULT_LIB) libXaw3d.@LIBEXT@
+
+uninstall-local:
+ -rm -f $(DESTDIR)$(libdir)/libXaw3d.@LIBEXT@
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..5a25149
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,63 @@
+
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([libXaw3d], [1.5E])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Initialize libtool
+AC_PROG_LIBTOOL
+
+# Some compilers do not support per target -c and -o flags
+AM_PROG_CC_C_O
+
+# Checks for programs.
+
+# Need to call this explicitly since the first call to PKG_CHECK_MODULES
+# is in an if statement, and later calls would break if it's skipped.
+PKG_PROG_PKG_CONFIG
+
+#
+# fix libtool to set SONAME to libXaw3d.so.$major
+#
+AC_CONFIG_COMMANDS([libtool_hack], [
+ cp -f libtool libtool_
+ test -z "$SED" && SED=sed
+ $SED '1,/^soname_spec/{
+/^soname_spec/i\
+# X.Org hack to match monolithic Xaw SONAME\
+xorglibxawname="libXaw3d"
+/^soname_spec/s/libname/xorglibxawname/
+}' libtool_ > libtool
+ rm -f libtool_
+])
+
+# OSX/Win32 rules are different.
+platform_win32=no
+platform_darwin=no
+LIBEXT=so
+case $host_os in
+ cygwin*|mingw*)
+ LIBEXT=dll.a
+ platform_win32=yes
+ ;;
+ darwin*)
+ LIBEXT=dylib
+ platform_darwin=yes
+ ;;
+esac
+AC_SUBST(LIBEXT)
+AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes")
+AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes")
+
+# Checks for header files.
+AC_CHECK_HEADERS([wctype.h wchar.h widec.h])
+
+AC_CONFIG_FILES([Makefile
+ include/Makefile
+ src/Makefile])
+
+AC_OUTPUT
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..7996061
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,80 @@
+xaw3dincludedir=${includedir}
+
+xaw3dinclude_HEADERS = \
+ X11/Xaw3d/AllWidgets.h \
+ X11/Xaw3d/AsciiSink.h \
+ X11/Xaw3d/AsciiSinkP.h \
+ X11/Xaw3d/AsciiSrc.h \
+ X11/Xaw3d/AsciiSrcP.h \
+ X11/Xaw3d/AsciiText.h \
+ X11/Xaw3d/AsciiTextP.h \
+ X11/Xaw3d/Box.h \
+ X11/Xaw3d/BoxP.h \
+ X11/Xaw3d/Cardinals.h \
+ X11/Xaw3d/Command.h \
+ X11/Xaw3d/CommandP.h \
+ X11/Xaw3d/Dialog.h \
+ X11/Xaw3d/DialogP.h \
+ X11/Xaw3d/Form.h \
+ X11/Xaw3d/FormP.h \
+ X11/Xaw3d/Grip.h \
+ X11/Xaw3d/GripP.h \
+ X11/Xaw3d/Label.h \
+ X11/Xaw3d/LabelP.h \
+ X11/Xaw3d/Layout.h \
+ X11/Xaw3d/LayoutP.h \
+ X11/Xaw3d/List.h \
+ 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 \
+ X11/Xaw3d/PannerP.h \
+ X11/Xaw3d/Porthole.h \
+ X11/Xaw3d/PortholeP.h \
+ X11/Xaw3d/Repeater.h \
+ X11/Xaw3d/RepeaterP.h \
+ X11/Xaw3d/Reports.h \
+ X11/Xaw3d/Scrollbar.h \
+ X11/Xaw3d/ScrollbarP.h \
+ X11/Xaw3d/Simple.h \
+ X11/Xaw3d/SimpleMenP.h \
+ X11/Xaw3d/SimpleMenu.h \
+ X11/Xaw3d/SimpleP.h \
+ X11/Xaw3d/SmeBSB.h \
+ X11/Xaw3d/SmeBSBP.h \
+ X11/Xaw3d/Sme.h \
+ X11/Xaw3d/SmeLine.h \
+ X11/Xaw3d/SmeLineP.h \
+ X11/Xaw3d/SmeP.h \
+ X11/Xaw3d/SmeThreeD.h \
+ X11/Xaw3d/SmeThreeDP.h \
+ X11/Xaw3d/StripCharP.h \
+ X11/Xaw3d/StripChart.h \
+ X11/Xaw3d/Template.h \
+ X11/Xaw3d/TemplateP.h \
+ X11/Xaw3d/Text.h \
+ X11/Xaw3d/TextP.h \
+ X11/Xaw3d/TextSink.h \
+ X11/Xaw3d/TextSinkP.h \
+ X11/Xaw3d/TextSrc.h \
+ X11/Xaw3d/TextSrcP.h \
+ X11/Xaw3d/ThreeD.h \
+ X11/Xaw3d/ThreeDP.h \
+ X11/Xaw3d/Tip.h \
+ X11/Xaw3d/TipP.h \
+ X11/Xaw3d/Toggle.h \
+ 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
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