From ef89ac3e54c6a208233d2ad560436647063eabb3 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 22 Apr 1998 03:25:34 +0000 Subject: [PATCH] Major makefile rework from rob browning git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@834 57a11ea4-9604-0410-9ed3-97b8803252fd --- Makefile | 71 +++++----- Makefile.common | 79 +++++++++++ Makefile.in | 64 +++++---- configure | 275 ++++++++++++++++++++++----------------- configure.in | 68 +++++----- lib/Makefile | 99 +++++++------- lib/Makefile.in | 103 +++++++-------- src/Makefile | 110 ++++++---------- src/Makefile.in | 110 ++++++---------- src/engine/Makefile | 96 ++++++-------- src/engine/Makefile.in | 96 ++++++-------- src/register/Makefile | 102 +++++++-------- src/register/Makefile.in | 102 +++++++-------- 13 files changed, 691 insertions(+), 684 deletions(-) create mode 100644 Makefile.common diff --git a/Makefile b/Makefile index 0c118ea22f..c60e372fd9 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,26 @@ # Generated automatically from Makefile.in by configure. -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 srcdir = . @@ -34,8 +31,9 @@ TARGET = xacc DOCDIR = share/xacc/Docs CPU = @target_cpu@ +LIBS=-lpng -ljpeg -lz -lm + ###################################################################### -# # Description of targets: # # default -- make the application @@ -43,8 +41,6 @@ CPU = @target_cpu@ # clean -- remove *.a, *.o, *.bak, and *~ # distclean -- get rid of config files too... # install -- installs everything -# - default: @echo " " @@ -55,16 +51,16 @@ default: @echo " " motif: - @cd lib; $(MAKE) + @cd lib; $(MAKE) motif @cd src; $(MAKE) motif # link in motif libs statically motif-static: - @cd lib; $(MAKE) + @cd lib; $(MAKE) motif @cd src; $(MAKE) motif-static gnome: - @cd lib; $(MAKE) + @cd lib; $(MAKE) gnome @cd src; $(MAKE) gnome depend: @@ -82,16 +78,23 @@ distclean: clean @cd lib; $(MAKE) distclean @cd src; $(MAKE) distclean - tagsfiles := $(shell find -name "*.[ch]") TAGS: ${tagsfiles} etags ${tagsfiles} - install: $(TARGET) @mkdir -p $(PREFIX)/bin $(INSTALL) $(TARGET) $(PREFIX)/bin/$(TARGET) $(INSTALL) $(TARGET).bin $(PREFIX)/bin/$(TARGET).bin @mkdir -p $(PREFIX)/$(DOCDIR) - $(INSTALL_DATA) Docs/* $(PREFIX)/$(DOCDIR) + $(INSTALL_DATA) Docs/*.html $(PREFIX)/$(DOCDIR) + +# Local Variables: +# tab-width: 2 +# End: + $(INSTALL_DATA) Docs/*.gif $(PREFIX)/$(DOCDIR) + $(INSTALL_DATA) Docs/*.jpg $(PREFIX)/$(DOCDIR) + $(INSTALL_DATA) Docs/*.xpm $(PREFIX)/$(DOCDIR) + @mkdir -p $(PREFIX)/$(DOCDIR)/logos + $(INSTALL_DATA) Docs/logos/* $(PREFIX)/$(DOCDIR)/logos diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 0000000000..bad0e171af --- /dev/null +++ b/Makefile.common @@ -0,0 +1,79 @@ +### -*-makefile-*- ################################################# +## Makefile.common +## +## standard targets and rules +#################################################################### + +# Autoconf notes... +# Need to handle -MD there. + +# COMMON_SRCS: have to be compiled separately for all flavors +# MOTIF_SRCS: are motif only sources +# GNOME_SRCS: are gnome only sources +# INDEP_SRCS: are for flavor independent sources (like engine) + +# OBJS is for flavor independent files +# GNOME/MOTIF_OBJS is for flavor dependent files + +OBJS := $(addprefix obj/,${INDEP_SRCS:.c=.o}) +GNOME_OBJS := $(addprefix obj/gnome/,${COMMON_SRCS:.c=.o}) +GNOME_OBJS += $(addprefix obj/gnome/,${GNOME_SRCS:.c=.o}) +MOTIF_OBJS := $(addprefix obj/motif/,${COMMON_SRCS:.c=.o}) +MOTIF_OBJS += $(addprefix obj/motif/,${MOTIF_SRCS:.c=.o}) + +GTK_CFLAGS := $(shell gtk-config --cflags) + +%.c : %.h + +# Basically take the output foo.d file and put it in the right +# subdirectory, adding a prefix indicating where the file actually +# lives (i.e. obj-pic/Foo.cc rather than Foo.cc. This would all be +# unnecessary if gcc actually paid attention to the argument to "-o". + +# Note that this cannot handle subdirs in the Makefile dir, so if the +# relevant Makefile was src/foo/Makefile, this rule can't handle +# src/foo/bar/x.c src/foo/x.c and src/foo/bax/x.c. You'd need another +# Makefile in src/foo/bar and src/foo/bax for now. + +define cleanupdeps + @echo -n "obj/" > $(basename $@).d + @cat $(basename $<).d >> $(basename $@).d + @rm $(basename $<).d +endef + +# Default rule used for non-flavor dependent files (i.e. all of register) +obj/%.o: %.c + @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi + $(CC) -MD -c $(CFLAGS) -o $@ $< + ${cleanupdeps} + +obj/motif/%.o: %.c + @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi + $(CC) -MD -c $(CFLAGS) -DMOTIF -o $@ $< + ${cleanupdeps} + +obj/gnome/%.o: %.c + @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi + $(CC) -MD -c $(CFLAGS) ${GTK_CFLAGS} -DGNOME -o $@ $< + ${cleanupdeps} + +clean: + $(foreach dir,${CLEAN_SUBDIRS},(cd ${dir} && make clean);) + rm -f *~ *.bak \#* $(TRASH) + rm -rf obj + +distclean: + $(foreach dir,${CLEAN_SUBDIRS},(cd ${dir} && make distclean);) + rm -f *~ *.bak \#* $(TRASH) + rm -rf obj + rm -f Makefile Makefile.bak config.h + +.PHONY: clean distclean + +# Get dependencies (if existent). + +-include $(shell if [ -e obj ]; then find obj -name "*.d"; fi) "" + +# Local Variables: +# tab-width: 2 +# End: diff --git a/Makefile.in b/Makefile.in index 88ce7c97ba..07f1994776 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,28 +1,25 @@ -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 srcdir = @srcdir@ VPATH = @srcdir@ @@ -34,8 +31,9 @@ TARGET = xacc DOCDIR = share/xacc/Docs CPU = @target_cpu@ +LIBS=@LIBS@ + ###################################################################### -# # Description of targets: # # default -- make the application @@ -43,8 +41,6 @@ CPU = @target_cpu@ # clean -- remove *.a, *.o, *.bak, and *~ # distclean -- get rid of config files too... # install -- installs everything -# - default: @echo " " @@ -55,16 +51,16 @@ default: @echo " " motif: - @cd lib; $(MAKE) + @cd lib; $(MAKE) motif @cd src; $(MAKE) motif # link in motif libs statically motif-static: - @cd lib; $(MAKE) + @cd lib; $(MAKE) motif @cd src; $(MAKE) motif-static gnome: - @cd lib; $(MAKE) + @cd lib; $(MAKE) gnome @cd src; $(MAKE) gnome depend: @@ -82,19 +78,21 @@ distclean: clean @cd lib; $(MAKE) distclean @cd src; $(MAKE) distclean - tagsfiles := $(shell find -name "*.[ch]") TAGS: ${tagsfiles} etags ${tagsfiles} - install: $(TARGET) @mkdir -p $(PREFIX)/bin $(INSTALL) $(TARGET) $(PREFIX)/bin/$(TARGET) $(INSTALL) $(TARGET).bin $(PREFIX)/bin/$(TARGET).bin @mkdir -p $(PREFIX)/$(DOCDIR) $(INSTALL_DATA) Docs/*.html $(PREFIX)/$(DOCDIR) + +# Local Variables: +# tab-width: 2 +# End: $(INSTALL_DATA) Docs/*.gif $(PREFIX)/$(DOCDIR) $(INSTALL_DATA) Docs/*.jpg $(PREFIX)/$(DOCDIR) $(INSTALL_DATA) Docs/*.xpm $(PREFIX)/$(DOCDIR) diff --git a/configure b/configure index 4b7129d4fd..a0d29899fe 100755 --- a/configure +++ b/configure @@ -23,6 +23,12 @@ ac_help="$ac_help --with-motif-includes=DIR specify where to look for motif includes" ac_help="$ac_help --with-motif-libraries=DIR specify where to look for motif libs" +ac_help="$ac_help + --with-gnome=PATH specify where to look for gnome includes and libs" +ac_help="$ac_help + --with-gnome-includes=DIR specify where to look for gnome includes" +ac_help="$ac_help + --with-gnome-libraries=DIR specify where to look for gnome libs" ac_help="$ac_help help-string , action-if-given [, action-if-not-given]" ac_help="$ac_help @@ -537,20 +543,18 @@ fi # ******************************************* # * figure out the configure options: -cflags="-O2 -Wall" -lflags=-O2 -# +CFLAGS="${CFLAGS} -O2 -Wall" + # some plything option lists -# cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" -# cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline" -# cflags="-g -Wall -ansi -pedantic" -# -# +# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" +# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline" +# CFLAGS="-g -Wall -ansi -pedantic" + # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" - cflags="-g -Wall" - lflags="-g -Wall" + CFLAGS="${CFLAGS} -g -Wall" + LDFLAGS="${LDFLAGS} -g -Wall" cat >> confdefs.h <<\EOF #define DEBUG_MEMORY 1 EOF @@ -572,8 +576,8 @@ fi # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" - cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" - lflags="-g -Wall" + CFLAGS="${CFLAGS} -g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" + LDFLAGS="${LDFLAGS} -g -Wall" cat >> confdefs.h <<\EOF #define DEBUG_MEMORY 1 EOF @@ -611,22 +615,46 @@ fi # Check whether --with-motif or --without-motif was given. if test "${with_motif+set}" = set; then withval="$with_motif" - lflags="-L$with_motif/lib $lflags" cflags="-I$with_motif/include $cflags" + X_LIBS="${X_LIBS} -L$with_motif/lib" X_CFLAGS="$X_CFLAGS -I$with_motif/include" fi + # Check whether --with-motif-includes or --without-motif-includes was given. if test "${with_motif_includes+set}" = set; then withval="$with_motif_includes" - cflags="-I$with_motif_includes $cflags" + X_CFLAGS="${X_CFLAGS} -I$with_motif_includes" fi + # Check whether --with-motif-libraries or --without-motif-libraries was given. if test "${with_motif_libraries+set}" = set; then withval="$with_motif_libraries" - lflags="-L$with_motif_libraries $lflags" + X_LIBS="${X_LIBS} -L$with_motif_libraries" fi +# Let the user specify gnome paths: +# -I...libgnomesupport is to fix bug in gnome-1.3 release +# Check whether --with-gnome or --without-gnome was given. +if test "${with_gnome+set}" = set; then + withval="$with_gnome" + X_LIBS="${X_LIBS} -L$with_gnome/lib" X_CFLAGS="$X_CFLAGS -I$with_gnome/include -I$with_gnome/include/libgnomesupport" +fi + + +# Check whether --with-gnome-includes or --without-gnome-includes was given. +if test "${with_gnome_includes+set}" = set; then + withval="$with_gnome_includes" + X_CFLAGS="${X_CFLAGS} -I$with_gnome_includes -I$with_gnome_includes/libgnomesupport" +fi + + +# Check whether --with-gnome-libraries or --without-gnome-libraries was given. +if test "${with_gnome_libraries+set}" = set; then + withval="$with_gnome_libraries" + X_LIBS="${X_LIBS} -L$with_gnome_libraries" +fi + # Check whether --with-package or --without-package was given. if test "${with_package+set}" = set; then @@ -635,10 +663,6 @@ if test "${with_package+set}" = set; then fi - - - - # ******************************************* # check for various programs, and stuff: ac_aux_dir= @@ -671,7 +695,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:675: checking for a BSD compatible install" >&5 +echo "configure:699: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -720,12 +744,10 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:729: checking for $ac_word" >&5 +echo "configure:751: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -751,11 +773,10 @@ else echo "$ac_t""no" 1>&6 fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:759: checking for $ac_word" >&5 +echo "configure:780: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -784,7 +805,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:788: checking for $ac_word" >&5 +echo "configure:809: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -832,7 +853,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:836: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -842,11 +863,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -866,12 +887,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:870: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:875: checking whether we are using GNU C" >&5 +echo "configure:896: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -880,7 +901,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -895,7 +916,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:899: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:920: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -922,9 +943,8 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi - echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:928: checking for POSIXized ISC" >&5 +echo "configure:948: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -945,14 +965,14 @@ else fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:949: checking whether byte ordering is bigendian" >&5 +echo "configure:969: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -963,11 +983,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -978,7 +998,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -998,7 +1018,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1034,11 +1054,38 @@ EOF fi +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1059: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + # ******************************************* # check for UI libs: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1042: checking how to run the C preprocessor" >&5 +echo "configure:1089: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1053,13 +1100,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1070,13 +1117,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1103,7 +1150,7 @@ echo "$ac_t""$CPP" 1>&6 # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1107: checking for X" >&5 +echo "configure:1154: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1165,12 +1212,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1239,14 +1286,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1352,17 +1399,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1356: checking whether -R must be followed by a space" >&5 +echo "configure:1403: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_nospace=yes else @@ -1378,14 +1425,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_R_space=yes else @@ -1417,7 +1464,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1421: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1468: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1425,7 +1472,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1458,7 +1505,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1462: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1509: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1466,7 +1513,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1506,12 +1553,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1510: checking for gethostbyname" >&5 +echo "configure:1557: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1555,7 +1602,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1559: checking for gethostbyname in -lnsl" >&5 +echo "configure:1606: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1563,7 +1610,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1604,12 +1651,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1608: checking for connect" >&5 +echo "configure:1655: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1653,7 +1700,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1657: checking for connect in -lsocket" >&5 +echo "configure:1704: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1661,7 +1708,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1696,12 +1743,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1700: checking for remove" >&5 +echo "configure:1747: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1745,7 +1792,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1749: checking for remove in -lposix" >&5 +echo "configure:1796: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1753,7 +1800,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1788,12 +1835,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1792: checking for shmat" >&5 +echo "configure:1839: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -1837,7 +1884,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1841: checking for shmat in -lipc" >&5 +echo "configure:1888: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1845,7 +1892,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1889,7 +1936,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1893: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:1940: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1897,7 +1944,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1933,14 +1980,11 @@ fi fi - - - LIBS="-lm" # the XmHTML widget needs libz, libjpeg, libpng and libm # it also uses #ifdef's not #if's so DONT #def to zero. echo $ac_n "checking for deflateEnd in -lz""... $ac_c" 1>&6 -echo "configure:1944: checking for deflateEnd in -lz" >&5 +echo "configure:1988: checking for deflateEnd in -lz" >&5 ac_lib_var=`echo z'_'deflateEnd | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1948,7 +1992,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1983,7 +2027,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:1987: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:2031: checking for jpeg_read_scanlines in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_read_scanlines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1991,7 +2035,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2026,7 +2070,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:2030: checking for png_read_image in -lpng" >&5 +echo "configure:2074: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2034,7 +2078,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2069,18 +2113,21 @@ else fi -LIBS="-lXm -lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS" +# This should be done in the OTHER_LIBRARIES argument to AC_CHECK_LIB +# if it's actually needed and Makefile.in's should be using +# X_PRE_LIBS, X_LIBS, and X_EXTRA_LIBS, rather than relying on LIBS. +# LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS" echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6 -echo "configure:2076: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:2123: checking for XpmReadFileToXpmImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXpm -L $x_libraries $LIBS" +LIBS="-lXpm -L $x_libraries -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2109,7 +2156,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then cat >> confdefs.h <<\EOF #define HAVE_XPM 1 EOF - LIBS="-lXpm $LIBS" + X_LIBS="-lXpm $X_LIBS" else echo "$ac_t""no" 1>&6 cat >> confdefs.h <<\EOF @@ -2119,7 +2166,6 @@ EOF fi - # ******************************************* @@ -2224,7 +2270,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "xacc Makefile src/Makefile src/engine/Makefile src/gtk/Makefile src/motif/Makefile src/register/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "xacc Makefile src/Makefile src/engine/Makefile src/gnome/Makefile src/motif/Makefile src/register/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2489,4 +2531,3 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 chmod +x xacc - diff --git a/configure.in b/configure.in index 6d5a8ea8a5..430692ee83 100644 --- a/configure.in +++ b/configure.in @@ -2,26 +2,24 @@ AC_INIT(src/motif/main.c) # ******************************************* # * figure out the configure options: -cflags="-O2 -Wall" -lflags=-O2 -# +CFLAGS="${CFLAGS} -O2 -Wall" + # some plything option lists -# cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" -# cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline" -# cflags="-g -Wall -ansi -pedantic" -# -# +# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" +# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline" +# CFLAGS="-g -Wall -ansi -pedantic" + AC_ARG_ENABLE( debug, [ --enable-debug compile with debugging flags set], - cflags="-g -Wall" - lflags="-g -Wall" + CFLAGS="${CFLAGS} -g -Wall" + LDFLAGS="${LDFLAGS} -g -Wall" AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1), AC_DEFINE(DEBUG_MEMORY,0) AC_DEFINE(USE_DEBUG,0) ) AC_ARG_ENABLE( warnings, [ --enable-warnings compile with lots of warnings generated], - cflags="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" - lflags="-g -Wall" + CFLAGS="${CFLAGS} -g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" + LDFLAGS="${LDFLAGS} -g -Wall" AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1) ) @@ -37,40 +35,45 @@ AC_ARG_ENABLE( color, # Let the user specify motif paths: AC_ARG_WITH( motif, [ --with-motif=PATH specify where to look for motif includes and libs], - lflags="-L$with_motif/lib $lflags" cflags="-I$with_motif/include $cflags" ) + X_LIBS="${X_LIBS} -L$with_motif/lib" X_CFLAGS="$X_CFLAGS -I$with_motif/include" ) + AC_ARG_WITH( motif-includes, [ --with-motif-includes=DIR specify where to look for motif includes], - cflags="-I$with_motif_includes $cflags" ) + X_CFLAGS="${X_CFLAGS} -I$with_motif_includes" ) + AC_ARG_WITH( motif-libraries, [ --with-motif-libraries=DIR specify where to look for motif libs], - lflags="-L$with_motif_libraries $lflags" ) + X_LIBS="${X_LIBS} -L$with_motif_libraries" ) +# Let the user specify gnome paths: +# -I...libgnomesupport is to fix bug in gnome-1.3 release +AC_ARG_WITH( gnome, + [ --with-gnome=PATH specify where to look for gnome includes and libs], + X_LIBS="${X_LIBS} -L$with_gnome/lib" X_CFLAGS="$X_CFLAGS -I$with_gnome/include -I$with_gnome/include/libgnomesupport" ) + +AC_ARG_WITH( gnome-includes, + [ --with-gnome-includes=DIR specify where to look for gnome includes], + X_CFLAGS="${X_CFLAGS} -I$with_gnome_includes -I$with_gnome_includes/libgnomesupport" ) + +AC_ARG_WITH( gnome-libraries, + [ --with-gnome-libraries=DIR specify where to look for gnome libs], + X_LIBS="${X_LIBS} -L$with_gnome_libraries" ) AC_ARG_WITH(package, help-string [, action-if-given [, action-if-not-given]]) -AC_SUBST(cflags) -AC_SUBST(lflags) - -AC_SUBST(prefix) # ******************************************* # check for various programs, and stuff: AC_PROG_INSTALL -AC_SUBST(INSTALL) -AC_SUBST(INSTALL_DATA) AC_PROG_RANLIB -AC_SUBST(RANLIB) AC_PROG_CC -AC_SUBST(CC) AC_ISC_POSIX AC_C_BIGENDIAN +AC_PROG_MAKE_SET # ******************************************* # check for UI libs: AC_PATH_X AC_PATH_XTRA -AC_SUBST(x_includes) -AC_SUBST(x_libraries) - LIBS="-lm" # the XmHTML widget needs libz, libjpeg, libpng and libm @@ -82,17 +85,18 @@ AC_CHECK_LIB(jpeg, jpeg_read_scanlines, AC_CHECK_LIB(png, png_read_image, AC_DEFINE(HAVE_PNG,1) LIBS="-lpng $LIBS") -LIBS="-lXm -lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS" +# This should be done in the OTHER_LIBRARIES argument to AC_CHECK_LIB +# if it's actually needed and Makefile.in's should be using +# X_PRE_LIBS, X_LIBS, and X_EXTRA_LIBS, rather than relying on LIBS. +# LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS" AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage, - AC_DEFINE(HAVE_XPM,1) LIBS="-lXpm $LIBS", - AC_DEFINE(HAVE_XPM,0), -L $x_libraries) -AC_SUBST(LIBS) + AC_DEFINE(HAVE_XPM,1) X_LIBS="-lXpm $X_LIBS", + AC_DEFINE(HAVE_XPM,0), -L $x_libraries -lX11) # ******************************************* AC_CONFIG_HEADER(config.h) -AC_OUTPUT(xacc Makefile src/Makefile src/engine/Makefile src/gtk/Makefile src/motif/Makefile src/register/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile) +AC_OUTPUT(xacc Makefile src/Makefile src/engine/Makefile src/gnome/Makefile src/motif/Makefile src/register/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile) chmod +x xacc - diff --git a/lib/Makefile b/lib/Makefile index 5a57cd458d..3da001281b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,72 +1,65 @@ # Generated automatically from Makefile.in by configure. -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/lib * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/lib +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 -srcdir = . +# These three lines are suggested defs for autoconf (see the info pages). +srcdir = . ###################################################################### -# # Description of targets: # # default -- make the application -# depend -- generate the dependencies # clean -- remove *.a, *.o, *.bak, and *~ # distclean -- get rid of config files too... # install -- ??todo?? # -default: +###################################################################### +# See Makefile.common for information about these variables. +CLEAN_SUBDIRS := XmHTML-1.1.0 ComboBox-1.33 Xbae-4.6.2-linas +###################################################################### + +all: + @echo " " + @echo "Please choose one of the following targets:" + @echo "motif motif version" + @echo "gnome gnome/gtk version" + @echo " " + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../Makefile.common + +motif: @cd XmHTML-1.1.0; $(MAKE) default @cd ComboBox-1.33; $(MAKE) default @cd Xbae-4.6.2-linas; $(MAKE) default -# libhtmlw no longer distributed with xacc, -# due to license restrictions and overall brokenness -# @cd libhtmlw; $(MAKE) default +gnome: -depend: - @cd XmHTML-1.1.0; $(MAKE) depend - @cd ComboBox-1.33; $(MAKE) depend - @cd Xbae-4.6.2-linas; $(MAKE) depend - -# @cd libhtmlw; $(MAKE) depend - -clean: - @cd XmHTML-1.1.0; $(MAKE) clean - @cd ComboBox-1.33; $(MAKE) clean - @cd Xbae-4.6.2-linas; $(MAKE) clean - -# @cd libhtmlw; $(MAKE) clean - -distclean: clean - rm -f *~ *.o *.bak Makefile - @cd XmHTML-1.1.0; $(MAKE) distclean - @cd ComboBox-1.33; $(MAKE) distclean - @cd Xbae-4.6.2-linas; $(MAKE) distclean - -# @cd libhtmlw; $(MAKE) distclean +.PHONY: gnome motif +# Local Variables: +# tab-width: 2 +# End: diff --git a/lib/Makefile.in b/lib/Makefile.in index e77c154a13..dd573d14d8 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,72 +1,65 @@ -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/lib * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** - -srcdir = @srcdir@ -VPATH = @srcdir@ +# Makefile -- makefile for xacc/lib +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 +# These three lines are suggested defs for autoconf (see the info pages). +@SET_MAKE@ +srcdir = @srcdir@ +VPATH = @srcdir@ ###################################################################### -# # Description of targets: # # default -- make the application -# depend -- generate the dependencies # clean -- remove *.a, *.o, *.bak, and *~ # distclean -- get rid of config files too... # install -- ??todo?? # -default: +###################################################################### +# See Makefile.common for information about these variables. +CLEAN_SUBDIRS := XmHTML-1.1.0 ComboBox-1.33 Xbae-4.6.2-linas +###################################################################### + +all: + @echo " " + @echo "Please choose one of the following targets:" + @echo "motif motif version" + @echo "gnome gnome/gtk version" + @echo " " + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../Makefile.common + +motif: @cd XmHTML-1.1.0; $(MAKE) default @cd ComboBox-1.33; $(MAKE) default @cd Xbae-4.6.2-linas; $(MAKE) default -# libhtmlw no longer distributed with xacc, -# due to license restrictions and overall brokenness -# @cd libhtmlw; $(MAKE) default +gnome: -depend: - @cd XmHTML-1.1.0; $(MAKE) depend - @cd ComboBox-1.33; $(MAKE) depend - @cd Xbae-4.6.2-linas; $(MAKE) depend - -# @cd libhtmlw; $(MAKE) depend - -clean: - @cd XmHTML-1.1.0; $(MAKE) clean - @cd ComboBox-1.33; $(MAKE) clean - @cd Xbae-4.6.2-linas; $(MAKE) clean - -# @cd libhtmlw; $(MAKE) clean - -distclean: clean - rm -f *~ *.o *.bak Makefile - @cd XmHTML-1.1.0; $(MAKE) distclean - @cd ComboBox-1.33; $(MAKE) distclean - @cd Xbae-4.6.2-linas; $(MAKE) distclean - -# @cd libhtmlw; $(MAKE) distclean +.PHONY: gnome motif +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/Makefile b/src/Makefile index 8205b8fa4f..9c22e3476d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,85 +1,61 @@ # Generated automatically from Makefile.in by configure. -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 + +# These three lines are suggested defs for autoconf (see the info pages). srcdir = . + CC = gcc -INCLPATH = -I/usr/include \ - -I.. \ - -I./engine \ - -I./register \ - -I/usr/local/include \ - -I/usr/X11R6/include/. \ - -I./../include \ - - -CFLAGS = -g -Wall -LFLAGS = -g -Wall -LIBS = -lXpm -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lpng -ljpeg -lz -lm +INCLPATH = -I.. -I./engine -I./register -I./../include +CFLAGS = -O2 -Wall -g -Wall ${INCLPATH} ###################################################################### -SRCS = Ledger.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +COMMON_SRCS := Ledger.c +CLEAN_SUBDIRS := engine gnome motif register ###################################################################### +all: default + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../Makefile.common + default: $(OBJS) -motif: default +motif: ${MOTIF_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) motif @cd motif; $(MAKE) motif -gnome: default +gnome: ${GNOME_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) gnome - @cd gtk; $(MAKE) gnome + @cd gnome; $(MAKE) gnome -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +.PHONY: default gnome motif all -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) - @cd engine; $(MAKE) depend - @cd register; $(MAKE) depend - @cd motif; $(MAKE) depend - -clean: - rm -f *.o *~ *.bak - @cd engine; $(MAKE) clean - @cd gtk; $(MAKE) clean - @cd motif; $(MAKE) clean - @cd register; $(MAKE) clean - - -distclean: clean - rm -f $(TARGET) $(STATIC) Makefile Makefile.bak config.h - @cd engine; $(MAKE) distclean - @cd gtk; $(MAKE) distclean - @cd motif; $(MAKE) distclean - @cd register; $(MAKE) distclean - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/Makefile.in b/src/Makefile.in index cc908e219b..bc95a0edb2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,85 +1,61 @@ -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src * -#* Copyright (C) 1997 Robin Clark * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 +# These three lines are suggested defs for autoconf (see the info pages). +@SET_MAKE@ srcdir = @srcdir@ VPATH = @srcdir@ + CC = @CC@ -INCLPATH = -I/usr/include \ - -I.. \ - -I./engine \ - -I./register \ - -I/usr/local/include \ - -I@x_includes@/. \ - -I@srcdir@/../include \ - - -CFLAGS = @cflags@ -LFLAGS = @lflags@ -LIBS = @LIBS@ +INCLPATH = -I.. -I./engine -I./register -I@srcdir@/../include +CFLAGS = @CFLAGS@ ${INCLPATH} ###################################################################### -SRCS = Ledger.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +COMMON_SRCS := Ledger.c +CLEAN_SUBDIRS := engine gnome motif register ###################################################################### +all: default + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../Makefile.common + default: $(OBJS) -motif: default +motif: ${MOTIF_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) motif @cd motif; $(MAKE) motif -gnome: default +gnome: ${GNOME_OBJS} @cd engine; $(MAKE) default @cd register; $(MAKE) gnome - @cd gtk; $(MAKE) gnome + @cd gnome; $(MAKE) gnome -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +.PHONY: default gnome motif all -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) - @cd engine; $(MAKE) depend - @cd register; $(MAKE) depend - @cd motif; $(MAKE) depend - -clean: - rm -f *.o *~ *.bak - @cd engine; $(MAKE) clean - @cd gtk; $(MAKE) clean - @cd motif; $(MAKE) clean - @cd register; $(MAKE) clean - - -distclean: clean - rm -f $(TARGET) $(STATIC) Makefile Makefile.bak config.h - @cd engine; $(MAKE) distclean - @cd gtk; $(MAKE) distclean - @cd motif; $(MAKE) distclean - @cd register; $(MAKE) distclean - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/engine/Makefile b/src/engine/Makefile index eea8f7c1fa..1946c9f052 100644 --- a/src/engine/Makefile +++ b/src/engine/Makefile @@ -1,69 +1,53 @@ # Generated automatically from Makefile.in by configure. -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src/engine * -#* Copyright (C) 1997 Robin Clark * -#* Copyright (C) 1998 Linas Vepstas * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src/engine +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Linas Vepstas +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 + +# These three lines are suggested defs for autoconf (see the info pages). srcdir = . + CC = gcc RANLIB = ranlib -INCLPATH = -I/usr/include \ - -I/usr/local/include \ - -I./../../include \ - -I./../.. - -CFLAGS = -g -Wall -LFLAGS = -g -Wall -LIBS = -lXpm -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lpng -ljpeg -lz -lm -LIBPATH = -L/lib -L/usr/lib -L/usr/local/lib -TARGET = ../libengine.a +INCLPATH = -I./../../include -I./../.. +CFLAGS = -O2 -Wall -g -Wall ${INCLPATH} ###################################################################### -SRCS = AccInfo.c Account.c DateUtils.c FileIO.c Group.c LedgerUtils.c \ - QIFIO.c Transaction.c TransLog.c date.c util.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +INDEP_SRCS := Account.c DateUtils.c FileIO.c Group.c LedgerUtils.c \ + QIFIO.c Transaction.c TransLog.c date.c util.c ###################################################################### -default: $(TARGET) +all: default -$(TARGET): $(OBJS) - @echo "++++++" - $(AR) rv $(TARGET) $(OBJS) - $(RANLIB) $(TARGET) +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../../Makefile.common -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +default: ${OBJS} -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) +.PHONY: all default -clean: - rm -f *.o *~ *.bak - -distclean: clean - rm -f $(TARGET) Makefile Makefile.bak config.h - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/engine/Makefile.in b/src/engine/Makefile.in index beb9236eaf..d1870a6b29 100644 --- a/src/engine/Makefile.in +++ b/src/engine/Makefile.in @@ -1,69 +1,53 @@ -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src/engine * -#* Copyright (C) 1997 Robin Clark * -#* Copyright (C) 1998 Linas Vepstas * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src/engine +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Linas Vepstas +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 +# These three lines are suggested defs for autoconf (see the info pages). +@SET_MAKE@ srcdir = @srcdir@ VPATH = @srcdir@ + CC = @CC@ RANLIB = @RANLIB@ -INCLPATH = -I/usr/include \ - -I/usr/local/include \ - -I@srcdir@/../../include \ - -I@srcdir@/../.. - -CFLAGS = @cflags@ -LFLAGS = @lflags@ -LIBS = @LIBS@ -LIBPATH = -L/lib -L/usr/lib -L/usr/local/lib -TARGET = ../libengine.a +INCLPATH = -I@srcdir@/../../include -I@srcdir@/../.. +CFLAGS = @CFLAGS@ ${INCLPATH} ###################################################################### -SRCS = AccInfo.c Account.c DateUtils.c FileIO.c Group.c LedgerUtils.c \ - QIFIO.c Transaction.c TransLog.c date.c util.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +INDEP_SRCS := Account.c DateUtils.c FileIO.c Group.c LedgerUtils.c \ + QIFIO.c Transaction.c TransLog.c date.c util.c ###################################################################### -default: $(TARGET) +all: default -$(TARGET): $(OBJS) - @echo "++++++" - $(AR) rv $(TARGET) $(OBJS) - $(RANLIB) $(TARGET) +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../../Makefile.common -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +default: ${OBJS} -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) +.PHONY: all default -clean: - rm -f *.o *~ *.bak - -distclean: clean - rm -f $(TARGET) Makefile Makefile.bak config.h - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/register/Makefile b/src/register/Makefile index 447986775c..9ddd8fecbb 100644 --- a/src/register/Makefile +++ b/src/register/Makefile @@ -1,76 +1,64 @@ # Generated automatically from Makefile.in by configure. -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src/register * -#* Copyright (C) 1997 Robin Clark * -#* Copyright (C) 1998 Linas Vepstas * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src/register +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Linas Vepstas +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 srcdir = . CC = gcc RANLIB = ranlib -INCLPATH = -I/usr/include \ - -I/usr/local/include/. \ - -I/usr/X11R6/include/. \ - -I./../.. \ +INCLPATH = -I./../.. \ -I./../../include \ -I./../engine \ -I./../../lib/ComboBox-1.33 \ -I./../../lib/Xbae-4.6.2-linas -CFLAGS = -g -Wall -DCELL_WIDGETS=1 -LFLAGS = -g -Wall -LIBS = -lXpm -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lpng -ljpeg -lz -lm -LIBPATH = -L/lib -L/usr/lib -L/usr/local/lib -TARGET = ../libregister.a +CFLAGS := -O2 -Wall -g -Wall -DCELL_WIDGETS=1 ${INCLPATH} ###################################################################### -SRCS = basiccell.c cellblock.c combocell.c \ - datecell.c pricecell.c QuickFill.c quickfillcell.c \ - recncell.c register.c table-allgui.c table-motif.c textcell.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +COMMON_SRCS := basiccell.c cellblock.c combocell.c \ + datecell.c pricecell.c QuickFill.c quickfillcell.c \ + recncell.c register.c table-allgui.c textcell.c +MOTIF_SRCS := table-motif.c +GNOME_SRCS := table-gtk.c ###################################################################### -motif: $(TARGET) +all: + @echo " " + @echo "Please choose one of the following targets:" + @echo "motif dynamically linked motif version" + @echo "gnome gnome/gtk version" + @echo " " -gnome: $(TARGET) +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../../Makefile.common -$(TARGET): $(OBJS) - @echo "++++++" - $(AR) rv $(TARGET) $(OBJS) - $(RANLIB) $(TARGET) +motif: ${MOTIF_OBJS} -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +gnome: ${GNOME_OBJS} -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) +.PHONY: all motif gnome -clean: - rm -f *.o *~ *.bak - -distclean: clean - rm -f $(TARGET) Makefile Makefile.bak config.h - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: diff --git a/src/register/Makefile.in b/src/register/Makefile.in index f95ff82f25..3b45a6946d 100644 --- a/src/register/Makefile.in +++ b/src/register/Makefile.in @@ -1,76 +1,64 @@ -# -###################################################################### -#******************************************************************** -#* Makefile -- makefile for xacc/src/register * -#* Copyright (C) 1997 Robin Clark * -#* Copyright (C) 1998 Linas Vepstas * -#* * -#* This program is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU General Public License as * -#* published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License* -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -#* * -#* Author: Robin Clark * -#* Internet: rclark@rush.aero.org * -#* Address: 609 8th Street * -#* Huntington Beach, CA 92648-4632 * -#******************************************************************** +# Makefile -- makefile for xacc/src/register +# Copyright (C) 1997 Robin Clark +# Copyright (C) 1998 Linas Vepstas +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Robin Clark +# Internet: rclark@rush.aero.org +# Address: 609 8th Street +# Huntington Beach, CA 92648-4632 srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ RANLIB = @RANLIB@ -INCLPATH = -I/usr/include \ - -I/usr/local/include/. \ - -I/usr/X11R6/include/. \ - -I@srcdir@/../.. \ +INCLPATH = -I@srcdir@/../.. \ -I@srcdir@/../../include \ -I@srcdir@/../engine \ -I@srcdir@/../../lib/ComboBox-1.33 \ -I@srcdir@/../../lib/Xbae-4.6.2-linas -CFLAGS = @cflags@ -DCELL_WIDGETS=1 -LFLAGS = @lflags@ -LIBS = @LIBS@ -LIBPATH = -L/lib -L/usr/lib -L/usr/local/lib -TARGET = ../libregister.a +CFLAGS := @CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} ###################################################################### -SRCS = basiccell.c cellblock.c combocell.c \ - datecell.c pricecell.c QuickFill.c quickfillcell.c \ - recncell.c register.c table-allgui.c table-motif.c textcell.c -OBJS = ${SRCS:.c=.o} +# See Makefile.common for information about these variables. +COMMON_SRCS := basiccell.c cellblock.c combocell.c \ + datecell.c pricecell.c QuickFill.c quickfillcell.c \ + recncell.c register.c table-allgui.c textcell.c +MOTIF_SRCS := table-motif.c +GNOME_SRCS := table-gtk.c ###################################################################### -motif: $(TARGET) +all: + @echo " " + @echo "Please choose one of the following targets:" + @echo "motif dynamically linked motif version" + @echo "gnome gnome/gtk version" + @echo " " -gnome: $(TARGET) +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include ../../Makefile.common -$(TARGET): $(OBJS) - @echo "++++++" - $(AR) rv $(TARGET) $(OBJS) - $(RANLIB) $(TARGET) +motif: ${MOTIF_OBJS} -.c.o: - @echo "+++" - $(CC) -c $(CFLAGS) $(INCLPATH) $< +gnome: ${GNOME_OBJS} -depend: - makedepend -- $(INCLPATH) $(DEFN) -- $(SRCS) +.PHONY: all motif gnome -clean: - rm -f *.o *~ *.bak - -distclean: clean - rm -f $(TARGET) Makefile Makefile.bak config.h - -# DO NOT DELETE THIS LINE -- make depend depends on it. +# Local Variables: +# tab-width: 2 +# End: