diff --git a/wmail/.gitignore b/wmail/.gitignore index b1f5986..d6533a0 100644 --- a/wmail/.gitignore +++ b/wmail/.gitignore @@ -1,10 +1,20 @@ +/aclocal.m4 +/autom4te.cache/ +/compile +/config.h +/config.h.in +/config.h.in~ +/config.log +/config.status +/configure +/depcomp +/INSTALL +/install-sh Makefile -autom4te.cache/ -config.h -config.h.in -config.h.in~ -config.log -config.status -configure -src/*.o -src/wmail +Makefile.in +/missing +/src/.deps/ +/src/*.o +/src/wmail +/stamp-h1 +/wmail-*.tar.gz diff --git a/wmail/Makefile.am b/wmail/Makefile.am new file mode 100644 index 0000000..fc64957 --- /dev/null +++ b/wmail/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = src + +EXTRA_DIST = wmailrc-sample diff --git a/wmail/Makefile.in b/wmail/Makefile.in deleted file mode 100644 index baa1c4b..0000000 --- a/wmail/Makefile.in +++ /dev/null @@ -1,29 +0,0 @@ -# process this file with configure to create a Makefile from it -# -# Makefile for wmail. -# Toplevel Makefile. -# Usage: make ..........: creates the wmail binary. -# make install ..: installs the binary under your default user binary -# directory. -# make uninstall : removes any installed wmail files. -# make clean ....: cleans the src directory. - -@SET_MAKE@ - -default all target: wmail - -wmail: - @cd src; $(MAKE) -f Makefile wmail - -install: - @if ! test -f src/wmail; then $(MAKE) wmail; fi - @echo "Installing the binary under @bindir@." - @cp -f src/wmail @bindir@ - -uninstall: - @echo "Removing wmail files from your system." - @rm -f @bindir@/wmail - -clean: - @echo "Cleaning src directory." - @cd src; $(MAKE) -f Makefile clean diff --git a/wmail/autogen b/wmail/autogen new file mode 100755 index 0000000..10ad33c --- /dev/null +++ b/wmail/autogen @@ -0,0 +1,6 @@ +#!/bin/sh + +AUTOMAKE="automake --add-missing" +export AUTOMAKE + +exec autoreconf "$@" diff --git a/wmail/configure.ac b/wmail/configure.ac index 99b2f1f..17f600d 100644 --- a/wmail/configure.ac +++ b/wmail/configure.ac @@ -1,10 +1,12 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/wmail.c) +AC_INIT([wmail], [2.0], [wmaker-dev@googlegroups.com]) AC_CONFIG_HEADERS(config.h) +AC_CONFIG_SRCDIR([src/wmail.c]) +AM_INIT_AUTOMAKE([foreign]) dnl Checks for programs. AC_PROG_CC -AC_PROG_MAKE_SET +AC_PROG_INSTALL dnl Checks for pkg-config modules. PKG_CHECK_MODULES([X11], [x11]) @@ -27,23 +29,23 @@ dnl Checks for library functions. AC_FUNC_FNMATCH AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS(strdup strstr memcpy) +AC_CHECK_FUNCS([strdup strstr memcpy]) dnl Checks for libraries. dnl Enable Debugging? -AC_ARG_ENABLE(debug, - [ --enable-debug enable debugging ],, enable_debug=no) -if test "$enable_debug" = yes; then - CPPFLAGS="$CPPFLAGS -DDEBUG -D_XOPEN_SOURCE=600" - CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Wextra -g" -fi +AC_ARG_ENABLE(debug, [ --enable-debug enable debugging ], + enable_debug=yes, enable_debug=no) +AC_MSG_CHECKING([whether to enable debugging]) +AC_MSG_RESULT([$enable_debug]) +AM_CONDITIONAL([ENABLE_DEBUG], [test x$enable_debug = xyes]) dnl Use delt's pixmaps instead of the default ones? -AC_ARG_ENABLE(delt_xpms, - [ --enable-delt-xpms enable delt's pixmaps ],, enable_delt_xpms=no) -if test "$enable_delt_xpms" = yes; then - CPPFLAGS="$CPPFLAGS -DUSE_DELT_XPMS" -fi +AC_ARG_ENABLE(delt_xpms, [ --enable-delt-xpms enable delt's pixmaps ], + enable_delt_xpms=yes, enable_delt_xpms=no) +AC_MSG_CHECKING([whether to enable delt's pixmaps]) +AC_MSG_RESULT([$enable_delt_xpms]) +AM_CONDITIONAL([ENABLE_DELT_XPMS], [test x$enable_delt_xpms = xyes]) -AC_OUTPUT(Makefile src/Makefile) +AC_CONFIG_FILES([Makefile src/Makefile]) +AC_OUTPUT diff --git a/wmail/src/Makefile.am b/wmail/src/Makefile.am new file mode 100644 index 0000000..c00c8d1 --- /dev/null +++ b/wmail/src/Makefile.am @@ -0,0 +1,21 @@ +AM_CPPFLAGS = +AM_CFLAGS = $(dockapp_CFLAGS) $(X11_CFLAGS) + +if ENABLE_DEBUG + AM_CPPFLAGS += -DDEBUG -D_XOPEN_SOURCE=600 + AM_CFLAGS += -std=c99 -pedantic -Wall -Wextra +endif + +if ENABLE_DELT_XPMS + AM_CPPFLAGS += -DUSE_DELT_XPMS +endif + +LIBS += $(dockapp_LIBS) $(X11_LIBS) + +bin_PROGRAMS = wmail + +wmail_SOURCES = common.c common.h \ + config.c config.h \ + wmail.c \ + xpm/*.xpm \ + xpm_delt/*.xpm diff --git a/wmail/src/Makefile.in b/wmail/src/Makefile.in deleted file mode 100644 index 8c5e739..0000000 --- a/wmail/src/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# process this file with configure to create a Makefile from it -# -# Makefile for wmail. -# Makes the wmail dockapp binary and cleans the directory, respectively. - -LIBS = @LIBS@ @dockapp_LIBS@ @X11_LIBS@ -CC = @CC@ -CFLAGS = @CFLAGS@ @dockapp_CFLAGS@ @X11_CFLAGS@ -CPPFLAGS = @DEFS@ @CPPFLAGS@ - -default all target: wmail - -wmail: wmail.o common.o config.o - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS) - -wmail.o: wmail.c common.h config.h ../config.h xpm/main.xpm xpm/symbols.xpm xpm/numbers.xpm xpm/button.xpm xpm/chars.xpm - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< - -common.o: common.c common.h ../config.h - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< - -config.o: config.c config.h common.h ../config.h - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< - -clean: - rm -f wmail core *.o *~