From 78d117b6cb0a2ff2316d27dd4b7e2c558a1a0133 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 11 Dec 2008 23:46:44 +0100 Subject: [PATCH] Migrated build system to Automake. --- .gitignore | 19 ++++ Makefile.am | 86 +++++++++++++++++ Makefile.in | 183 ------------------------------------ acl.y => acl-parser.y | 12 +-- acl-scan.l => acl-scanner.l | 0 configure.ac | 98 +++++++++++++++++++ configure.in | 53 ----------- docs/Makefile | 22 ----- docs/Makefile.am | 17 ++++ libargv/Makefile | 34 ------- libargv/Makefile.am | 6 ++ libconfigfile/Makefile | 30 ------ libconfigfile/Makefile.am | 6 ++ liblists/Makefile | 26 ----- liblists/Makefile.am | 6 ++ libmpools/Makefile | 26 ----- libmpools/Makefile.am | 6 ++ librfc822/.gitignore | 4 + librfc822/Makefile | 49 ---------- librfc822/Makefile.am | 17 ++++ libtext/Makefile | 38 -------- libtext/Makefile.am | 8 ++ 22 files changed, 279 insertions(+), 467 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile.am delete mode 100644 Makefile.in rename acl.y => acl-parser.y (98%) rename acl-scan.l => acl-scanner.l (100%) create mode 100644 configure.ac delete mode 100644 configure.in delete mode 100644 docs/Makefile create mode 100644 docs/Makefile.am delete mode 100644 libargv/Makefile create mode 100644 libargv/Makefile.am delete mode 100644 libconfigfile/Makefile create mode 100644 libconfigfile/Makefile.am delete mode 100644 liblists/Makefile create mode 100644 liblists/Makefile.am delete mode 100644 libmpools/Makefile create mode 100644 libmpools/Makefile.am create mode 100644 librfc822/.gitignore delete mode 100644 librfc822/Makefile create mode 100644 librfc822/Makefile.am delete mode 100644 libtext/Makefile create mode 100644 libtext/Makefile.am diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a382cd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*.o +.deps +/acl-parser.cc +/acl-parser.h +/acl-scanner.cc +/aclocal.m4 +/autom4te.cache +/config.log +/config.status +/configure +/depcomp +/install-sh +/missing +/petidomo +/petidomo-*.tar.gz +/ylwrap +Makefile +Makefile.in +lib*.a diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..8a5684e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,86 @@ +# +# build petidomo +# + +AM_YFLAGS = -d + +SUBDIRS = libargv libtext liblists librfc822 libmpools libconfigfile docs + +sbin_PROGRAMS = petidomo + +petidomo_SOURCES = \ + acl-parser.y acl-scanner.l approve.c config-files.c \ + handleacl.c index.c parsearray.c queue-posting.c \ + tool.c archive.c filter.c help.c io.c main.c \ + password.c rfcparse.c unsubscribe.c address-db.c \ + authen.c generate-cookie.c hermes.c listserv.c \ + members.c mailer.c queue-command.c subscribe.c + +petidomo_CPPFLAGS = \ + -DMTA=\"${mta}\" \ + -DSYSCONFDIR=\"${sysconfdir}\" \ + -DLOCALSTATEDIR=\"${localstatedir}\" \ + -DDATADIR=\"${datadir}\" + +petidomo_LDADD = \ + libconfigfile/libconfigfile.a libtext/libtext.a \ + liblists/liblists.a librfc822/librfc822.a \ + libmpools/libmpools.a libargv/libargv.a + + +noinst_HEADERS = petidomo.h +BUILT_SOURCES = acl-parser.c acl-scanner.c acl-parser.h + +CLEANFILES = petidomo-*.tar.gz +DISTCLEANFILES = $(BUILT_SOURCES) $(EXTRA_DIST) +MAINTAINERCLEANFILES = \ + Makefile.in aclocal.m4 compile config.guess config.sub \ + configure liblists/Makefile.in \ + libmpools/Makefile.in libargv/Makefile.in librfc822/Makefile.in + +maintainer-clean-local: + -rm -rf build-aux + +# petidomo.1: petidomo.pod +# V=`$(SHTOOL) version -lc -dlong version.c`; \ +# sed -e "s;@V@;$$V;g" /tmp/petidomo.pod; \ +# pod2man --section=1 --date="$$V" \ +# --center="Petidomo" --release="Petidomo" \ +# /tmp/petidomo.pod >petidomo.1; \ +# rm -f /tmp/petidomo.pod +# +# install: all +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sysconfdir) +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/ack-queue +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir) +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libexecdir) +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 +# $(SHTOOL) install -c -s -m 555 petidomo $(DESTDIR)$(bindir) +# $(SHTOOL) install -c -m 755 petidomo-approve $(DESTDIR)$(bindir) +# $(SHTOOL) install -c -m 755 petidomo-kickout $(DESTDIR)$(bindir) +# $(SHTOOL) install -c -m 644 petidomo.1 $(DESTDIR)$(mandir)/man1/petidomo.1 +# $(SHTOOL) install -c -m 644 config/petidomo.conf $(DESTDIR)$(sysconfdir)/petidomo.conf-sample +# $(SHTOOL) install -c -m 644 config/petidomo.acl $(DESTDIR)$(sysconfdir)/petidomo.acl-sample +# $(SHTOOL) install -c -m 444 config/help $(DESTDIR)$(datadir) +# if [ ! -f $(DESTDIR)$(localstatedir)/index ] ; then $(SHTOOL) install -c -m 444 config/index $(DESTDIR)$(localstatedir); fi +# $(SHTOOL) install -c -m 555 filter/insert-name-in-subject.sh $(DESTDIR)$(libexecdir) +# $(SHTOOL) install -c -m 555 filter/pgp-decrypt.sh $(DESTDIR)$(libexecdir) +# $(SHTOOL) install -c -m 555 filter/pgp-encrypt.sh $(DESTDIR)$(libexecdir) +# $(SHTOOL) install -c -m 555 filter/rfc2369.sh $(DESTDIR)$(libexecdir) +# +# install-testlist: +# $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists/testlist +# $(SHTOOL) install -c -m 644 config/list-config $(DESTDIR)$(localstatedir)/lists/testlist/config +# $(SHTOOL) install -c -m 644 config/list-acl $(DESTDIR)$(localstatedir)/lists/testlist/acl +# @rm -f $(DESTDIR)$(localstatedir)/lists/testlist/list +# $(SHTOOL) install -c -m 644 /dev/null $(DESTDIR)$(localstatedir)/lists/testlist/list +# +# # increase or update version information +# new-version: +# @V="$(VERSION)"; OPT="-e"; [ ".$$V" != . ] && OPT="-s$$V"; \ +# $(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c +# update-version: +# @OPT="-s`$(SHTOOL) version -lc -dshort version.c`"; \ +# $(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index e386973..0000000 --- a/Makefile.in +++ /dev/null @@ -1,183 +0,0 @@ -# -# Petidomo Makefile -# - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libexecdir = @libexecdir@/petidomo -datadir = @datadir@/petidomo -sysconfdir = @sysconfdir@ -localstatedir = @localstatedir@/petidomo -mandir = @mandir@ - -DESTDIR = - -CC = @CC@ -AR = ar -RANLIB = @RANLIB@ -LEX = @LEX@ -YACC = @YACC@ -SHTOOL = ./shtool - -CFLAGS = @CFLAGS@ - -CPPFLAGS = @CPPFLAGS@ @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" -DDATADIR=\"$(datadir)\" \ - -DLOCALSTATEDIR=\"$(localstatedir)\" -LDFLAGS = @LDFLAGS@ -FLAGS_TO_PASS = MFLAGS="$(MFLAGS)" CC="$(CC)" AR="$(AR)" \ - RANLIB="$(RANLIB)" LEX="$(LEX)" \ - YACC="$(YACC)" CFLAGS="$(CFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" - -OBJS = acl.o archive.o authen.o help.o io.o generate-cookie.o \ - filter.o handleacl.o hermes.o index.o config-files.o \ - listserv.o mailer.o members.o parsearray.o password.o \ - rfcparse.o subscribe.o tool.o unsubscribe.o main.o \ - queue-command.o queue-posting.o approve.o address-db.o \ - version.o -LIBS = librfc822/librfc822.a libmpools/libmpools.a \ - liblists/liblists.a libargv/libargv.a \ - libconfigfile/libconfigfile.a libtext/libtext.a @LIBS@ - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -all: petidomo petidomo.1 - -petidomo: $(OBJS) $(LIBS) - $(CC) $(OBJS) -o $@ $(LDFLAGS) $(LIBS) - -petidomo.1: petidomo.pod - V=`$(SHTOOL) version -lc -dlong version.c`; \ - sed -e "s;@V@;$$V;g" /tmp/petidomo.pod; \ - pod2man --section=1 --date="$$V" \ - --center="Petidomo" --release="Petidomo" \ - /tmp/petidomo.pod >petidomo.1; \ - rm -f /tmp/petidomo.pod - -acl.c acl-scan.h: acl.y - $(YACC) -d -p acl acl.y - mv y.tab.c acl.c - mv y.tab.h acl-scan.h - -acl-scan.c: acl-scan.l acl-scan.h - $(LEX) -i -Pacl acl-scan.l - mv lex.acl.c acl-scan.c - -acl.c: acl-scan.c - -$(LIBS): - @subdir=`echo $@ | sed -e 's@/.*@@'`; \ - echo "===> $$subdir"; \ - cd $$subdir && $(MAKE) $(FLAGS_TO_PASS); \ - echo "<=== $$subdir" - -install: all - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sysconfdir) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/ack-queue - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libexecdir) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 - $(SHTOOL) install -c -s -m 555 petidomo $(DESTDIR)$(bindir) - $(SHTOOL) install -c -m 755 petidomo-approve $(DESTDIR)$(bindir) - $(SHTOOL) install -c -m 755 petidomo-kickout $(DESTDIR)$(bindir) - $(SHTOOL) install -c -m 644 petidomo.1 $(DESTDIR)$(mandir)/man1/petidomo.1 - $(SHTOOL) install -c -m 644 config/petidomo.conf $(DESTDIR)$(sysconfdir)/petidomo.conf-sample - $(SHTOOL) install -c -m 644 config/petidomo.acl $(DESTDIR)$(sysconfdir)/petidomo.acl-sample - $(SHTOOL) install -c -m 444 config/help $(DESTDIR)$(datadir) - if [ ! -f $(DESTDIR)$(localstatedir)/index ] ; then $(SHTOOL) install -c -m 444 config/index $(DESTDIR)$(localstatedir); fi - $(SHTOOL) install -c -m 555 filter/insert-name-in-subject.sh $(DESTDIR)$(libexecdir) - $(SHTOOL) install -c -m 555 filter/pgp-decrypt.sh $(DESTDIR)$(libexecdir) - $(SHTOOL) install -c -m 555 filter/pgp-encrypt.sh $(DESTDIR)$(libexecdir) - $(SHTOOL) install -c -m 555 filter/rfc2369.sh $(DESTDIR)$(libexecdir) - -install-testlist: - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/lists/testlist - $(SHTOOL) install -c -m 644 config/list-config $(DESTDIR)$(localstatedir)/lists/testlist/config - $(SHTOOL) install -c -m 644 config/list-acl $(DESTDIR)$(localstatedir)/lists/testlist/acl - @rm -f $(DESTDIR)$(localstatedir)/lists/testlist/list - $(SHTOOL) install -c -m 644 /dev/null $(DESTDIR)$(localstatedir)/lists/testlist/list - -clean distclean realclean:: - @for subdir in lib* docs; do \ - echo "===> $$subdir"; \ - (cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@); \ - echo "<=== $$subdir"; \ - done - -clean:: - rm -f petidomo - rm -f petidomo.1 - rm -f $(OBJS) - rm -f acl-scan.c acl-scan.h acl.c - -distclean:: clean - rm -f config.log config.cache config.status Makefile - -realclean:: distclean - rm -f configure - -# increase or update version information -new-version: - @V="$(VERSION)"; OPT="-e"; [ ".$$V" != . ] && OPT="-s$$V"; \ - $(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c -update-version: - @OPT="-s`$(SHTOOL) version -lc -dshort version.c`"; \ - $(SHTOOL) version -lc -n 'Petidomo' -p petidomo_ $$OPT version.c - -# roll release or snapshot source distribution tarballs -dist: distclean - @echo "Rolling RELEASE source distribution tarball"; \ - $(SHTOOL) fixperm *; \ - V=`$(SHTOOL) version -lc -dshort version.c`; \ - $(SHTOOL) tarball \ - -o petidomo-$$V.tar.gz -d petidomo-$$V -u ossp -g petidomo \ - -e 'CVS,\.cvsignore,\.configure,ChangeLog*,\.\#.*,*~$$,\.[ao]$$' \ - -c 'gzip -9' .; \ - ls -l petidomo-$$V.tar.gz -snap: distclean - @echo "Rolling SNAPSHOT source distribution tarball"; \ - $(SHTOOL) fixperm *; \ - D=`date '+%Y%d%m'`; \ - $(SHTOOL) tarball \ - -o petidomo-SNAP-$$D.tar.gz -d petidomo-SNAP-$$V -u ossp -g petidomo \ - -e 'CVS,\.cvsignore,\.configure,ChangeLog*,\.\#.*,*~$$,\.[ao]$$' \ - -c 'gzip -9' .; \ - ls -l petidomo-SNAP-$$D.tar.gz - -# Dependencies - -acl.o: libtext/text.h petidomo.h acl-scan.c acl-scan.h -acl-scan.o: acl-scan.h -address-db.o: libtext/text.h petidomo.h -approve.o: petidomo.h libtext/text.h -archive.o: libtext/text.h petidomo.h -authen.o: libtext/text.h petidomo.h -config-files.o: libtext/text.h liblists/lists.h libconfigfile/configfile.h -config-files.o: petidomo.h -filter.o: petidomo.h -generate-cookie.o: petidomo.h -handleacl.o: petidomo.h -help.o: libtext/text.h petidomo.h -hermes.o: libtext/text.h petidomo.h -index.o: libtext/text.h petidomo.h -io.o: petidomo.h -listserv.o: libtext/text.h petidomo.h -mailer.o: libtext/text.h petidomo.h -main.o: libargv/argv.h libtext/text.h petidomo.h version.c -members.o: libtext/text.h petidomo.h -parsearray.o: petidomo.h -password.o: petidomo.h -queue-command.o: libtext/text.h petidomo.h -queue-posting.o: libtext/text.h petidomo.h -rfcparse.o: librfc822/rfc822.h libtext/text.h petidomo.h -subscribe.o: libtext/text.h petidomo.h -tool.o: libtext/text.h petidomo.h -unsubscribe.o: libtext/text.h petidomo.h diff --git a/acl.y b/acl-parser.y similarity index 98% rename from acl.y rename to acl-parser.y index 3aa5b32..e005d71 100644 --- a/acl.y +++ b/acl-parser.y @@ -43,7 +43,7 @@ struct Mail * g_MailStruct; #define YYERROR_VERBOSE %} -%token TOK_IF TOK_EQUAL TOK_EQUAL TOK_FROM TOK_SUBJECT +%token TOK_IF TOK_EQUAL TOK_FROM TOK_SUBJECT %token TOK_ENVELOPE TOK_HEADER TOK_BODY TOK_AND TOK_OR TOK_NOT %token TOK_THEN TOK_MATCH TOK_STRING TOK_DROP TOK_PASS TOK_APPROVE %token TOK_REDIRECT TOK_FORWARD TOK_REJECT TOK_REJECTWITH @@ -262,11 +262,11 @@ int checkACL(struct Mail * MailStruct, switch(errno) { case ENOENT: /* no master acl file */ - syslog(LOG_WARNING, "You have no global acl file (%s). This is probably not a good idea.", + syslog(LOG_WARNING, "You have no global acl file (%s). This is probably not a good idea.", (type == ACL_PRE ? MasterConfig->acl_file_pre : MasterConfig->acl_file_post)); goto check_local_acl_file; default: - syslog(LOG_ERR, "Couldn't open \"%s\" acl file: %s", + syslog(LOG_ERR, "Couldn't open \"%s\" acl file: %s", (type == ACL_PRE ? MasterConfig->acl_file_pre : MasterConfig->acl_file_post), strerror(errno)); return -1; } @@ -280,7 +280,7 @@ int checkACL(struct Mail * MailStruct, yyin = NULL; } if (rc != 0) { - syslog(LOG_ERR, "Parsing \"%s\" file returned with an error.", + syslog(LOG_ERR, "Parsing \"%s\" file returned with an error.", (type == ACL_PRE ? MasterConfig->acl_file_pre : MasterConfig->acl_file_post)); return -1; } @@ -312,7 +312,7 @@ check_local_acl_file: /* no list acl file */ goto finished; default: - syslog(LOG_ERR, "Couldn't open acl file \"%s\": %s", + syslog(LOG_ERR, "Couldn't open acl file \"%s\": %s", (type == ACL_PRE ? ListConfig->acl_file_pre : ListConfig->acl_file_post), strerror(errno)); return -1; @@ -323,7 +323,7 @@ check_local_acl_file: fclose(yyin); yyin = NULL; if (rc != 0) { - syslog(LOG_ERR, "Parsing \"%s\" file returned with an error.", + syslog(LOG_ERR, "Parsing \"%s\" file returned with an error.", (type == ACL_PRE ? ListConfig->acl_file_pre : ListConfig->acl_file_post)); return -1; } diff --git a/acl-scan.l b/acl-scanner.l similarity index 100% rename from acl-scan.l rename to acl-scanner.l diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..cc6e4de --- /dev/null +++ b/configure.ac @@ -0,0 +1,98 @@ +dnl configure.ac -- Process this file with autoconf to produce a configure script. + +AC_INIT([petidomo], [4.1-beta-1], [simons@cryp.to]) +AC_CONFIG_SRCDIR([petidomo.h]) +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([-Wall -Werror 1.10 gnu filename-length-max=99 tar-v7]) +AC_CONFIG_MACRO_DIR([build-aux]) + +AC_COPYRIGHT([dnl +Copyright (C) 1997-2008 Peter Simons +Copyright (C) 1999-2000 CyberSolutions GmbH, Germany. +Copyright (C) 2000 Cable & Wireless Corp. + +Petidomo 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 3 of the License, or (at your +option) any later version. + +Petidomo 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 Petidomo. If not, see .]) + +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_RANLIB +AM_PROG_LEX +if test "$LEX" != "flex"; then + AC_MSG_WARN([$LEX might not work; install flex if the build fails.]) +fi +AC_PROG_YACC +if test "$YACC" != "bison -y"; then + AC_MSG_WARN([$YACC might not work; install bison if the build fails.]) +fi + +AC_CHECK_SIZEOF(unsigned short, 2) +AC_CHECK_SIZEOF(unsigned int, 4) +AC_CHECK_SIZEOF(unsigned long, 4) + +AC_SUBST(mta) +AC_ARG_WITH(mta, [ --with-mta=PATH location of the mail transport agent (sendmail?)], + [ + if test "$withval" = "no" -o "$withval" = "yes"; then + AC_MSG_ERROR([The --with-mta option expects a path as parameter!]) + fi + AC_MSG_CHECKING(for the location of the mail transport agent) + mta=$withval + AC_MSG_RESULT($mta) + if test ! -f $mta; then + AC_MSG_WARN(The specified MTA '$mta' does not exist.) + elif test ! -x $mta; then + AC_MSG_WARN(The specified MTA '$mta' is not executable.) + fi + ], + [ + AC_PATH_PROG(mta, sendmail, none, $PATH:/usr/lib:/etc/usr/etc) + if test "$mta" = "none"; then + AC_MSG_ERROR(Cannot locate your mail transport agent.) + fi + ]) + +dnl Include debug code? + +AC_MSG_CHECKING([whether to include debugging capabilities]) +AC_ARG_WITH(debug, [ --with-debug Support debugging? (default: yes)], + [ + if test "$withval" = "no"; then + AC_MSG_RESULT(no) + elif test "$withval" = "yes"; then + CPPFLAGS="$CPPFLAGS -DDEBUG" + AC_MSG_RESULT(yes) + fi + ], + [ + CPPFLAGS="$CPPFLAGS -DDEBUG" + AC_MSG_RESULT(yes) + ]) + +dnl other system stuff + +AC_SYS_LARGEFILE + +dnl Grande Finale + +AC_CONFIG_FILES([ + Makefile + docs/Makefile + libargv/Makefile + libconfigfile/Makefile + liblists/Makefile + libmpools/Makefile + librfc822/Makefile + libtext/Makefile +]) +AC_OUTPUT diff --git a/configure.in b/configure.in deleted file mode 100644 index 7ed07c0..0000000 --- a/configure.in +++ /dev/null @@ -1,53 +0,0 @@ -dnl -dnl configure.in -- Process this file with autoconf to produce a configure script. -dnl -dnl $Header$ -dnl - -AC_INIT(petidomo.h) - -dnl Print the standard OSSP. -dnl -dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE) -V=`./shtool version -lc -dlong version.c` -./shtool echo -e "Configuring %BOSSP Petidomo%b, Version %B${V}%b" -dnl AC_DIVERT_POP() - -dnl Get rid of the lousy -g and -O defaults in CFLAGS. -dnl -CFLAGS=${CFLAGS:-} - -dnl Checks for paths and programs. -dnl -AC_PROG_CC -AC_PROG_RANLIB -AC_PROG_LEX -if test "$LEX" != "flex"; then - AC_MSG_WARN($LEX might not work for us. Please install flex if the build fails.) -fi -AC_PROG_YACC -if test "$YACC" != "bison -y"; then - AC_MSG_WARN($YACC might not work for us. Please install bison if the build fails.) -fi - -dnl Find out what sizes the types have. -dnl -AC_CHECK_SIZEOF(unsigned short, 2) -AC_CHECK_SIZEOF(unsigned int, 4) -AC_CHECK_SIZEOF(unsigned long, 4) - -dnl Checks for typedefs -dnl -AC_CHECK_TYPE(ssize_t, long) - -dnl Set special flags for gcc. -dnl -if test "$GCC" = yes; then - CFLAGS="$CFLAGS -Wall -pedantic -pipe" -fi - -dnl Write results. -dnl -AC_OUTPUT(Makefile) -AC_CONFIG_HEADERS(config.h) - diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index e462f10..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# -# Petidomo User Manual -# -# $Header$ -# - -.SUFFIXES: -.SUFFIXES: .tex .dvi .ps - -.tex.dvi: - latex \\nonstopmode\\input $<; \ - while grep 'Rerun to' $*.log; do \ - latex \\nonstopmode\\input $<; \ - done - -.dvi.ps: - dvips $< -o $@ - -all: petidomo.ps - -clean distclean realclean: - rm -f petidomo.aux petidomo.dvi petidomo.log petidomo.ps petidomo.toc diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 0000000..0b8d76f --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,17 @@ +# +# Petidomo User Manual +# + +# .tex.dvi: +# latex \\nonstopmode\\input $<; \ +# while grep 'Rerun to' $*.log; do \ +# latex \\nonstopmode\\input $<; \ +# done +# +# .dvi.ps: +# dvips $< -o $@ +# +# all: petidomo.ps +# +# clean distclean realclean: +# rm -f petidomo.aux petidomo.dvi petidomo.log petidomo.ps petidomo.toc diff --git a/libargv/Makefile b/libargv/Makefile deleted file mode 100644 index 3624a9b..0000000 --- a/libargv/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# Build the libargv library. -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -libargv.a: argv.o - $(AR) cr libargv.a argv.o - $(RANLIB) libargv.a - -test: test.o libargv.a - $(CC) $(LDFLAGS) test.o libargv.a -o test - -realclean distclean clean:: - rm -f libargv.a argv.o test.o test argv.info - -# Dependencies - -argv.o: argv.h argv_loc.h -test.o: argv.h diff --git a/libargv/Makefile.am b/libargv/Makefile.am new file mode 100644 index 0000000..bbf4c10 --- /dev/null +++ b/libargv/Makefile.am @@ -0,0 +1,6 @@ +# Build libargv + +noinst_LIBRARIES = libargv.a +libargv_a_SOURCES = argv.c + +noinst_HEADERS = argv.h argv_loc.h diff --git a/libconfigfile/Makefile b/libconfigfile/Makefile deleted file mode 100644 index f175a25..0000000 --- a/libconfigfile/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Build the libconfigfile library. -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -libconfigfile.a: config.o - $(AR) cr libconfigfile.a config.o - $(RANLIB) libconfigfile.a - -realclean distclean clean:: - rm -f libconfigfile.a config.o - -# Dependencies - -config.o: ../liblists/lists.h ../libtext/text.h configfile.h diff --git a/libconfigfile/Makefile.am b/libconfigfile/Makefile.am new file mode 100644 index 0000000..1aa3b1e --- /dev/null +++ b/libconfigfile/Makefile.am @@ -0,0 +1,6 @@ +# Build libconfigfile + +noinst_LIBRARIES = libconfigfile.a +libconfigfile_a_SOURCES = config.c + +noinst_HEADERS = configfile.h diff --git a/liblists/Makefile b/liblists/Makefile deleted file mode 100644 index 30dc023..0000000 --- a/liblists/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# Build the liblists library. -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -liblists.a: lists.o - $(AR) cr liblists.a lists.o - $(RANLIB) liblists.a - -realclean distclean clean:: - rm -f liblists.a lists.o diff --git a/liblists/Makefile.am b/liblists/Makefile.am new file mode 100644 index 0000000..5b5eff0 --- /dev/null +++ b/liblists/Makefile.am @@ -0,0 +1,6 @@ +# Build liblists + +noinst_LIBRARIES = liblists.a +liblists_a_SOURCES = lists.c + +noinst_HEADERS = lists.h diff --git a/libmpools/Makefile b/libmpools/Makefile deleted file mode 100644 index 059c4cd..0000000 --- a/libmpools/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# Build the libmpools library. -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -libmpools.a: mpools.o - $(AR) cr libmpools.a mpools.o - $(RANLIB) libmpools.a - -realclean distclean clean:: - rm -f libmpools.a mpools.o diff --git a/libmpools/Makefile.am b/libmpools/Makefile.am new file mode 100644 index 0000000..fb22c6a --- /dev/null +++ b/libmpools/Makefile.am @@ -0,0 +1,6 @@ +# Build libmpools + +noinst_LIBRARIES = libmpools.a +libmpools_a_SOURCES = mpools.c + +noinst_HEADERS = mpools.h diff --git a/librfc822/.gitignore b/librfc822/.gitignore new file mode 100644 index 0000000..47c9c1b --- /dev/null +++ b/librfc822/.gitignore @@ -0,0 +1,4 @@ +address.c +address.h +address_scan.c +test diff --git a/librfc822/Makefile b/librfc822/Makefile deleted file mode 100644 index 1a80469..0000000 --- a/librfc822/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Build the rfc822 Library -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -OBJS = address.o address_scan.o decomment.o address_sep.o - - -librfc822.a: $(OBJS) - $(AR) cr librfc822.a $(OBJS) - $(RANLIB) librfc822.a - -address.c address_scan.h: address.y rfc822.h parse_address.c - $(YACC) -d -p "rfc822_" address.y - mv y.tab.c address.c - mv y.tab.h address_scan.h - -address_scan.c: address_scan.l rfc822.h - $(LEX) -Prfc822_ address_scan.l - mv lex.rfc822_.c $@ - -address.c: address_scan.c - -realclean distclean clean:: - rm -f librfc822.a test test.o - rm -f address.c address_scan.c address_scan.h - rm -rf $(OBJS) - -# Dependencies - -address.o: address.c address_scan.h address_scan.c parse_address.c -address_scan.c: address_scan.l -decomment.c: rfc822.h -address_sep.c: rfc822.h diff --git a/librfc822/Makefile.am b/librfc822/Makefile.am new file mode 100644 index 0000000..a7425b9 --- /dev/null +++ b/librfc822/Makefile.am @@ -0,0 +1,17 @@ +# Build librfc822 + +AM_YFLAGS = -d +AM_LFLAGS = -i + +noinst_LIBRARIES = librfc822.a +noinst_HEADERS = rfc822.h +librfc822_a_SOURCES = \ + address.y address_scan.l address_sep.c decomment.c + +noinst_PROGRAMS = test +test_SOURCES = test.c ../libmpools/mpools.c ../liblists/lists.c +test_LDADD = librfc822.a + +EXTRA_DIST = testaddresslines parse_address.c + +DISTCLEANFILES = address.c address_scan.c diff --git a/libtext/Makefile b/libtext/Makefile deleted file mode 100644 index 6fd6195..0000000 --- a/libtext/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# -# Build the libtext library. -# -# $Header$ -# - -CC = gcc -AR = ar -RANLIB = ranlib - -CFLAGS = -Wall -pedantic -O3 -CPPFLAGS = -LDFLAGS = - -OBJECTS = easy_pattern_match.o find_next_line.o find_string.o \ - easy_sprintf.o transform_text.o wordwrap.o - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< - -libtext.a: $(OBJECTS) - $(AR) cr libtext.a $(OBJECTS) - $(RANLIB) libtext.a - -realclean distclean clean:: - rm -f libtext.a $(OBJECTS) - -# Dependencies - -easy_pattern_match.o: text.h -easy_sprintf.o: text.h -find_next_line.o: text.h -find_string.o: text.h -transform_text.o: text.h -wordwrap.o: text.h diff --git a/libtext/Makefile.am b/libtext/Makefile.am new file mode 100644 index 0000000..fa9ff96 --- /dev/null +++ b/libtext/Makefile.am @@ -0,0 +1,8 @@ +# Build libtext + +noinst_LIBRARIES = libtext.a +libtext_a_SOURCES = \ + easy_pattern_match.c find_next_line.c find_string.c \ + easy_sprintf.c transform_text.c wordwrap.c + +noinst_HEADERS = text.h