From b33d6351e553a32abc84ec5484c65fd495655a95 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 14 Dec 1999 05:31:49 +0000 Subject: [PATCH] Added get-wings-flags and get-wutil-flags --- ChangeLog | 2 ++ WINGs/Makefile.am | 2 ++ WINGs/Makefile.in | 44 ++++++++++++++++++----- WINGs/connect.c | 4 +-- configure | 87 ++++++++++++++++++++++++++++++++++++++++++-- configure.in | 91 ++++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 211 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3712e0ed..f5d1d8e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,8 @@ Changes since version 0.61.1: - optimized frame drawing (Swivel ) - removed broken optimized frame drawing patch - added Select Window button in attribute inspector +- added get-wings-flags and get-wutil-flags with the same purpose as + get-wraster-flags, but for compiling and linking with WINGs/WUtil Changes since version 0.61.0: ............................. diff --git a/WINGs/Makefile.am b/WINGs/Makefile.am index a3a64bfc..55daac1a 100644 --- a/WINGs/Makefile.am +++ b/WINGs/Makefile.am @@ -18,6 +18,8 @@ lib_LIBRARIES = libWINGs.a libWUtil.a include_HEADERS = WINGs.h WUtil.h WINGsP.h +bin_SCRIPTS = get-wings-flags get-wutil-flags + noinst_PROGRAMS = wtest wmquery wmfile fontl testmywidget testcolorpanel connect testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h diff --git a/WINGs/Makefile.in b/WINGs/Makefile.in index 1a5b2834..c47f0920 100644 --- a/WINGs/Makefile.in +++ b/WINGs/Makefile.in @@ -108,6 +108,8 @@ lib_LIBRARIES = libWINGs.a libWUtil.a include_HEADERS = WINGs.h WUtil.h WINGsP.h +bin_SCRIPTS = get-wings-flags get-wutil-flags + noinst_PROGRAMS = wtest wmquery wmfile fontl testmywidget testcolorpanel connect testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h @@ -202,6 +204,8 @@ testcolorpanel_LDFLAGS = connect_OBJECTS = connect.o connect_DEPENDENCIES = libWUtil.a connect_LDFLAGS = +SCRIPTS = $(bin_SCRIPTS) + CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -347,6 +351,25 @@ connect: $(connect_OBJECTS) $(connect_DEPENDENCIES) @rm -f connect $(LINK) $(connect_LDFLAGS) $(connect_OBJECTS) $(connect_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + list='$(bin_SCRIPTS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @@ -484,7 +507,7 @@ check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive -install-exec-am: install-libLIBRARIES +install-exec-am: install-libLIBRARIES install-binSCRIPTS install-exec: install-exec-recursive install-data-am: install-includeHEADERS @@ -493,15 +516,17 @@ install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-libLIBRARIES uninstall-includeHEADERS +uninstall-am: uninstall-libLIBRARIES uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall: uninstall-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS) all-redirect: all-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \ + $(DESTDIR)$(includedir) mostlyclean-generic: @@ -548,11 +573,12 @@ clean-compile maintainer-clean-compile mostlyclean-libtool \ distclean-libtool clean-libtool maintainer-clean-libtool \ mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ -uninstall-includeHEADERS install-includeHEADERS install-data-recursive \ -uninstall-data-recursive install-exec-recursive \ -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ -all-recursive check-recursive installcheck-recursive info-recursive \ -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +uninstall-binSCRIPTS install-binSCRIPTS uninstall-includeHEADERS \ +install-includeHEADERS install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ diff --git a/WINGs/connect.c b/WINGs/connect.c index 4372bc9c..9144ae6d 100644 --- a/WINGs/connect.c +++ b/WINGs/connect.c @@ -1,5 +1,5 @@ /* - * WINGs connect.c: example how to create a netwrok client using WMConnection + * WINGs connect.c: example how to create a network client using WMConnection * * Copyright (c) 1999 Dan Pascu * @@ -168,7 +168,7 @@ main(int argc, char **argv) /*FOLD00*/ if (argc>1) { for (i=1; i wrlib/get-wraster-flags +cat <get-wings-flags +#!/bin/sh -chmod 755 wrlib/get-wraster-flags -rm -f get-wraster-flags +prefix="$prefix" +exec_prefix=\$prefix + +WCFLAGS="-I\$prefix/include $inc_search_path" +WLFLAGS="-L\$exec_prefix/lib $lib_search_path" +WLIBS="-lWINGs -lwraster $GFXLIBS $XLIBS -lm $NETLIBS -lPropList" + +usage="Usage: get-wings-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#" + +if test \$# -eq 0; then + echo "\${usage}" 1>&2 + exit 1 +fi + +while test \$# -gt 0; do + case \$1 in + --cflags) + echo \$WCFLAGS + ;; + --ldflags|--lflags) + echo \$WLFLAGS + ;; + --libs) + echo \$WLIBS + ;; + *) + echo "\${usage}" 1>&2 + exit 1 + ;; + esac + shift +done + + +EOF + +cat <get-wutil-flags +#!/bin/sh + +prefix="$prefix" +exec_prefix=\$prefix + +WCFLAGS="-I\$prefix/include $inc_search_path" +WLFLAGS="-L\$exec_prefix/lib $lib_search_path" +WLIBS="-lWUtil $NETLIBS -lPropList" + +usage="Usage: get-wutil-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#" + +if test \$# -eq 0; then + echo "\${usage}" 1>&2 + exit 1 +fi + +while test \$# -gt 0; do + case \$1 in + --cflags) + echo \$WCFLAGS + ;; + --ldflags|--lflags) + echo \$WLFLAGS + ;; + --libs) + echo \$WLIBS + ;; + *) + echo "\${usage}" 1>&2 + exit 1 + ;; + esac + shift +done + + +EOF + +sed 's/#lp#/[/g' get-wraster-flags | sed 's/#rp#/]/g' > wrlib/get-wraster-flags +sed 's/#lp#/[/g' get-wings-flags | sed 's/#rp#/]/g' > WINGs/get-wings-flags +sed 's/#lp#/[/g' get-wutil-flags | sed 's/#rp#/]/g' > WINGs/get-wutil-flags + +chmod 755 wrlib/get-wraster-flags WINGs/get-wings-flags WINGs/get-wutil-flags + +rm -f get-wraster-flags get-wings-flags get-wutil-flags diff --git a/configure.in b/configure.in index 22868aa5..950f12df 100644 --- a/configure.in +++ b/configure.in @@ -806,8 +806,8 @@ AC_OUTPUT(Makefile po/Makefile util/Makefile test/Makefile wmlib/Makefile \ dnl -dnl Output some helpfull data for compiling WINGs apps -dnl ================================================== +dnl Output some helpful data for compiling wraster and WINGs/WUtil apps +dnl =================================================================== dnl dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags @@ -856,10 +856,91 @@ done EOF -sed 's/#lp#/[/g' get-wraster-flags | sed 's/#rp#/]/g' > wrlib/get-wraster-flags +cat <get-wings-flags +#!/bin/sh -chmod 755 wrlib/get-wraster-flags -rm -f get-wraster-flags +prefix="$prefix" +exec_prefix=\$prefix + +WCFLAGS="-I\$prefix/include $inc_search_path" +WLFLAGS="-L\$exec_prefix/lib $lib_search_path" +WLIBS="-lWINGs -lwraster $GFXLIBS $XLIBS -lm $NETLIBS -lPropList" + +usage="Usage: get-wings-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#" + +if test \$# -eq 0; then + echo "\${usage}" 1>&2 + exit 1 +fi + +while test \$# -gt 0; do + case \$1 in + --cflags) + echo \$WCFLAGS + ;; + --ldflags|--lflags) + echo \$WLFLAGS + ;; + --libs) + echo \$WLIBS + ;; + *) + echo "\${usage}" 1>&2 + exit 1 + ;; + esac + shift +done + + +EOF + +cat <get-wutil-flags +#!/bin/sh + +prefix="$prefix" +exec_prefix=\$prefix + +WCFLAGS="-I\$prefix/include $inc_search_path" +WLFLAGS="-L\$exec_prefix/lib $lib_search_path" +WLIBS="-lWUtil $NETLIBS -lPropList" + +usage="Usage: get-wutil-flags #lp#--cflags#rp# #lp#--ldflags#rp# #lp#--libs#rp#" + +if test \$# -eq 0; then + echo "\${usage}" 1>&2 + exit 1 +fi + +while test \$# -gt 0; do + case \$1 in + --cflags) + echo \$WCFLAGS + ;; + --ldflags|--lflags) + echo \$WLFLAGS + ;; + --libs) + echo \$WLIBS + ;; + *) + echo "\${usage}" 1>&2 + exit 1 + ;; + esac + shift +done + + +EOF + +sed 's/#lp#/[/g' get-wraster-flags | sed 's/#rp#/]/g' > wrlib/get-wraster-flags +sed 's/#lp#/[/g' get-wings-flags | sed 's/#rp#/]/g' > WINGs/get-wings-flags +sed 's/#lp#/[/g' get-wutil-flags | sed 's/#rp#/]/g' > WINGs/get-wutil-flags + +chmod 755 wrlib/get-wraster-flags WINGs/get-wings-flags WINGs/get-wutil-flags + +rm -f get-wraster-flags get-wings-flags get-wutil-flags dnl