Migrated build system to Automake.
This commit is contained in:
parent
9a145180f6
commit
78d117b6cb
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
@ -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
|
||||
86
Makefile.am
Normal file
86
Makefile.am
Normal file
@ -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" <petidomo.pod >/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
|
||||
183
Makefile.in
183
Makefile.in
@ -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" <petidomo.pod >/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
|
||||
@ -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
|
||||
98
configure.ac
Normal file
98
configure.ac
Normal file
@ -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 <simons@cryp.to>
|
||||
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 <http://www.gnu.org/licenses/>.])
|
||||
|
||||
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
|
||||
53
configure.in
53
configure.in
@ -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)
|
||||
|
||||
@ -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
|
||||
17
docs/Makefile.am
Normal file
17
docs/Makefile.am
Normal file
@ -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
|
||||
@ -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
|
||||
6
libargv/Makefile.am
Normal file
6
libargv/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
# Build libargv
|
||||
|
||||
noinst_LIBRARIES = libargv.a
|
||||
libargv_a_SOURCES = argv.c
|
||||
|
||||
noinst_HEADERS = argv.h argv_loc.h
|
||||
@ -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
|
||||
6
libconfigfile/Makefile.am
Normal file
6
libconfigfile/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
# Build libconfigfile
|
||||
|
||||
noinst_LIBRARIES = libconfigfile.a
|
||||
libconfigfile_a_SOURCES = config.c
|
||||
|
||||
noinst_HEADERS = configfile.h
|
||||
@ -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
|
||||
6
liblists/Makefile.am
Normal file
6
liblists/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
# Build liblists
|
||||
|
||||
noinst_LIBRARIES = liblists.a
|
||||
liblists_a_SOURCES = lists.c
|
||||
|
||||
noinst_HEADERS = lists.h
|
||||
@ -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
|
||||
6
libmpools/Makefile.am
Normal file
6
libmpools/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
# Build libmpools
|
||||
|
||||
noinst_LIBRARIES = libmpools.a
|
||||
libmpools_a_SOURCES = mpools.c
|
||||
|
||||
noinst_HEADERS = mpools.h
|
||||
4
librfc822/.gitignore
vendored
Normal file
4
librfc822/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
address.c
|
||||
address.h
|
||||
address_scan.c
|
||||
test
|
||||
@ -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
|
||||
17
librfc822/Makefile.am
Normal file
17
librfc822/Makefile.am
Normal file
@ -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
|
||||
@ -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
|
||||
8
libtext/Makefile.am
Normal file
8
libtext/Makefile.am
Normal file
@ -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
|
||||
Loading…
Reference in New Issue
Block a user