This commit is contained in:
Graeme Walker 2008-03-29 12:00:00 +00:00
parent 07c5291f07
commit 216dd32ebf
496 changed files with 18434 additions and 5773 deletions

View File

@ -4,10 +4,13 @@ Graeme Walker <graeme_walker@users.sourceforge.net>
Binary distributions
--------------------
Binary distributions of E-MailRelay may include code from:
Binary distributions of E-MailRelay may include copyrighted code from:
* OpenSSL Toolkit (http://www.openssl.org)
* MinGW (http://www.mingw.org)
* Trolltech Qt (http://trolltech.com)
These are distributed under licenses compatible with the GPLv3. Please
refer to their websites for further details.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)

View File

@ -1,6 +1,22 @@
E-MailRelay Change Log
======================
1.7 -> 1.8
----------
* Speed optimisations (as identified by KCachegrind/valgrind in KDevelop).
* Build-time size optimisations (eg. "./configure --disable-exec --enable-small-exceptions ...").
* Build-time options to reduce runtime library dependencies (eg. "./configure --disable-dns --disable-identity").
* New switch to limit the size of submitted messages ("--size").
* New semantics for "--poll 0", providing a good alternative to "--immediate" when proxying.
* SMTP client protocol emits a RSET after a rejected recipient as a workround for broken server protocols.
* SMTP client protocol continues if the server advertises AUTH but the client has no authentication secrets.
* When a message cannot be forwarded the offending SMTP protocol response number, if any, is put in the envelope file.
* A warning is printed if logging is requested but both stderr and syslog are disabled.
* A cross-compiling toolchain builder script added for running on mips-based routers ("extra/mips").
* New example scripts for SMTP multicasting and editing envelope files.
* Improved native support for Mac OS X (10.5) with graphical installation from disk image.
* Compatibility with gcc 2.95 restored.
1.6 -> 1.7
----------
* TLS/SSL support for SMTP using OpenSSL ("./configure --with-openssl" with "--client-tls" and "--server-tls").

View File

@ -8,9 +8,9 @@ FreeBSD etc. Windows specific installation instructions are in a separate
document, "doc/windows.txt".
The E-MailRelay "configure" script provides a few extra confiruation switches,
which are shown in the output of "./configure --help". The most important of
these is "--enable-fhs", which overrides all other directory modifiers, forcing
compliance with the File Hierarchy Standard.
which are shown in the output of "./configure --help". One of these is
"--enable-fhs", which sets the default directories to comply with the File
Hierarchy Standard.
There are also a set of variables which can be defined on the "configure"
command line for controlling all the installation directories in more detail,

92
LICENSE
View File

@ -1,93 +1,3 @@
Licenses
========
Source distributions
--------------------
Permission to copy E-MailRelay is under the terms of the GPLv3 license. The text
of the license is in the file "COPYING".
Binary distributions
--------------------
Binary distributions of E-MailRelay may also include code from:
* OpenSSL Toolkit (http://www.openssl.org)
* MinGW (http://www.mingw.org)
* Trolltech Qt (http://trolltech.com)
OpenSSL
-------
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
OpenSSL is dual-licensed, including the following:
/* ====================================================================
* Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
MinGW
-----
The MinGW runtime that is included in the Windows binary distributions of
E-MailRelay is uncopyrighted and in the public domain.
Trolltech Qt
------------
The Qt runtime that is included in the Windows binary distributions of
E-MailRelay is dual-licensed, including the GPLv2 (see http://www.gnu.org).
E-MailRelay is not a derived work and so the terms of the GPLv2 only apply to
the Qt runtime files within the E-MailRelay binary distribution.
The Qt GUI Toolkit is Copyright (C) 1994-2006 Trolltech ASA.
Qt source code is available from the Trolltech web site,
http://trolltech.com.
See AUTHORS and COPYING.

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -14,8 +14,45 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = emailrelay.spec ChangeLog README.windows LICENSE
SUBDIRS = src bin lib etc doc test
EXTRA_DIST = \
emailrelay.spec \
ChangeLog \
README.windows \
README.mips \
README.mac \
LICENSE \
bootstrap \
autogen.sh \
emailrelay-gui.xcodeproj/project.pbxproj \
emailrelay.xcodeproj/project.pbxproj
SUBDIRS = bin src lib etc doc test extra
e_doc_DATA = NEWS README ChangeLog
uninstall-local:
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
-for d in "$(DESTDIR)$(e_sysconfdir)" "$(DESTDIR)$(e_libexecdir)" "$(DESTDIR)$(e_examplesdir)" "$(DESTDIR)$(e_spooldir)" "$(DESTDIR)$(e_initdir)" "$(DESTDIR)$(e_docdir)/man/man1" "$(DESTDIR)$(e_docdir)/man" "$(DESTDIR)$(e_docdir)" ; do rmdir "$$d" 2>/dev/null ; done
RPM_ROOT=/usr/src/rpm
RPM=$(RPM_ROOT)/RPMS/i386/emailrelay-$(VERSION)-1.i386.rpm
DEB=emailrelay_$(VERSION)-1_i386.deb
TAR=emailrelay-$(VERSION).tar.gz
.PHONY: rpm
rpm: $(RPM)
$(RPM): dist
-rm -rf $(RPM_ROOT)/BUILD/emailrelay-$(VERSION)
cp $(TAR) $(RPM_ROOT)/SOURCES/emailrelay-$(VERSION)-src.tar.gz
cp emailrelay.spec $(RPM_ROOT)/SPECS
chown root:root $(RPM_ROOT)/SPECS/emailrelay.spec
rpmbuild -ba $(RPM_ROOT)/SPECS/emailrelay.spec
.PHONY: deb
deb: $(DEB)
$(DEB): $(RPM)
-mv emailrelay-$(VERSION) emailrelay-$(VERSION).old.$$
alien --to-deb --generate --single --keep-version $(RPM)
sed -i 's/^Section:.*/Section: mail/' emailrelay-$(VERSION)/debian/control
sed -i 's/^Maintainer:.*/Maintainer: Graeme Walker <graeme_walker@users.sourceforge.net>/' emailrelay-$(VERSION)/debian/control
cd emailrelay-$(VERSION) && debian/rules binary

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,6 +14,9 @@
@SET_MAKE@
#
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -103,6 +106,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -112,7 +116,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -136,7 +139,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -191,12 +193,24 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = \
emailrelay.spec \
ChangeLog \
README.windows \
README.mips \
README.mac \
LICENSE \
bootstrap \
autogen.sh \
emailrelay-gui.xcodeproj/project.pbxproj \
emailrelay.xcodeproj/project.pbxproj
#
#
EXTRA_DIST = emailrelay.spec ChangeLog README.windows LICENSE
SUBDIRS = src bin lib etc doc test
SUBDIRS = bin src lib etc doc test extra
e_doc_DATA = NEWS README ChangeLog
RPM_ROOT = /usr/src/rpm
RPM = $(RPM_ROOT)/RPMS/i386/emailrelay-$(VERSION)-1.i386.rpm
DEB = emailrelay_$(VERSION)-1_i386.deb
TAR = emailrelay-$(VERSION).tar.gz
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -344,8 +358,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@ -370,8 +384,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -381,13 +395,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@ -458,6 +471,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@ -484,6 +501,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@ -637,7 +656,7 @@ uninstall-am: uninstall-e_docDATA uninstall-local
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
@ -650,8 +669,26 @@ uninstall-am: uninstall-e_docDATA uninstall-local
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-e_docDATA uninstall-local
uninstall-local:
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
-for d in "$(DESTDIR)$(e_sysconfdir)" "$(DESTDIR)$(e_libexecdir)" "$(DESTDIR)$(e_examplesdir)" "$(DESTDIR)$(e_spooldir)" "$(DESTDIR)$(e_initdir)" "$(DESTDIR)$(e_docdir)/man/man1" "$(DESTDIR)$(e_docdir)/man" "$(DESTDIR)$(e_docdir)" ; do rmdir "$$d" 2>/dev/null ; done
.PHONY: rpm
rpm: $(RPM)
$(RPM): dist
-rm -rf $(RPM_ROOT)/BUILD/emailrelay-$(VERSION)
cp $(TAR) $(RPM_ROOT)/SOURCES/emailrelay-$(VERSION)-src.tar.gz
cp emailrelay.spec $(RPM_ROOT)/SPECS
chown root:root $(RPM_ROOT)/SPECS/emailrelay.spec
rpmbuild -ba $(RPM_ROOT)/SPECS/emailrelay.spec
.PHONY: deb
deb: $(DEB)
$(DEB): $(RPM)
-mv emailrelay-$(VERSION) emailrelay-$(VERSION).old.$$
alien --to-deb --generate --single --keep-version $(RPM)
sed -i 's/^Section:.*/Section: mail/' emailrelay-$(VERSION)/debian/control
sed -i 's/^Maintainer:.*/Maintainer: Graeme Walker <graeme_walker@users.sourceforge.net>/' emailrelay-$(VERSION)/debian/control
cd emailrelay-$(VERSION) && debian/rules binary
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

6
README
View File

@ -105,19 +105,21 @@ and on Windows 98 using:
Versions of the code have also been built successfully on:
* MacOS X 10.3.9
* MacOS X 10.5.1 using gcc 4.0.1 on G4 PPC hardware
* FreeBSD on Intel hardware
* Linux on Alpha hardware (Debian 2.2)
* Linux on Sparc hardware
* Linux on RS6000 PPC hardware
* Linux using intel c++ 6.0
* Linux using intel c++ 10.1
* Linux 2.4.20 using gcc 3.4.6 on MIPS (mipsel)
* Solaris 8 using gcc on Sparc hardware
* Solaris 8 using WorkShop 5.0
* Linux using intel c++ 6.0
* Windows NT 4.0 using MSVC 6.0
* Windows NT 4.0 using Cygwin (DLL 1.3.22) and gcc 3.2
* Windows NT 4.0 using MinGW 2.0.0 and gcc 3.2
* Windows XP using MinGW 3.1.0 gcc 3.4.2
Feedback
--------
Please feel free to e-mail the author at

35
README.mac Normal file
View File

@ -0,0 +1,35 @@
E-MailRelay on Mac OS X
=======================
Building from source
--------------------
E-MailRelay can be built on a Mac as if it is a vanilla unix system; the
standard "configure; make; sudo make install" procedure for building and
installing from source should work well enough.
For best results use the "bin/configure-mac.sh" script to run "configure" with
directory paths that are more Mac-like (see below).
The "make" step will only build executables for the native architecture. Xcode
can be used to build universal binaries. Project files for xcode 3 are supplied.
Directories
-----------
The preferred installation directories are:
* "/Applications/E-MailRelay" for the application
* "/Applications/E-MailRelay/Documentation" for the documentation
* "/Applications/E-MailRelay" for the configuration (not "/Library/Preferences/E-MailRelay")
* "/Library/Mail/Spool" for the spool directory
* "/Library/StartupItems/E-MailRelay" for the boot-time startup script
Installation can also be done into the User "domain", ie. under "~/Applications"
and "~/Library" using "make install DESTDIR=~", although starting up at
boot-time will not then work.
Moving the system after installation, or installing to any other directories,
is not guaranteed to work correctly.
Binary distribution
-------------------
Graphical installation from the disk image has been developed using Mac OS X
10.5 ("Leopard"). Bug reports for other versions of OS X are welcome.

24
README.mips Normal file
View File

@ -0,0 +1,24 @@
E-MailRelay MIPS
================
To help with running E-MailRelay on MIPS-based routers, such as the Buffalo
WHR-G54S, a makefile for building a cross-compiler toolchain is provided as
"extra/mips/toolchain.mak".
The shell script "extra/mips/configure-mips.sh" can be used to run the main
E-MailRelay "configure" script with all the size optimisations suitable for an
embedded target system.
These build-time size optimisations yield the following approximate savings for
the main executable:
* "--disable-exec" 184k
* "--enable-small-config" 121k
* "--disable-pop" 121k
* "--disable-auth" 109k
* "--disable-debug" 67k
* "--disable-admin" 63k
* "--enable-small-exceptions" 46k
* "--enable-small-fragments" 32k
* "--disable-proxy" 30k
* "--disable-dns" 26k
* "--disable-verbose" 15k

View File

@ -1 +1,78 @@
See doc/windows.txt
E-MailRelay Windows
===================
Setup program
-------------
Installing E-MailRelay on Windows should be straightforward if you have
self-extracting archive program "emailrelay-setup.exe". Make sure that the
setup program is in a writeable directory with plenty of space on the disk
because when you run it it will extract an installation GUI program plus
dependent DLLs in into the same directory.
The installation GUI will take you through the installation options and then
install the run-time files into your chosen directory.
Manual installation
-------------------
In summary, the manual installation process for Windows for when you do not have
the self-extracting setup program, is as follows:
* Create a new program directory "Program Files\emailrelay"
* Unzip into "Program Files\emailrelay"
* Create a new spool directory "<windir>\spool\emailrelay"
* Create a new text file, eg. "c:\emailrelay.auth", to contain account details
* Add your ISP account details to "emailrelay.auth" with a line like "login client myaccount mypassword"
* Drag "emailrelay.exe" onto the desktop to create a shortcut for the server.
* Drag again to create a shortcut for the forwarding client.
* Add "--as-server --verbose" to the server shortcut properties.
* Add "--as-client myisp.net:smtp --hidden --client-auth c:/emailrelay.auth" to the client shortcut.
Move shortcuts to "Startup" folders as necessary.
Running as a service
--------------------
To manually install E-MailRelay as a service so that it starts up automatically
at boot-time you must first create a one-line batch file called
"emailrelay-start.bat" in the main E-MailRelay directory containing
the full E-MailRelay server command-line. Then run "emailrelay-service --install"
to install the service.
When the E-MailRelay server is run in this way the "--no-daemon" and "--hidden"
switches are added automatically to whatever is in the "emailrelay-start" batch
file, so that there is no user interface. (The "--no-daemon" switch on Windows
changes the interface from using the system-tray to using a normal window, and
the "--hidden" switch suppresses the window and any message boxes.)
Note that the batch file and the main E-MailRelay executable must be in the same
directory.
If you need to run multiple E-MailRelay services then pass a unique service name
on the "emailrelay-server --install <name>" command-line. This name is used to
derive the name of the "<name>-start.bat" batch file that contains the
E-MailRelay server's command-line switches so you will need to create this too.
Diagnostics
-----------
E-MailRelay normally writes errors and warnings into the system event log, which
you can view by running "eventvwr.exe". You can increase the verbosity by adding
the "--verbose" switch to the E-MailRelay command-line, typically by editing the
"emailrelay-start.bat" batch script.
The E-MailRelay server also logs to the standard error stream, however the
"--as-server" and "--as-proxy" switches implicitly incorporate "--close-stderr"
so with these switches the standard error logging will stop soon after startup.
To get continuous logging to a log file you should replace "--as-server" with
"--log" and "--as-proxy" with "--immediate --forward-to" and then use "2>" to
redirect the standard error stream, eg:
"c:\program files\emailrelay\emailrelay.exe" --log -v -L ... > c:\temp.out 2>&1
Building from source
--------------------
E-MailRelay can be compiled using Microsoft Visual Studio C++ (MSVC) 6 or MinGW,
although the installation/configuration GUI can only be built with MinGW because
of its dependence on Qt.
There is a Visual Studio workspace file for MSVC 6 in the "src" directory. For
MinGW please follow the guidelines in "mingw-common.mak" which is also in the
"src" directory.

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -14,7 +14,9 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl ===
dnl socketlen_t
dnl aclocal-type-socketlen-t
dnl
dnl Defines HAVE_SOCKLEN_T.
dnl
AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t],[aclocal_type_socklen_t],
@ -33,7 +35,9 @@ AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T],
fi
])
dnl ipv6
dnl aclocal-check-ipv6
dnl
dnl Defines HAVE_IPV6.
dnl
AC_DEFUN([ACLOCAL_CHECK_IPV6],
[AC_CACHE_CHECK([for ipv6],[aclocal_ipv6],
@ -54,7 +58,10 @@ AC_DEFUN([ACLOCAL_CHECK_IPV6],
fi
])
dnl getipnodebyname for ipv6 rfc2553
dnl aclocal-check-getipnodebyname
dnl
dnl Defines HAVE_GETIPNODEBYNAME if the ipv6 function
dnl getipnodebyname() as per rfc2553 is available.
dnl
AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME],
[AC_CACHE_CHECK([for getipnodebyname],[aclocal_getipnodebyname],
@ -76,7 +83,9 @@ AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME],
fi
])
dnl check for sin6_len in sockaddr_in6
dnl aclocal-check-sin6-len
dnl
dnl Defines HAVE_SIN6_LEN if sin6_len is in sockaddr_in6.
dnl
AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN],
[AC_CACHE_CHECK([for sin6_len],[aclocal_sin6_len],
@ -96,7 +105,9 @@ AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN],
fi
])
dnl setgroups
dnl aclocal-check-setgroups
dnl
dnl Defines HAVE_SETGROUPS.
dnl
AC_DEFUN([ACLOCAL_CHECK_SETGROUPS],
[AC_CACHE_CHECK([for setgroups],[aclocal_setgroups],
@ -118,6 +129,8 @@ AC_DEFUN([ACLOCAL_CHECK_SETGROUPS],
dnl gmtime_r
dnl
dnl Defines HAVE_GMTIME_R.
dnl
AC_DEFUN([ACLOCAL_CHECK_GMTIME_R],
[AC_CACHE_CHECK([for gmtime_r],[aclocal_gmtime_r],
[
@ -134,7 +147,9 @@ AC_DEFUN([ACLOCAL_CHECK_GMTIME_R],
fi
])
dnl localtime_r
dnl aclocal-check-localtime_r
dnl
dnl Defines HAVE_LOCALTIME_R.
dnl
AC_DEFUN([ACLOCAL_CHECK_LOCALTIME_R],
[AC_CACHE_CHECK([for localtime_r],[aclocal_localtime_r],
@ -152,8 +167,10 @@ AC_DEFUN([ACLOCAL_CHECK_LOCALTIME_R],
fi
])
dnl buggy ctime
dnl sunpro5 ctime + unistd.h doesnt compile -- fix with time.h first
dnl aclocal-check-buggy-ctime
dnl
dnl Defines HAVE_BUGGY_CTIME if ctime + unistd.h doesnt compile.
dnl Needed for old versions of sunpro. Remove soon.
dnl
AC_DEFUN([ACLOCAL_CHECK_BUGGY_CTIME],
[AC_CACHE_CHECK([for buggy ctime],[aclocal_buggy_ctime],
@ -172,72 +189,270 @@ AC_DEFUN([ACLOCAL_CHECK_BUGGY_CTIME],
fi
])
dnl compiler name and version
dnl used for -Ilib/<version> -- only needed for pre 3.0
dnl gcc -- maps gcc2.96 onto gcc2.95
dnl aclocal-compiler-version
dnl
dnl Sets COMPILER_VERSION in makefiles.
dnl
dnl Used for -Ilib/<version>. Doesnt work very well but only
dnl needed for pre 3.0 gcc. Maps gcc2.96 onto gcc2.95.
dnl
AC_DEFUN([ACLOCAL_COMPILER_VERSION],
[
changequote(<<,>>)
COMPILER_VERSION=`$CXX --version 2>/dev/null | sed q | sed 's/[^0-9 .]*//g;s/\./ /g;s/^ *//;s/ /./;s/ .*//;s/^/gcc/' | sed 's/gcc2.96/gcc2.95/'`
if test -z "${COMPILER_VERSION}"
then
COMPILER_VERSION=`$CXX -V 2>&1 | sed q | grep WorkShop | sed 's/[^0-9]*//;s/[ \.].*//;s/^/sunpro/'`
fi
COMPILER_VERSION_GCC=`$CXX --version 2>/dev/null | sed q | grep GCC | sed 's/[a-zA-Z][a-zA-Z]*[0-9]*//g' | sed 's/[^0-9 .]*//g;s/\./ /g;s/^ *//;s/ /./;s/ .*//;s/^/gcc/' | sed 's/gcc2.96/gcc2.95/'`
COMPILER_VERSION_SUNPRO=`$CXX -V 2>&1 | sed q | grep WorkShop | sed 's/[^0-9]*//;s/[ \.].*//;s/^/sunpro/'`
COMPILER_VERSION_ICC=`$CXX --version 2>&1 | sed q | grep ICC | sed 's/[^0-9]*//;s/[ \.].*//;s/^/icc/'`
changequote([,])
COMPILER_VERSION="${COMPILER_VERSION_GCC}${COMPILER_VERSION_SUNPRO}${COMPILER_VERSION_ICC}"
AC_SUBST(COMPILER_VERSION)
])
dnl enable-debug
dnl aclocal-check-qt4
dnl
AC_DEFUN([ENABLE_DEBUG],
dnl Sets the $MOC variable and MOC in makefiles to the moc
dnl path if qt4 is found. Also sets the $aclocal_moc
dnl variable to the same value if the moc is from qt4.
dnl
dnl In the implementation remember that AC_PATH_PROG does
dnl nothing if the variable is already defined, and that
dnl it does an internal AC_SUBST.
dnl
dnl The PKG_CHECK_MODULES macro is used to modify CFLAGS etc.
dnl
AC_DEFUN([ACLOCAL_CHECK_QT4],
[
if test "$enable_debug" = "yes"
PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])])
MOC="${e_qtmoc}"
AC_PATH_PROG(MOC,moc)
if test "$MOC" != ""
then
AC_DEFINE(_DEBUG,1,[Define to enable extra debug messages at compile-time])
AC_MSG_CHECKING([moc is for qt 4])
if test x$GREP = x ; then GREP=grep ; fi
if test -x "$MOC" -a "`$MOC -v 2>&1 | $GREP 'Qt 4'`" != "" ; then
AC_MSG_RESULT([yes])
aclocal_moc="$MOC"
else
AC_MSG_RESULT([no])
aclocal_moc=""
fi
fi
])
dnl enable-gui
dnl
dnl Sets QT_LIBS, MOC and "if GUI" in makefiles if a GUI build is required.
dnl
dnl Requires ACLOCAL_CHECK_QT4 to have been run first.
dnl
AC_DEFUN([ENABLE_GUI],
[
qt4="no"
qt4moc="no"
if test "$enable_gui" = "no"
then
AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
MOC=""
else
PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])])
if test "$qt4" = "yes"
if test "$enable_gui" = "yes" -a "$aclocal_moc" = ""
then
MOC="${e_qtmoc}"
AC_PATH_PROG(MOC,moc)
AC_MSG_CHECKING([moc is for qt 4])
if test x$GREP = x ; then GREP=grep ; fi
if test -x "$MOC" -a "`$MOC -v 2>&1 | $GREP 'Qt 4'`" != "" ; then
AC_MSG_RESULT([yes])
qt4moc="yes"
else
AC_MSG_RESULT([no])
AC_MSG_WARN([ignoring --enable-gui, set e_qtmoc to a Qt4 moc program to override])
fi
else
QT_LIBS=""
MOC="$aclocal_moc"
fi
if test "`uname`" = "Darwin" -a "$QT_LIBS" = ""
then
QT_LIBS="-framework QtGui -framework QtCore"
fi
AC_SUBST(QT_LIBS)
fi
fi
if test "$qt4moc" = "yes"
then
AC_DEFINE(HAVE_GUI,1,[Define to 1 to enable gui code])
else
AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
fi
AC_SUBST(MOC)
AM_CONDITIONAL(GUI,test x$enable_gui != xno -a x$qt4moc = xyes )
AM_CONDITIONAL(GUI,test x$MOC != x )
if test x$enable_exec = xno -a x$MOC != x
then
AC_MSG_ERROR([using --disable-exec requires --disable-gui])
fi
])
dnl enable-debug
dnl
dnl Defines _DEBUG if requested. Defaults to "no" but
dnl allows "--enable-debug=full" as per kdevelop.
dnl
AC_DEFUN([ENABLE_DEBUG],
[
if test "$enable_debug" = "no" -o -z "$enable_debug"
then
:
else
AC_DEFINE(_DEBUG,1,[Define to enable extra debug messages at compile-time])
fi
])
dnl enable-verbose
dnl
dnl The "--disable-verbose" switch disables the verbose-logging macro.
dnl
AC_DEFUN([ENABLE_VERBOSE],
[
if test x$enable_verbose != xno
then
:
else
AC_DEFINE(G_NO_LOG,1,[Define to disable the G_LOG macro])
fi
])
dnl enable-pop
dnl
dnl The "--disable-pop" switch builds the pop library from
dnl do-nothing stubs.
dnl
AC_DEFUN([ENABLE_POP],
[
if test x$enable_pop != xno
then
:
else
AC_DEFINE(USE_NO_POP,1,[Define to eliminate unused pop code as a size optimisation])
fi
AM_CONDITIONAL(POP,test x$enable_pop != xno)
])
dnl enable-exec
dnl
dnl The "--disable-exec" switch removes source files are concerned
dnl with exec-ing external programs.
dnl
AC_DEFUN([ENABLE_EXEC],
[
if test x$enable_exec != xno
then
:
else
AC_DEFINE(USE_NO_EXEC,1,[Define to eliminate unused exec-ing code as a size optimisation])
fi
AM_CONDITIONAL(EXEC,test x$enable_exec != xno)
])
dnl enable-admin
dnl
dnl The "--disable-admin" switch removes source files that implement
dnl the admin interface.
dnl
AC_DEFUN([ENABLE_ADMIN],
[
if test x$enable_admin != xno
then
:
else
AC_DEFINE(USE_NO_ADMIN,1,[Define to eliminate unused admin interface code as a size optimisation])
fi
AM_CONDITIONAL(ADMIN,test x$enable_admin != xno)
])
dnl enable-auth
dnl
dnl The "--disable-admin" switch removes source files that implement authentication.
dnl
AC_DEFUN([ENABLE_AUTH],
[
if test x$enable_auth != xno
then
:
else
AC_DEFINE(USE_NO_AUTH,1,[Define to eliminate unused authentication code as a size optimisation])
fi
AM_CONDITIONAL(AUTH,test x$enable_auth != xno)
if test x$enable_auth = xno -a x$enable_pop != xno
then
AC_MSG_ERROR([using --disable-auth requires --disable-pop])
fi
])
dnl enable-dns
dnl
dnl The "--disable-dns" switch disables dns lookup so host and service
dnl names must be given as ip addresses and port numbers. This can be
dnl make static linking easier, especially in embedded systems.
dnl
AC_DEFUN([ENABLE_DNS],
[
AM_CONDITIONAL(DNS,test x$enable_dns != xno)
])
dnl enable-identity
dnl
dnl The "--disable-identity" switch disables userid switching thereby
dnl removing the dependence on getpwnam and /etc/passwd. This can
dnl make static linking easier, especially in embedded systems.
dnl
AC_DEFUN([ENABLE_IDENTITY],
[
AM_CONDITIONAL(IDENTITY,test x$enable_identity != xno)
])
dnl enable-small-fragments
dnl
dnl The "--enable-small-fragments" sewitch compiles certain source files in
dnl lots of little pieces so the linker can throw away fragments that
dnl are not needed in the final executable.
dnl
dnl This requires perl on the path and probably messes up a lot of
dnl autoconf/automake features, so only use if really necessary.
dnl
AC_DEFUN([ENABLE_SMALL_FRAGMENTS],
[
AM_CONDITIONAL(SMALL_FRAGMENTS,test x$enable_small_fragments = xyes)
if test x$enable_small_fragments = xyes
then
AC_MSG_NOTICE([creating source file fragments])
FRAGMENTS_LIST="`perl $srcdir/bin/fragment.pl_ -r $srcdir/src $srcdir/src/fragments`"
for fragment in $FRAGMENTS_LIST "" ; do if test "$fragment" != "" ; then
AC_MSG_NOTICE([creating source file fragment for $fragment])
fi ; done
fi
AC_SUBST(FRAGMENTS_LIST)
])
dnl enable-small-config
dnl
dnl The "--enable-small-config" switch replaces the complex command-line
dnl parsing code with something simpler and less functional.
dnl
AC_DEFUN([ENABLE_SMALL_CONFIG],
[
if test x$enable_small_config = xyes
then
AC_DEFINE(USE_SMALL_CONFIG,1,[Define to eliminate unused config code as a size optimisation])
else
:
fi
AM_CONDITIONAL(SMALL_CONFIG,test x$enable_small_config = xyes)
])
dnl enable-small-exceptions
dnl
dnl The "--enable-small-exceptions" defines exception classes as functions
dnl as a size optimisation. This should probably become the default when
dnl it has had more testing.
dnl
AC_DEFUN([ENABLE_SMALL_EXCEPTIONS],
[
if test x$enable_small_exceptions = xyes
then
AC_DEFINE(USE_SMALL_EXCEPTIONS,1,[Define to have exception types as functions as a size optimisation])
else
:
fi
])
dnl enable-ipv6
dnl
dnl The "--enable-ipv6" switch enables ipv6 as long as ipv6 is available.
dnl
dnl Note that this requires ACLOCAL_CHECK_IPV6 to have been run.
dnl
AC_DEFUN([ENABLE_IPV6],
[
if test "$enable_ipv6" = "yes"
@ -245,18 +460,49 @@ then
if test "$aclocal_ipv6" != "yes"
then
AC_MSG_WARN([ignoring --enable-ipv6])
IP="ipv4"
aclocal_use_ipv6="no"
else
IP="ipv6"
AC_DEFINE(USE_IPV6,1,[Define to use IPv6])
aclocal_use_ipv6="yes"
fi
else
IP="ipv4"
aclocal_use_ipv6="no"
fi
AC_SUBST(IP)
AM_CONDITIONAL(IPV6,test x$aclocal_use_ipv6 = xyes)
])
dnl enable-proxy
dnl
dnl The "--disable-proxy" switch disables smtp proxying as a size optimisation.
dnl
AC_DEFUN([ENABLE_PROXY],
[
if test x$enable_proxy != xno
then
:
else
AC_DEFINE(USE_NO_PROXY,1,[Define to eliminate proxying code as a size optimisation])
fi
AM_CONDITIONAL(PROXY,test x$enable_proxy != xno)
])
dnl enable-mac
dnl
dnl The "--enable-mac" switch tweaks things for a mac build.
dnl
AC_DEFUN([ENABLE_MAC],
[
if test x$enable_mac = xyes -o "`uname`" = "Darwin"
then
AC_DEFINE(G_MAC,1,[Define for a mac build])
fi
AM_CONDITIONAL(MAC,test x$enable_mac = xyes -o "`uname`" = "Darwin")
])
dnl with-openssl
dnl
dnl Sets SSL_LIBS and "if OPENSSL" in makefiles.
dnl
AC_DEFUN([WITH_OPENSSL],
if test "$with_openssl" != "no"
then
@ -270,30 +516,63 @@ then
])
if test "$aclocal_openssl" = "yes"
then
AC_DEFINE(HAVE_OPENSSL,1,[Define to 1 to enable tls/ssh code using openssl])
SSL_LIBS="-lssl -lcrypto"
SSL="openssl"
aclocal_ssl="openssl"
else
if test "$with_openssl" = "yes"
then
AC_MSG_WARN([ignoring --with-openssl, check config.log and try setting CFLAGS])
fi
AC_DEFINE(HAVE_OPENSSL,0,[Define to 1 to enable tls/ssh code using openssl])
SSL_LIBS=""
SSL="none"
aclocal_ssl="none"
fi
else
AC_DEFINE(HAVE_OPENSSL,0,[Define to 1 to enable tls/ssh code using openssl])
SSL_LIBS=""
SSL="none"
aclocal_ssl="none"
fi
AC_SUBST(SSL_LIBS)
AC_SUBST(SSL)
AM_CONDITIONAL(OPENSSL,test x$aclocal_ssl = xopenssl)
])
dnl with-glob
dnl
dnl Sets "if GLOB" in makefiles. Defaults to auto.
dnl
AC_DEFUN([WITH_GLOB],
if test "$with_glob" != "no"
then
[AC_CACHE_CHECK([for glob],[aclocal_have_glob],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <glob.h>]],
[[glob_t * p = 0 ; globfree(p) ; return 1;]])],
aclocal_have_glob=yes,
aclocal_have_glob=no )
])
if test "$aclocal_have_glob" = "yes"
then
aclocal_use_glob="yes"
else
if test "$with_glob" = "yes"
then
AC_MSG_WARN([ignoring --with-glob])
fi
aclocal_use_glob="no"
fi
else
if test "$aclocal_have_glob" = "yes"
then
AC_MSG_WARN([not using available glob()])
fi
aclocal_use_glob="no"
fi
AM_CONDITIONAL(GLOB,test x$aclocal_use_glob = xyes)
])
dnl enable-static-linking
dnl
dnl TODO remove -ldl
dnl The "--enable-static-linking" makes a half-hearted
dnl attempt at static linking. Only applicable to gcc.
dnl
AC_DEFUN([ENABLE_STATIC_LINKING],
[
@ -309,90 +588,130 @@ AC_SUBST(STATIC_START)
AC_SUBST(STATIC_END)
])
dnl with-workshop
dnl
AC_DEFUN([WITH_WORKSHOP],
[
if test "$with_workshop" = "yes"
then
chmod +x lib/sunpro5/xar
AR="`pwd`/lib/sunpro5/xar --cxx \"$CXX\""
AC_SUBST(AR)
fi
])
dnl with-doxygen
dnl
dnl Sets HAVE_DOXYGEN in makefiles if doxygen is to be used.
dnl
dnl Usually used after doing a doxygen program check to set
dnl the default value for $HAVE_DOXYGEN.
dnl
AC_DEFUN([WITH_DOXYGEN],
[
if test "$with_doxygen" != ""
then
if test "$with_doxygen" = "yes" -a "$HAVE_DOXYGEN" != "yes"
then
AC_MSG_WARN([ignoring --with-doxygen])
else
AC_MSG_WARN([forcing use of doxygen even though not found])
fi
HAVE_DOXYGEN="$with_doxygen"
fi
AC_SUBST(HAVE_DOXYGEN)
fi
fi
])
dnl with-man2html
dnl
dnl Sets HAVE_MAN2HTML in makefiles if man2html is to be used.
dnl
dnl Usually used after doing a man2html program check to set
dnl the default value for $HAVE_MAN2HTML.
dnl
AC_DEFUN([WITH_MAN2HTML],
[
if test "$with_man2html" != ""
then
if test "$with_man2html" = "yes" -a "$HAVE_MAN2HTML" != "yes"
then
AC_MSG_WARN([ignoring --with-man2html])
else
AC_MSG_WARN([forcing use of man2html even though not found])
fi
HAVE_MAN2HTML="$with_man2html"
fi
AC_SUBST(HAVE_MAN2HTML)
fi
fi
])
dnl enable-fhs
dnl set-directories
dnl
AC_DEFUN([ENABLE_FHS],
dnl Sets directory paths taking account of "--enable-fhs".
dnl
AC_DEFUN([SET_DIRECTORIES],
[
# the following are used in the makefiles:
# * sbindir
# * e_libexecdir
# * e_examplesdir
# * e_sysconfdir
# * mandir
# * e_docdir
# * e_spooldir
# * e_initdir
if test "$enable_fhs" = "yes"
then
FHS_COMPLIANCE
prefix='/usr'
exec_prefix='/usr'
sbindir="/usr/sbin"
libexecdir="/usr/lib"
localstatedir="/var"
mandir="/usr/share/man"
datadir="/usr/share"
sysconfdir="/etc"
fi
if test "$e_libexecdir" = ""
then
if test "$enable_fhs" = "yes"
then
e_libexecdir="$libexecdir/$PACKAGE"
else
e_libexecdir="$libexecdir/$PACKAGE"
fi
fi
if test "$e_examplesdir" = ""
then
if test "$enable_fhs" = "yes"
then
e_examplesdir="$libexecdir/$PACKAGE/examples"
else
e_examplesdir="$libexecdir/$PACKAGE/examples"
fi
fi
if test "$e_sysconfdir" = ""
then
if test "$enable_fhs" = "yes"
then
e_sysconfdir="$sysconfdir"
else
e_sysconfdir="$sysconfdir"
fi
fi
if test "$e_docdir" = ""
then
if test "$enable_fhs" = "yes"
then
e_docdir="$datadir/doc/$PACKAGE"
else
e_docdir="$docdir"
if test "$e_docdir" = ""
then
e_docdir="$datadir/$PACKAGE/doc"
fi
fi
fi
if test "$e_spooldir" = ""
then
if test "$enable_fhs" = "yes"
then
e_spooldir="$localstatedir/spool/$PACKAGE"
else
e_spooldir="$localstatedir/spool/$PACKAGE"
fi
fi
if test "$e_initdir" = ""
then
if test "$enable_fhs" = "yes"
then
e_initdir="/etc/init.d"
else
e_initdir="$libexecdir/$PACKAGE/init"
fi
fi
])
dnl fhs
dnl
AC_DEFUN([FHS_COMPLIANCE],
[
# tweaks for fhs compliance...
#
prefix='/usr'
exec_prefix='/usr'
#
sbindir='/usr/sbin'
libexecdir='/usr/lib'
localstatedir='/var'
mandir='/usr/share/man'
datadir='/usr/share'
sysconfdir='/etc'
#
# not used by emailrelay
#bindir=
#sharedstatedir=
#libdir=
#includedir=
#oldincludedir=
#infodir=
#
# emailrelay-specific
e_libexecdir="$libexecdir/$PACKAGE"
e_docdir="$datadir/doc/$PACKAGE"
e_initdir="/etc/init.d"
e_spooldir="$localstatedir/spool/$PACKAGE"
e_examplesdir="$libexecdir/$PACKAGE/examples"
e_sysconfdir="$sysconfdir"
])

38
aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
# generated automatically by aclocal 1.10 -*- Autoconf -*-
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -11,10 +11,13 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_if(m4_PACKAGE_VERSION, [2.61],,
[m4_fatal([this file was generated for autoconf 2.61.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(AC_AUTOCONF_VERSION, [2.61],,
[m4_warning([this file was generated for autoconf 2.61.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
@ -174,7 +177,7 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -189,7 +192,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.10], [],
m4_if([$1], [1.10.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -205,8 +208,10 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.10])dnl
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
[AM_AUTOMAKE_VERSION([1.10.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@ -478,7 +483,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@ -538,13 +543,13 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006 Free Software Foundation, Inc.
# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@ -649,16 +654,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@ -959,7 +965,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])

10
autogen.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# autogen.sh
#
# Autogenerates stuff.
#
aclocal
autoconf
autoheader
automake -a

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -15,31 +15,95 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = emailrelay.sh_ doxygen.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
work_scripts = doxygen.sh txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
if MAC
e_init_SCRIPTS = E-MailRelay
e_init_DATA = StartupParameters.plist
else
e_init_SCRIPTS = emailrelay
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh
e_init_DATA =
endif
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
EXTRA_DIST = \
emailrelay.sh_ \
doxygen.sh_ \
txt2html.sh_ \
txt2mu.sh_ \
mu2html.sh_ \
mu2docbook.sh_ \
expand.sh_ \
emailrelay-notify.sh_ \
emailrelay-resubmit.sh_ \
emailrelay-deliver.sh_ \
emailrelay-process.sh_ \
emailrelay-runperl.js \
emailrelay-resubmit.js \
emailrelay-change-auth.js \
emailrelay-submit.sh_ \
emailrelay-multicast.sh_ \
make-setup.sh_ \
make-qt-enabled.sh_ \
make-bundle.sh_ \
configure-mac.sh \
startup-mac.plist \
fragment.pl_
work_scripts = \
doxygen.sh \
txt2mu.sh \
mu2html.sh \
mu2docbook.sh \
expand.sh \
txt2html.sh \
emailrelay.sh \
make-setup.sh \
make-qt-enabled.sh \
make-bundle.sh \
fragment.pl
noinst_SCRIPTS = \
emailrelay-runperl.js \
emailrelay-resubmit.js \
emailrelay-change-auth.js \
$(work_scripts)
e_examples_DATA = \
emailrelay-process.sh \
emailrelay-notify.sh \
emailrelay-deliver.sh \
emailrelay-resubmit.sh \
emailrelay-submit.sh \
emailrelay-multicast.sh
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts) $(e_init_SCRIPTS)
SUFFIXES = .sh_ .sh
.sh_.sh:
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > $*.tmp && mv $*.tmp $*.sh
chmod ugo+x $*.sh
cat "$(top_srcdir)/bin/$*.sh_" | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;s%__SYSCONF_DIR__%${e_sysconfdir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > "$*.tmp" && mv "$*.tmp" "$*.sh"
chmod ugo+x "$*.sh"
.pl_.pl:
cp "$(top_srcdir)/bin/$*.pl_" "$*.pl"
chmod ugo+x "$*.pl"
emailrelay: emailrelay.sh
cp emailrelay.sh emailrelay
chmod ugo+x emailrelay
E-MailRelay: emailrelay.sh
cp emailrelay.sh $@
StartupParameters.plist: startup-mac.plist
cp $(top_srcdir)/bin/startup-mac.plist $@
install-data-local: install-e_examplesDATA install-e_initSCRIPTS
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-notify.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-resubmit.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-deliver.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-submit.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-process.sh
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-process.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-notify.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-deliver.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-resubmit.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-submit.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-multicast.sh"
uninstall-local:
-rmdir $(DESTDIR)$(e_examplesdir) 2>/dev/null
-rmdir "$(DESTDIR)$(e_examplesdir)" 2>/dev/null

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -45,7 +45,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(e_initdir)" \
"$(DESTDIR)$(e_examplesdir)"
"$(DESTDIR)$(e_examplesdir)" "$(DESTDIR)$(e_initdir)"
e_initSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(e_init_SCRIPTS) $(noinst_SCRIPTS)
SOURCES =
@ -57,7 +57,8 @@ am__vpath_adj = case $$p in \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
e_examplesDATA_INSTALL = $(INSTALL_DATA)
DATA = $(e_examples_DATA)
e_initDATA_INSTALL = $(INSTALL_DATA)
DATA = $(e_examples_DATA) $(e_init_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@ -83,6 +84,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -92,7 +94,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -116,7 +117,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -171,17 +171,67 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = emailrelay.sh_ doxygen.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
work_scripts = doxygen.sh txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
e_init_SCRIPTS = emailrelay
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
@MAC_FALSE@e_init_SCRIPTS = emailrelay
@MAC_TRUE@e_init_SCRIPTS = E-MailRelay
@MAC_FALSE@e_init_DATA =
@MAC_TRUE@e_init_DATA = StartupParameters.plist
EXTRA_DIST = \
emailrelay.sh_ \
doxygen.sh_ \
txt2html.sh_ \
txt2mu.sh_ \
mu2html.sh_ \
mu2docbook.sh_ \
expand.sh_ \
emailrelay-notify.sh_ \
emailrelay-resubmit.sh_ \
emailrelay-deliver.sh_ \
emailrelay-process.sh_ \
emailrelay-runperl.js \
emailrelay-resubmit.js \
emailrelay-change-auth.js \
emailrelay-submit.sh_ \
emailrelay-multicast.sh_ \
make-setup.sh_ \
make-qt-enabled.sh_ \
make-bundle.sh_ \
configure-mac.sh \
startup-mac.plist \
fragment.pl_
work_scripts = \
doxygen.sh \
txt2mu.sh \
mu2html.sh \
mu2docbook.sh \
expand.sh \
txt2html.sh \
emailrelay.sh \
make-setup.sh \
make-qt-enabled.sh \
make-bundle.sh \
fragment.pl
noinst_SCRIPTS = \
emailrelay-runperl.js \
emailrelay-resubmit.js \
emailrelay-change-auth.js \
$(work_scripts)
e_examples_DATA = \
emailrelay-process.sh \
emailrelay-notify.sh \
emailrelay-deliver.sh \
emailrelay-resubmit.sh \
emailrelay-submit.sh \
emailrelay-multicast.sh
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts) $(e_init_SCRIPTS)
SUFFIXES = .sh_ .sh
all: all-am
.SUFFIXES:
.SUFFIXES: .sh_ .sh
.SUFFIXES: .sh_ .sh .pl .pl_
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -247,6 +297,23 @@ uninstall-e_examplesDATA:
echo " rm -f '$(DESTDIR)$(e_examplesdir)/$$f'"; \
rm -f "$(DESTDIR)$(e_examplesdir)/$$f"; \
done
install-e_initDATA: $(e_init_DATA)
@$(NORMAL_INSTALL)
test -z "$(e_initdir)" || $(MKDIR_P) "$(DESTDIR)$(e_initdir)"
@list='$(e_init_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(e_initDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(e_initdir)/$$f'"; \
$(e_initDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(e_initdir)/$$f"; \
done
uninstall-e_initDATA:
@$(NORMAL_UNINSTALL)
@list='$(e_init_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(e_initdir)/$$f'"; \
rm -f "$(DESTDIR)$(e_initdir)/$$f"; \
done
tags: TAGS
TAGS:
@ -284,7 +351,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(e_initdir)" "$(DESTDIR)$(e_examplesdir)"; do \
for dir in "$(DESTDIR)$(e_initdir)" "$(DESTDIR)$(e_examplesdir)" "$(DESTDIR)$(e_initdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@ -331,7 +398,7 @@ info: info-am
info-am:
install-data-am: install-data-local install-e_examplesDATA \
install-e_initSCRIPTS
install-e_initDATA install-e_initSCRIPTS
install-dvi: install-dvi-am
@ -365,8 +432,8 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
uninstall-local
uninstall-am: uninstall-e_examplesDATA uninstall-e_initDATA \
uninstall-e_initSCRIPTS uninstall-local
.MAKE: install-am install-strip
@ -374,34 +441,45 @@ uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am \
install-e_examplesDATA install-e_initSCRIPTS install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am uninstall uninstall-am \
uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
uninstall-local
install-e_examplesDATA install-e_initDATA \
install-e_initSCRIPTS install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-e_examplesDATA uninstall-e_initDATA \
uninstall-e_initSCRIPTS uninstall-local
.sh_.sh:
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > $*.tmp && mv $*.tmp $*.sh
chmod ugo+x $*.sh
cat "$(top_srcdir)/bin/$*.sh_" | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;s%__SYSCONF_DIR__%${e_sysconfdir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > "$*.tmp" && mv "$*.tmp" "$*.sh"
chmod ugo+x "$*.sh"
.pl_.pl:
cp "$(top_srcdir)/bin/$*.pl_" "$*.pl"
chmod ugo+x "$*.pl"
emailrelay: emailrelay.sh
cp emailrelay.sh emailrelay
chmod ugo+x emailrelay
E-MailRelay: emailrelay.sh
cp emailrelay.sh $@
StartupParameters.plist: startup-mac.plist
cp $(top_srcdir)/bin/startup-mac.plist $@
install-data-local: install-e_examplesDATA install-e_initSCRIPTS
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-notify.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-resubmit.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-deliver.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-submit.sh
chmod ugo+x $(DESTDIR)$(e_examplesdir)/emailrelay-process.sh
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-process.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-notify.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-deliver.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-resubmit.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-submit.sh"
chmod ugo+x "$(DESTDIR)$(e_examplesdir)/emailrelay-multicast.sh"
uninstall-local:
-rmdir $(DESTDIR)$(e_examplesdir) 2>/dev/null
-rmdir "$(DESTDIR)$(e_examplesdir)" 2>/dev/null
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

55
bin/configure-mac.sh Normal file
View File

@ -0,0 +1,55 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# configure-mac.sh
#
# A convenience script that runs the emailrelay "../configure" script for
# Mac OS X.
#
# $ cd src/emailrelay-1.99
# $ mkdir build
# $ cd build
# $ sh ../bin/configure-mac.sh_
# $ make
#
# After configuring with these switches the installation can be done
# with "make install" for a system-wide installation, or with
# "make install DESTDIR=~" for a private installation.
#
# The default definition of "e_initdir" ensures that the server starts
# up automatically at boot time.
#
app="/Applications/E-MailRelay"
lib="/Library"
configure="./configure"
if test ! -f "${configure}" ; then configure="../configure" ; fi
chmod +x "${configure}" 2> /dev/null
${configure} \
--enable-mac \
--sbindir="${app}" \
e_libexecdir="${app}" \
e_examplesdir="${app}/Documentation/examples" \
e_sysconfdir="${app}" \
--mandir="${app}/Documentation/man" \
e_docdir="${app}/Documentation" \
e_spooldir="${lib}/Mail/Spool" \
e_initdir="${lib}/StartupItems/E-MailRelay"

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -19,7 +19,7 @@
# doxygen.sh
#
# Used by doc/Makefile to run doxygen with a bit of
# post-processing.
# config-file pre-processing.
#
# usage: doxygen <have-doxygen> <top-srcdir> <top-builddir>
#
@ -28,7 +28,7 @@ HAVE_DOXYGEN="$1"
top_srcdir="$2"
top_builddir="$3"
if test "$HAVE_DOXYGEN" = "yes" -o -z "$HAVE_DOXYGEN"
if test "$HAVE_DOXYGEN" = "yes"
then
cat "${top_srcdir}/src/main/doxygen.cfg" | \
sed "s:__TOP_SRC__:${top_srcdir}:g" | \

View File

@ -0,0 +1,47 @@
//
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
// ===
//
// emailrelay-change-auth.js
//
// An example "--filter" script for Windows that changes the
// authentication field in the message's envelope file. This
// field is used as the AUTH parameter in the MAIL command
// when the emailrelay server forwards the message to the
// downstream server. By default it is the name used by the
// client when it authenticated with emailrelay.
//
try
{
var auth = "secret" ; // change this
var content = WScript.Arguments(0) ;
var envelope = content.substr(0,content.length-7) + "envelope.new" ;
var fs = WScript.CreateObject( "Scripting.FileSystemObject" ) ;
var ts = fs.OpenTextFile( envelope , 1 , false ) ;
var txt = ts.ReadAll() ;
ts.Close() ;
var re = new RegExp( "X-MailRelay-Authentication: *\\w*" ) ;
txt = txt.replace( re , "X-MailRelay-Authentication: " + auth ) ;
ts = fs.OpenTextFile( envelope , 2 , false ) ;
ts.Write( txt ) ;
ts.Close() ;
WScript.Quit( 0 ) ;
}
catch( e )
{
WScript.Echo( "<<" + e + ">>" ) ;
WScript.Quit( 1 ) ;
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -45,11 +45,11 @@ fi
# for each e-mail to a local recipient...
#
for file in ${store}/emailrelay.*.envelope.local ""
for file in "${store}"/emailrelay.*.envelope.local ""
do
if test -f "${file}"
then
content="`echo ${file} | sed 's/envelope/content/'`"
content="`echo \"${file}\" | sed 's/envelope/content/'`"
deliver_to="`fgrep X-MailRelay-To-Local ${file} | sed 's/X-MailRelay-To-Local: //' | tr -d '\015' | sed \"s/postmaster/${postmaster}/g\"`"
if test "${deliver_to}" = ""
@ -61,8 +61,8 @@ do
#
if test -f "${content}"
then
echo `basename $0`: delivering `basename ${content}` to ${deliver_to}
${procmail} -d ${deliver_to} < ${content}
echo `basename $0`: delivering `basename "${content}"` to ${deliver_to}
"${procmail}" -d "${deliver_to}" < "${content}"
rc=$?
if test "${rc}" -eq 0
then

View File

@ -0,0 +1,103 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# emailrelay-multicast.sh
#
# An example filter script that copies/links each new message
# into all avaliable sub-directories of the main spool
# directory. The original message files are deleted if they
# were successfully copied/linked into all sub-directories.
#
# Typically used for smtp multicast with an emailrelay
# forwarding process polling each sub-directory (with
# eg. "--log -e --no-smtp --poll 10 --forward-to ...").
#
# Hard links are used for the content files in order to
# conserve disk space.
#
# Log entries are written into the base envelope file
# to help with error recovery.
#
# Note that the remote smtp client which is submitting the
# message will be notified of any failures in this script.
# Alternatively an "exit 0" can be used to silently leave
# the message in the main spool directory (see below).
#
# (This script is similar to the emailrelay-filter-copy
# program that is used for "pop-by-name" -- ie. smtp to
# pop multicasting. However, in the pop case we exploit
# a feature of the pop server where the content file
# can stay in the parent directory without linking or
# copying into the sub-directory, which allows "pop-by-name"
# to be fully cross-platform while avoiding content-file
# bloat. The smtp server does not support that way of
# working so here we just link the content file and
# forget about windows.)
#
# parse the command-line
#
content="$1"
envelope="`echo \"${content}\" | sed 's/content$/envelope.new/'`"
base_dir="`dirname \"${content}\"`"
if test "$1" = "" -o "${content}" = "${envelope}" -o "${base_dir}" = "."
then
echo usage: `basename $0` '<content-file>' >&2
exit 2
fi
# copy/link message files
#
list="`find \"${base_dir}\" -mount -maxdepth 1 -mindepth 1 -type d`"
error_list=""
subdir_exists="0"
for dir in ${list} ""
do
if test -d "${dir}" -a "${dir}" != ".." -a "${dir}" != "." -a "${dir}" != "${base_dir}"
then
subdir_exists="1"
envelope_tmp="${envelope}.`basename \"${dir}\"`.tmp"
envelope_dst="${dir}/`basename \"${envelope}\" .new`"
if ln "${content}" "${dir}" && cp "${envelope}" "${envelope_tmp}" && mv "${envelope_tmp}" "${envelope_dst}"
then
echo "X-MailRelay-Multicast: ${dir}>" | tr '>' '\r' >> "${envelope}"
else
error_list="${error_list} ${dir}"
echo "X-MailRelay-Multicast-Error: ${dir}>" | tr '>' '\r' >> "${envelope}"
fi
fi
done
# error handling
#
if test "${subdir_exists}" = "0"
then
# no sub-directories created -- this script has no effect
exit 0
elif test "${error_list}" = ""
then
# successfully copied -- delete the original
rm -f "${content}" "${envelope}"
exit 100
else
# something failed -- tell the submitting smtp client
# replace these two lines with "exit 0" if the client should not know...
echo "<<`basename $0`: `basename "${content}"`: failed to copy message into${error_list}>>"
exit 1
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -36,7 +36,7 @@
#
tmp="/tmp/`basename $0`.$$.tmp"
trap "rm -f ${tmp} 2>/dev/null ; exit 0" 0 1 2 3 13 15
trap "rm -f \"${tmp}\" 2>/dev/null ; exit 0" 0 1 2 3 13 15
procmail="procmail"
# parse the command line
@ -57,15 +57,15 @@ fi
# for each failed e-mail...
#
for file in ${store}/emailrelay.*.envelope.bad ""
for file in "${store}"/emailrelay.*.envelope.bad ""
do
if test -f "${file}"
then
# parse out the failure reason and the original sender
#
content="`echo ${file} | sed 's/envelope/content/' | sed 's/.bad//'`"
reason="`fgrep MailRelay-Reason ${file} | sed 's/X-[^ ]*Reason: //' | tr -d '\015'`"
from="`fgrep MailRelay-From ${file} | sed 's/X-MailRelay-From: //' | tr -d '\015'`"
content="`echo \"${file}\" | sed 's/envelope/content/' | sed 's/.bad//'`"
reason="`fgrep MailRelay-Reason \"${file}\" | sed 's/X-[^ ]*Reason: //' | tr -d '\015'`"
from="`fgrep MailRelay-From \"${file}\" | sed 's/X-MailRelay-From: //' | tr -d '\015'`"
deliver_to="${from}"
if test "${deliver_to}" = ""
then
@ -74,46 +74,46 @@ do
# create a notification message header
#
boundary="--------------`basename ${file}`.$$"
echo "To: ${deliver_to}" > ${tmp}
echo "From: postmaster" >> ${tmp}
echo "Subject: Your e-mail could not be delivered" >> ${tmp}
echo "MIME-Version: 0.1" >> ${tmp}
echo "Content-Type: multipart/mixed; boundary=\"${boundary}\"" >> ${tmp}
echo "" >> ${tmp}
boundary="--------------`basename \"${file}\"`.$$"
echo "To: ${deliver_to}" > "${tmp}"
echo "From: postmaster" >> "${tmp}"
echo "Subject: Your e-mail could not be delivered" >> "${tmp}"
echo "MIME-Version: 0.1" >> "${tmp}"
echo "Content-Type: multipart/mixed; boundary=\"${boundary}\"" >> "${tmp}"
echo "" >> "${tmp}"
# add the message text
#
echo "" >> ${tmp}
echo "--${boundary}" >> ${tmp}
echo "Content-Type: text/plain; charset=us-ascii" >> ${tmp}
echo "" >> ${tmp}
echo "" >> "${tmp}"
echo "--${boundary}" >> "${tmp}"
echo "Content-Type: text/plain; charset=us-ascii" >> "${tmp}"
echo "" >> "${tmp}"
if test -f "${content}"
then
egrep -i '^To:|^Subject:' ${content} >> ${tmp}
egrep -i '^To:|^Subject:' ${content} >> "${tmp}"
fi
if test "${reason}" != ""
then
echo "Reason: ${reason}" >> ${tmp}
echo "Reason: ${reason}" >> "${tmp}"
fi
# add the message attachment
#
if test -f "${content}"
then
echo "--${boundary}" >> ${tmp}
echo "Content-Type: message/rfc822" >> ${tmp}
echo "Content-Transfer-Encoding: 8bit" >> ${tmp}
echo "Content-Description: `basename ${content}`" >> ${tmp}
echo "" >> ${tmp}
cat ${content} >> ${tmp}
echo "--${boundary}" >> "${tmp}"
echo "Content-Type: message/rfc822" >> "${tmp}"
echo "Content-Transfer-Encoding: 8bit" >> "${tmp}"
echo "Content-Description: `basename \"${content}\"`" >> "${tmp}"
echo "" >> "${tmp}"
cat "${content}" >> "${tmp}"
fi
echo "--${boundary}--" >> ${tmp}
echo "--${boundary}--" >> "${tmp}"
# deliver the notification using procmail
#
echo `basename $0`: delivering `basename ${content}` to ${deliver_to}
${procmail} -d "${deliver_to}" < ${tmp}
echo `basename $0`: delivering `basename "${content}"` to ${deliver_to}
"${procmail}" -d "${deliver_to}" < "${tmp}"
rc=$?
# clean up

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -27,7 +27,7 @@
awk="awk"
tmp="/tmp/`basename $0`.$$.tmp"
log="/tmp/`basename $0`.out"
trap "rm -f ${tmp} >/dev/null 2>&1 ; exit" 0 1 2 3 13 15
trap "rm -f \"${tmp}\" >/dev/null 2>&1 ; exit" 0 1 2 3 13 15
###
# ProcessContent()
@ -36,7 +36,7 @@ trap "rm -f ${tmp} >/dev/null 2>&1 ; exit" 0 1 2 3 13 15
#
ProcessContent()
{
${awk} '
"${awk}" '
BEGIN {
map_upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
map_lower = tolower(map_upper)
@ -81,7 +81,7 @@ ProcessContent()
#
Wrap()
{
${awk} -v boundary="-----`basename $0`.$$" -v message="$@" '
"${awk}" -v boundary="-----`basename $0`.$$" -v message="$@" '
BEGIN {
in_header = 1
n = 1
@ -136,15 +136,15 @@ Wrap()
Main()
{
cat "${1}" | ProcessContent | Wrap "The original message has been encrypted..." > ${tmp}
cp ${tmp} "${1}"
cat "${1}" | ProcessContent | Wrap "The original message has been encrypted..." > "${tmp}"
cp "${tmp}" "${1}"
}
debug="0"
if test "${debug}" -eq 1
then
Main $@ > ${log} 2>&1
Main "$@" > "${log}" 2>&1
else
Main $@
Main "$@"
fi

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -14,26 +14,32 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ===
///
/// \file emailrelay-resubmit.js
///
//
// emailrelay-resubmit.js
//
// Looks for all failed e-mails in the E-MailRelay spool directory
// and resubmits them. However, if an e-mail has been retried five
// times already then it is not submitted again.
//
// usage: cscript //nologo emailrelay-resubmit.js [<spool-dir>]
//
/// configuration
///
// configuration
//
var cfg_store = "__SPOOL_DIR__" ;
var cfg_retry_limit = 5 ;
var cfg_debug = true ;
/// parse the command line
///
// parse the command line
//
var args = WScript.Arguments
if( args.length >= 1 )
{
cfg_store = args(0) ;
}
/// debugging
///
// debugging
//
function debug( line )
{
if( cfg_debug )
@ -42,8 +48,8 @@ function debug( line )
}
}
/// check the spool directory
///
// check the spool directory
//
var fso = WScript.CreateObject( "Scripting.FileSystemObject" ) ;
if( ! fso.FolderExists( cfg_store ) )
{
@ -51,20 +57,20 @@ if( ! fso.FolderExists( cfg_store ) )
WScript.Quit( 1 ) ;
}
/// for each file...
///
// for each file...
//
var folder = fso.GetFolder( cfg_store ) ;
var re_reason = new RegExp( "MailRelay-Reason: " , "" ) ;
var re_bad = new RegExp( ".*\.bad" , "i" ) ;
var iter = new Enumerator( folder.Files ) ;
for( ; ! iter.atEnd() ; iter.moveNext() )
{
///< if a failed envelope file...
// if a failed envelope file...
var path = new String(iter.item()) ;
debug( "path: " + path ) ;
if( path.match(re_bad) )
{
///< count the failure lines
// count the failure lines
var stream = fso.OpenTextFile( path , 1 ) ;
var failures = 0 ;
while( !stream.AtEndOfStream )
@ -80,7 +86,7 @@ for( ; ! iter.atEnd() ; iter.moveNext() )
debug( "failures: " + failures ) ;
if( failures < cfg_retry_limit )
{
///< remove the ".bad" suffix
// remove the ".bad" suffix
var new_path = path.substr( 0 , path.length-4 ) ;
debug( "rename: " + path + " -> " + new_path ) ;
fso.MoveFile( path , new_path ) ;

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -45,11 +45,11 @@ fi
# for each failed e-mail...
#
for file in ${store}/emailrelay.*.envelope.bad ""
for file in "${store}"/emailrelay.*.envelope.bad ""
do
if test -f "${file}"
then
failures="`fgrep MailRelay-Reason: < ${file} | wc -l`"
failures="`fgrep MailRelay-Reason: < \"${file}\" | wc -l`"
if test "${failures}" -lt "${retry_limit}"
then
good_file="`echo \"${file}\" | sed 's/\.bad$//'`"

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -14,28 +14,44 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ===
///
/// \file emailrelay-runperl.js
///
//
// emailrelay-runperl.js
//
// An example "--filter" script for Windows that runs a perl script
// to process the message content via its standard input and standard
// output.
//
// The name of the perl script is hard-coded below: edit as necessary.
//
// The E-MailRelay command-line should look something like this:
//
// emailrelay --as-server --filter "c:/program\ files/emailrelay/emailrelay-runperl.js"
//
// Note the backslash to escape the space in the path.
//
// The implementation of this JavaScript makes use of "CMD.EXE", which may be
// not be available on some versions of Windows.
//
// Edit the next two lines as necessary, but avoid spaces in paths:
var cfg_perl="perl -S -T -w"
var cfg_perl_script="spamassassin"
/// parse our command line
// parse our command line
var args = WScript.Arguments
var filename = args(0)
/// prepare a command using CMD.EXE to do file redirection
// prepare a command using CMD.EXE to do file redirection
var cmd_in = "\"" + filename + "\""
var cmd_out = "\"" + filename + ".tmp\""
var cmd_err = "\"" + filename + ".err\""
var cmd_perl = "cmd /c " + cfg_perl + " " + cfg_perl_script
var cmd = cmd_perl + " < " + cmd_in + " > " + cmd_out + " 2> " + cmd_err
/// run the command
// run the command
var sh = WScript.CreateObject("WScript.Shell")
var rc = sh.Run( cmd , 0 , true )
/// check the file redirection
// check the file redirection
var fs = WScript.CreateObject("Scripting.FileSystemObject")
if( !fs.FileExists(filename+".tmp") || !fs.FileExists(filename+".err") )
{
@ -43,7 +59,7 @@ if( !fs.FileExists(filename+".tmp") || !fs.FileExists(filename+".err") )
WScript.Quit( 2 )
}
/// success or failure
// success or failure
if( rc == 0 )
{
fs.DeleteFile( filename )

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -18,15 +18,15 @@
#
# emailrelay-submit.sh
#
# An example wrapper script for the "emailrelay-submit"
# utility that adds the capability of copying messages
# into multiple subdirectories (eg. for "pop-by-name")
# based on the message content.
# An example wrapper script for the "emailrelay-submit" utility
# that adds the capability of copying messages into multiple
# subdirectories based on the message content. This script
# should be used as a replacement for the "emailrelay-submit"
# utility so it reads the message content from the standard
# input. All output goes to a log file.
#
# Edit as required.
#
# Reads the message content from the standard input.
# All output goes to a log file.
# Typically called by fetchmail as the local delivery agent
# with an emailrelay pop server running in "pop-by-name" mode.
#
# usage: emailrelay-submit.sh
#
@ -36,8 +36,8 @@ log="/var/log/emailrelay-submit.out"
awk="awk" # nawk
tmp="/tmp/`basename $0.$$.tmp`"
trap "rm -f ${tmp} 2>/dev/null ; exit 0" 0
trap "rm -f ${tmp} 2>/dev/null ; exit 1" 1 2 3 13 15
trap "rm -f \"${tmp}\" 2>/dev/null ; exit 0" 0
trap "rm -f \"${tmp}\" 2>/dev/null ; exit 1" 1 2 3 13 15
List()
{
@ -74,8 +74,8 @@ Main()
echo `basename $0`: to \"${to}\"
# submit the message into the main spool directory
content="`cat \"${tmp}\" | ${sbin}emailrelay-submit --verbose --spool-dir \"${store}\" \"${to}\"`"
envelope="`echo ${content} | sed 's/content/envelope/'`"
content="`cat \"${tmp}\" | \"${sbin}emailrelay-submit\" --verbose --spool-dir \"${store}\" \"${to}\"`"
envelope="`echo \"${content}\" | sed 's/content/envelope/'`"
if test \! -f "${content}"
then
echo `basename $0`: emailrelay-submit failed >&2

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -45,7 +45,7 @@
### END INIT INFO
##
# choose an infrastructure style
# choose an infrastructure style -- linux-standard-base (lsb) or unix
#
if test -f /lib/lsb/init-functions
then
@ -63,7 +63,8 @@ if test \! -d "${var_run}" ; then var_run="/tmp" ; fi
if test \! -x "${emailrelay}" ; then emailrelay="`pwd`/emailrelay" ; fi
pid_file="${var_run}/emailrelay.pid"
PATH="${PATH}:/sbin:/bin:/usr/bin"
cfg_file="/etc/emailrelay.conf"
ECHO="echo" ; if test -x /bin/echo ; then ECHO="/bin/echo" ; fi
cfg_file="__SYSCONF_DIR__/emailrelay.conf"
# server configuration using the config file
#
@ -85,7 +86,7 @@ unix_reset()
unix_cmd_start()
{
echo -n "${1}"
$ECHO -n "${1}"
shift
"$@"
unix_errno="$?"
@ -99,8 +100,8 @@ unix_cmd_start()
unix_cmd_stop()
{
echo -n "${1}"
if test -f "${pid_file}" && test "`cat ${pid_file}`" != ""
$ECHO -n "${1}"
if test -f "${pid_file}" && test "`cat \"${pid_file}\"`" != ""
then
kill "`cat ${pid_file}`"
rm -f "${pid_file}" 2>/dev/null
@ -116,8 +117,8 @@ unix_cmd_restarted()
unix_cmd_status()
{
echo -n "${1}"
if test -f "${pid_file}" && test "`cat ${pid_file}`" != "" && kill -0 "`cat ${pid_file}`" 2>/dev/null
$ECHO -n "${1}"
if test -f "${pid_file}" && test "`cat \"${pid_file}\"`" != "" && kill -0 "`cat \"${pid_file}\"`" 2>/dev/null
then
echo " ... running"
unix_errno="0"
@ -211,7 +212,7 @@ case "${1}" in
start)
shift
${style}_cmd_start "Starting E-MailRelay server" ${emailrelay} ${start_switches} "$@"
${style}_cmd_start "Starting E-MailRelay server" "${emailrelay}" ${start_switches} "$@"
;;
stop)

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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

270
bin/fragment.pl_ Normal file
View File

@ -0,0 +1,270 @@
#!/usr/bin/perl
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# fragment.pl
#
# Splits a source file into small fragments so that
# they can be compiled separately.
#
# Starts a fragment at the start of a namespace or
# a method. Ends a fragment at a blank line following
# a closing brace in column one. If there is a comment
# "//pragma fragments" in the source file then it marks
# the end of the common, unfragmented code (eg. local
# declarations).
#
# usage: fragment.sh [-r] <dir-in> <dir-out>
#
# Pokes inside "Makefile.am" files to get a lists of files.
#
# Logs all created files on stdout, suitable for backticks.
#
use strict ;
use FileHandle ;
sub makefile_variable
{
return "FRAGMENTS_EXTRA_DIST" ;
}
sub debug
{
# print @_ , "\n" ;
}
sub file_list_from_makefile
{
my ( $dir_in ) = @_ ;
my $path = "$dir_in/Makefile.am" ;
debug( "makefile: $path" ) ;
my $f = new FileHandle( $path ) or return () ;
my %full_hash = () ;
while( <$f> )
{
my $line = $_ ;
chomp $line ;
my $v = makefile_variable() ;
if( $line =~ m/^$v/ )
{
$line =~ s/$v[[:space:]]*=[[:space:]]*// ;
my @list = split( '\s+' , $line ) ;
for my $l ( @list ) { $full_hash{$l} = 1 }
}
}
debug( "makefile: $path: [".join("][",keys %full_hash)."]" ) ;
return keys %full_hash ;
}
sub sub_directory_list
{
my ( $base ) = @_ ;
opendir( DIR , $base ) or return () ;
my @list = grep { !m/^\./ && -d "$base/$_" } readdir(DIR) ;
closedir( DIR ) ;
debug( "sub_directory_list: [".join("][",@list)."]" ) ;
return @list ;
}
sub basename
{
my ( $path ) = @_ ;
$path =~ s:.*/:: ;
return $path ;
}
sub dirname
{
my ( $path ) = @_ ;
$path =~ s:/[^/]*$:: ;
return $path eq "" ? "." : $path ;
}
sub noextension
{
my ( $name ) = @_ ;
$name =~ s/\.[a-z]*$// ;
return $name ;
}
sub name_to_show
{
my ( $path ) = @_ ;
$path =~ s/.cpp$/.o/ ;
return basename($path) ;
}
sub mkdir_for
{
my ( $path_out ) = @_ ;
my $dir_out = dirname( $path_out ) ;
if( ! -d $dir_out )
{
debug( "mkdir [$dir_out]" ) ;
mkdir($dir_out) or die basename($0).": cannot create directory [$dir_out] ($!)" ;
}
}
sub print_banner
{
my ( $output , $file_in , $file_out ) = @_ ;
my $me = basename($0) ;
my $filename_out = basename( $file_out ) ;
my $filename_in = basename( $file_in ) ;
print $output "//\n" ;
print $output "// $filename_out -- autogenerated from $filename_in by $me\n" ;
print $output "//\n" ;
print $output "\n" ;
}
sub print_header
{
my ( $output , $head_ref ) = @_ ;
for my $h ( @$head_ref )
{
print $output $h , "\n" ;
}
}
my $n_ = 0 ;
sub first_file_out
{
$n_ = 0 ;
}
sub next_file_out
{
my ( $file_in , $dir_out ) = @_ ;
my $name = noextension(basename($file_in)) ;
my $file_out = "$dir_out/$name.$n_.cpp" ;
$n_++ ;
debug( "next: [$file_in] [$dir_out] [$file_out]" ) ;
return $file_out ;
}
sub is_pragma
{
my ( $line ) = @_ ;
return $line =~ m:^ *//pragma *fragments: ;
}
sub has_pragma
{
my ( $file_in ) = @_ ;
my $input = new FileHandle( $file_in , "<" ) ;
while( <$input> ) { return 1 if is_pragma($_) }
return 0 ;
}
sub fragment
{
my ( $file_in , $dir_out ) = @_ ;
my $has_pragma = has_pragma( $file_in ) ;
my $input = new FileHandle( $file_in , "<" ) or die basename($0).": cannot open input file [$file_in]" ;
my $output = undef ;
my @head = () ;
my $state = 0 ;
my $previous_line = "" ;
my $was_brace = 0 ;
my $was_hash_if = 0 ;
my $seen_pragma = 0 ;
my @file_list = () ;
first_file_out() ;
while( <$input> )
{
my $line = $_ ;
chomp $line ;
my $is_pragma = is_pragma($line) ;
my $is_namespace = $line =~ m/^namespace/ ;
my $is_method = $line =~ m/^[^[:space:]].*::.*\(/ ;
my $is_blank = $line =~ m/^[[:space:]]*$/ ;
my $is_brace = $line =~ m/^}/ ;
my $is_hash_if = $line =~ m/^#if/ ;
if( ( $state == 0 || $state == 2 ) && ( ($seen_pragma || !$has_pragma) && ( $is_namespace || $is_method ) ) )
{
$state = 1 ;
my $file_out = next_file_out( $file_in , $dir_out ) ;
mkdir_for( $file_out ) ;
$output = new FileHandle( $file_out , ">" ) or die basename($0).": cannot create output file [$file_out]" ;
push @file_list , name_to_show($file_out) ;
print_banner( $output , $file_in , $file_out ) ;
print_header( $output , \@head ) ;
if( $was_hash_if ) { print $output $previous_line , "\n" }
print $output $line , "\n" ;
}
elsif( $state == 1 && $was_brace && $is_blank )
{
$state = 2 ;
}
elsif( $state == 1 )
{
print $output $line , "\n" ;
}
elsif( $state == 0 )
{
push @head , $line unless $is_pragma ;
}
$was_brace = $is_brace ;
$was_hash_if = $is_hash_if ;
$seen_pragma = $seen_pragma || $is_pragma ;
$previous_line = $line ;
}
close $input or die ;
if( defined($output) ) { close $output or die basename($0).": cannot close output file" }
return @file_list ;
}
sub main
{
my $recursive = scalar(@ARGV) && $ARGV[0] eq "-r" ;
shift @ARGV if $recursive ;
my $dir_in = shift @ARGV ;
if( ! -d $dir_in )
{
die basename($0) . ": not a valid directory [$dir_in]" ;
}
my $dir_out = shift @ARGV ;
if( ! -d $dir_out )
{
die basename($0) . ": not a valid directory [$dir_out]" ;
}
my @list_out = () ;
my @dir_list_in = ( "." ) ;
push @dir_list_in , sub_directory_list($dir_in) if $recursive ;
for my $subdir ( @dir_list_in )
{
my $dir_in = "$dir_in/$subdir" ;
my @list_in = file_list_from_makefile( $dir_in ) ;
for my $file_in ( @list_in )
{
my $path_in = $dir_in . "/" . $file_in ;
push @list_out , fragment( $path_in , $dir_out ) ;
}
}
print join(" ",@list_out) , "\n" ;
}
main() ;

87
bin/make-bundle.sh_ Normal file
View File

@ -0,0 +1,87 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# make-bundle.sh
#
# Makes a Mac OS X application bundle. Called from make.
#
# usage: make-bundle.sh [-f] <name> <exe> <icon> [<version>]
#
# Silently does nothing on non-Mac systems.
#
force="0" ; if test "$1" = "-f" ; then force="1" ; shift ; fi
name="$1"
exe="$2"
icon="$3"
version="$4" ; if test "${version}" = "" ; then version="1.8.0" ; fi
if test "${name}" = ""
then
echo usage: `basename $0` '[-f] <name> <exe> <icon> [<version>]' >&2
exit 1
fi
if test "`uname`" != "Darwin" -a "$force" -eq 0
then
exit 0
fi
if test ! -x "${exe}"
then
echo `basename $0`: invalid exe >&2
exit 1
fi
yyyy="`date -u +'%Y'`"
copyright="Copyright (c) 2001-${yyyy} Graeme Walker &lt;graeme_walker@users.sourceforge.net&gt;>"
bundle_version="`date -u +'%Y.%m.%d.%H.%M.%S'`"
key="`basename \"${exe}\" | sed 's/\..*//'`"
if test -d "${name}.app"
then
rm -rf "${name}.app"
fi
dir="${name}.app/Contents"
mkdir -p "${dir}/MacOS" 2>/dev/null
mkdir -p "${dir}/Resources" 2>/dev/null
ln -f "${exe}" "${dir}/MacOS/${name}"
cp "${icon}" "${dir}/Resources/${name}.icns"
cat > "${dir}/Info.plist" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key> <string>${name}</string>
<key>CFBundleIconFile</key> <string>${name}.icns</string>
<key>CFBundleIdentifier</key> <string>net.sourceforge.emailrelay.${key}</string>
<key>CFBundleName</key> <string>${name}</string>
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleShortVersionString</key> <string>${version}</string>
<key>CFBundleSignature</key> <string>gwgw</string>
<key>CFBundleVersion</key> <string>${bundle_version}</string>
<key>LSHasLocalizedDisplayName</key> <false/>
<key>NSHumanReadableCopyright</key> <string>${copyright}</string>
<key>NSAppleScriptEnabled</key> <false/>
</dict>
</plist>
EOF

122
bin/make-qt-enabled.sh_ Normal file
View File

@ -0,0 +1,122 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# make-qt-enabled.sh
#
# Adds Qt frameworks to a Mac OS X application bundle. Called from make.
#
# usage: make-qt-enabled.sh [-f] <exe> <frameworks-sub-dir>
#
# eg. make-qt-enabled.sh Foo.app/Contents/MacOS ../Frameworks
# eg. make-qt-enabled.sh foo.real Frameworks
#
# Silently does nothing on non-Mac systems.
#
# See "http://doc.trolltech.com/4.3/deployment-mac.html".
#
force="0" ; if test "$1" = "-f" ; then force="1" ; shift ; fi
exe="$1"
fdir="$2"
echo="echo"
do=""
if test "`uname`" != "Darwin" -a "$force" -eq 0
then
exit 0
fi
if test "$fdir" = ""
then
fdir="../Frameworks"
fi
if test ! -x "$exe"
then
echo `basename $0`: no such exe >&2
exit 1
fi
base="`dirname \"$1\"`"
src="/Library/Frameworks"
rm -rf "$base/$fdir" 2>/dev/null
mkdir -p "$base/$fdir" 2>/dev/null
$echo cp -f -R \"$src/QtCore.framework\" \"$base/$fdir\"
$do cp -f -R "$src/QtCore.framework" "$base/$fdir"
$echo cp -f -R \"$src/QtGui.framework\" \"$base/$fdir\"
$do cp -f -R "$src/QtGui.framework" "$base/$fdir"
Id()
{
fk_="$1"
name_="$2"
if test "$name_" = "" ; then name_="`basename \"$fk_\" .framework`" ; fi
otool -D "$fk_/Versions/Current/$name_" | tail -1
}
SetId()
{
base_="$1"
fdir_="$2"
id_="$3"
$echo install_name_tool -id \"@executable_path/$fdir_/$id_\" \"$base_/$fdir_/$id_\"
$do install_name_tool -id "@executable_path/$fdir_/$id_" "$base_/$fdir_/$id_"
}
Path()
{
exe_="$1"
key_="$2"
otool -L "$exe_" | fgrep "$key_" | tr '\t' ' ' | sed 's/^ *//' | sed 's/ .*//'
}
SetPath()
{
lib_or_exe_="$1"
fdir_="$2"
path_="$3"
if test "`echo \"$path_\" | fgrep @executable_path | wc -l`" -eq 0
then
$echo install_name_tool -change \"$path_\" \"@executable_path/$fdir_/$path_\" \"$lib_or_exe_\"
$do install_name_tool -change "$path_" "@executable_path/$fdir_/$path_" "$lib_or_exe_"
else
true
fi
}
id_core="`Id \"$base/$fdir/QtCore.framework\"`"
id_gui="`Id \"$base/$fdir/QtGui.framework\"`"
SetId "$base" "$fdir" "$id_core"
SetId "$base" "$fdir" "$id_gui"
core_lib="$base/$fdir/QtCore.framework/Versions/Current/QtCore"
gui_lib="$base/$fdir/QtGui.framework/Versions/Current/QtGui"
gui_path_in_exe="`Path \"$exe\" QtGui`"
core_path_in_exe="`Path \"$exe\" QtCore`"
core_path_in_gui="`Path \"$gui_lib\" QtCore`"
SetPath "$exe" "$fdir" "$gui_path_in_exe" && \
SetPath "$exe" "$fdir" "$core_path_in_exe" && \
SetPath "$gui_lib" "$fdir" "$core_path_in_gui"

101
bin/make-setup.sh_ Normal file
View File

@ -0,0 +1,101 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# make-setup.sh
#
# Builds a "setup" self-extracting archive -- or a payload file for
# one -- derived from running "make install" into a temporary directory.
#
# usage: make-setup.sh [-d] <output> <stub> <pack-utility> <icon>
#
# Normally run by "make setup" in the "src/gui".
#
# The packed files are those that appear under "/usr", which
# matches the default installation directory presented in the
# gui (see Dir::os_install()).
#
# There is only one level of packing, so the gui executable
# should be statically linked or repacked with its shared
# libraries if targeting other machines.
#
# parse the command line
debug="0" ; if test "$1" = "-d" ; then shift ; debug="1" ; fi
setup="$1"
stub="$2"
pack="$3"
icon="$4"
# define temporary directories and cleanup code
tmp="/tmp/`basename $0 .sh`.$$.tmp"
install="$tmp/install"
list="$tmp/list"
trap Cleanup 0
trap Fail 1 2 3 13 15
Cleanup()
{
if test "$debug" -eq 0
then
rm -rf "$tmp"
fi
}
Fail()
{
Cleanup
exit 1
}
# check the command-line
if test "$setup" = "" -o ! -f "$stub" -o ! -x "$pack"
then
echo usage: `basename $0` '<setup> <stub> <pack>' >&2
exit 2
fi
# run "make install"
echo `basename $0`: running make install into $install
mkdir -p $install
( cd ../.. && make install HAVE_DOXYGEN=no DESTDIR=$install ) > /dev/null 2>&1
# add in some extras
if test -d "$install/usr/lib/emailrelay/"
then
cp "$icon" $install/usr/lib/emailrelay/
else
cp "$icon" $install/Applications/E-MailRelay/
fi
# build a file list
Filter()
{
fgrep -v /doxygen/ | fgrep -v /emailrelay-gui
}
Edit()
{
sed 's: \./: :'
}
echo `basename $0`: building a file list
find $install -type f | Filter | grep -n . | sed 's/:/1 /' > $list
( cd $install && find . -type f ) | Filter | grep -n . | sed 's/:/2 /' | Edit >> $list
sort -n $list | sed 's/^[0-9][0-9]* //' > $list.tmp && mv $list.tmp $list
# create the packed file
echo `basename $0`: packing
PATH=".:$PATH"
"$pack" -q -f "$list" "$setup" "$stub"

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -58,7 +58,7 @@ stylesheet="${2}"
if test "${stylesheet}" != "" -a \! -f "${stylesheet}"
then
echo `basename $0`: warning: missing stylesheet: ${stylesheet} >&2
: # echo `basename $0`: warning: missing stylesheet: ${stylesheet} >&2
fi
Main()

12
bin/startup-mac.plist Normal file
View File

@ -0,0 +1,12 @@
{
Description = "E-MailRelay server";
Provides = ("E-MailRelay");
Requires = ("Network");
Uses = ("Network");
OrderPreference = "Late";
Messages =
{
start = "Starting E-MailRelay";
stop = "Stopping E-MailRelay";
};
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -78,7 +78,7 @@ fi
if test "${stylesheet}" != "" -a \! -f "${stylesheet}"
then
echo `basename $0`: warning: missing stylesheet: "${stylesheet}" >&2
: # echo `basename $0`: warning: missing stylesheet: "${stylesheet}" >&2
fi
if test "${graphics_dir}" = ""
@ -89,5 +89,5 @@ fi
txt2mu="`dirname $0`/txt2mu.sh"
mu2html="`dirname $0`/mu2html.sh"
expand="`dirname $0`/expand.sh"
cat ${file} | ${expand} -a "${awk}" ${t} | ${txt2mu} -a "${awk}" ${t} | ${mu2html} -a "${awk}" ${x} "${title}" "${stylesheet}" | ${expand} -a "${awk}"
cat "${file}" | "${expand}" -a "${awk}" "${t}" | "${txt2mu}" -a "${awk}" "${t}" | "${mu2html}" -a "${awk}" ${x} "${title}" "${stylesheet}" | "${expand}" -a "${awk}"

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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
@ -324,7 +324,7 @@ Cat()
# ==
Cat ${file} | \
Cat "${file}" | \
Main "${text_mode}" | \
Compress | \
Number "item" | \

10
bootstrap Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# bootstrap
#
# Autogenerates stuff.
#
aclocal
autoconf
autoheader
automake -a -Woverride -Wportability

View File

@ -1,5 +1,11 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define for a mac build */
#undef G_MAC
/* Define to disable the G_LOG macro */
#undef G_NO_LOG
/* Define to 1 if <ctime> requires <time.h> */
#undef HAVE_BUGGY_CTIME
@ -16,9 +22,6 @@
/* Define to 1 if gmtime_r in time.h */
#undef HAVE_GMTIME_R
/* Define to 1 to enable gui code */
#undef HAVE_GUI
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@ -34,9 +37,6 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 to enable tls/ssh code using openssl */
#undef HAVE_OPENSSL
/* Define to 1 if setgroups is available */
#undef HAVE_SETGROUPS
@ -81,9 +81,6 @@
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@ -105,8 +102,29 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to use IPv6 */
#undef USE_IPV6
/* Define to eliminate unused admin interface code as a size optimisation */
#undef USE_NO_ADMIN
/* Define to eliminate unused authentication code as a size optimisation */
#undef USE_NO_AUTH
/* Define to eliminate unused exec-ing code as a size optimisation */
#undef USE_NO_EXEC
/* Define to eliminate unused pop code as a size optimisation */
#undef USE_NO_POP
/* Define to eliminate proxying code as a size optimisation */
#undef USE_NO_PROXY
/* Define to eliminate unused config code as a size optimisation */
#undef USE_SMALL_CONFIG
/* Define to have exception types as functions as a size optimisation */
#undef USE_SMALL_EXCEPTIONS
/* Define to enable extra debug messages at compile-time */
#undef _DEBUG

1243
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -17,8 +17,9 @@ dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(src/gsmtp/gsmtp.h)
AM_INIT_AUTOMAKE(emailrelay,1.7)
AC_INIT([E-MailRelay],[1.8],,[emailrelay])
AC_CONFIG_SRCDIR(src/gsmtp/gsmtp.h)
AM_INIT_AUTOMAKE([no-define])
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
@ -65,6 +66,7 @@ ACLOCAL_CHECK_BUGGY_CTIME
ACLOCAL_CHECK_GMTIME_R
ACLOCAL_CHECK_LOCALTIME_R
ACLOCAL_CHECK_SETGROUPS
ACLOCAL_CHECK_QT4
dnl ===
dnl initialise aclocal/pkg.m4...
@ -74,13 +76,13 @@ PKG_PROG_PKG_CONFIG(0.9.0)
dnl ===
dnl "--enable-debug"
dnl
AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[enable extra debug messages at compile-time (default disabled)]))
AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[enable extra debug messages at compile-time (default no)]))
ENABLE_DEBUG
dnl ===
dnl "--enable-ipv6"
dnl
AC_ARG_ENABLE(ipv6,AC_HELP_STRING([--enable-ipv6],[enable ipv6 (default disabled)]))
AC_ARG_ENABLE(ipv6,AC_HELP_STRING([--enable-ipv6],[enable ipv6 (default no)]))
ENABLE_IPV6
dnl ===
@ -90,10 +92,76 @@ AC_ARG_ENABLE(gui,AC_HELP_STRING([--enable-gui],[enable configuration gui (requi
ENABLE_GUI
dnl ===
dnl "--with-workshop"
dnl "--enable-verbose"
dnl
AC_ARG_WITH(workshop,AC_HELP_STRING([--with-workshop],[use Sun WorkShop 'CC -xar' as the 'ar' tool (default disabled)]))
WITH_WORKSHOP
AC_ARG_ENABLE(verbose,AC_HELP_STRING([--enable-verbose],[enable verbose logging (default yes)]))
ENABLE_VERBOSE
dnl ===
dnl "--enable-pop"
dnl
AC_ARG_ENABLE(pop,AC_HELP_STRING([--enable-pop],[enable pop3 protocol (default yes)]))
ENABLE_POP
dnl ===
dnl "--enable-exec"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-exec],[enable running of external programs (disable-exec requires disable-gui) (default yes)]))
ENABLE_EXEC
dnl ===
dnl "--enable-admin"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-admin],[enable admin interface (default yes)]))
ENABLE_ADMIN
dnl ===
dnl "--enable-auth"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-auth],[enable authentication (disable-auth requires disable-pop) (default yes)]))
ENABLE_AUTH
dnl ===
dnl "--enable-dns"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-dns],[enable dns lookup (default yes)]))
ENABLE_DNS
dnl ===
dnl "--enable-identity"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-identity],[enable process userid switching (default yes)]))
ENABLE_IDENTITY
dnl ===
dnl "--enable-small-config"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-small-config],[enable simplified confuration code for smaller binaries (rtfm) (default no)]))
ENABLE_SMALL_CONFIG
dnl ===
dnl "--enable-small-fragments"
dnl
AC_ARG_ENABLE(exec,AC_HELP_STRING([--enable-small-fragments],[enable fragmented object files for smaller binaries (default no)]))
ENABLE_SMALL_FRAGMENTS
dnl ===
dnl "--enable-small-exceptions"
dnl
AC_ARG_ENABLE(small_exceptions,AC_HELP_STRING([--enable-small-exceptions],[optimise exception classes for smaller binaries (default no)]))
ENABLE_SMALL_EXCEPTIONS
dnl ===
dnl "--enable-proxy"
dnl
AC_ARG_ENABLE(proxy,AC_HELP_STRING([--enable-proxy],[enable proxying (default yes)]))
ENABLE_PROXY
dnl ===
dnl "--enable-mac"
dnl
AC_ARG_ENABLE(mac,AC_HELP_STRING([--enable-mac],[enable building for a mac os x target (default auto)]))
ENABLE_MAC
dnl ===
dnl "--with-doxygen"
@ -113,6 +181,12 @@ dnl
AC_ARG_WITH(openssl,AC_HELP_STRING([--with-openssl],[use openssl for smtp client tls extension (default auto)]))
WITH_OPENSSL
dnl ===
dnl "--with-glob"
dnl
AC_ARG_WITH(glob,AC_HELP_STRING([--with-glob],[use glob() for reading directories (default auto)]))
WITH_GLOB
dnl ===
dnl "--enable-static-linking"
dnl
@ -122,30 +196,22 @@ ENABLE_STATIC_LINKING
dnl ===
dnl directory tweaking and "--enable-fhs" ...
dnl
dnl define e_ prefixed variables with a gnu feel and then
dnl use the enable_fhs macro tweak them for fhs
dnl define e_ prefixed directory variables
dnl
dnl not AC_PREFIX_DEFAULT([/usr])
AC_ARG_ENABLE(fhs,AC_HELP_STRING([--enable-fhs],[force FHS-compliant directories, ignoring --prefix etc (default disabled)]))
AC_ARG_ENABLE(fhs,AC_HELP_STRING([--enable-fhs],[force FHS-compliant directories, ignoring --prefix etc (default no)]))
SET_DIRECTORIES
AC_SUBST(e_docdir)
if test "$e_docdir" = "" ; then e_docdir="$docdir" ; fi
if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; fi
AC_SUBST(e_initdir)
if test "$e_initdir" = "" ; then e_initdir="$libexecdir/$PACKAGE/init" ; fi
AC_SUBST(e_spooldir)
if test "$e_spooldir" = "" ; then e_spooldir="$localstatedir/spool/$PACKAGE" ; fi
AC_SUBST(e_examplesdir)
if test "$e_examplesdir" = "" ; then e_examplesdir="$libexecdir/$PACKAGE/examples" ; fi
AC_SUBST(e_libexecdir)
if test "$e_libexecdir" = "" ; then e_libexecdir="$libexecdir/$PACKAGE" ; fi
AC_SUBST(e_sysconfdir)
if test "$e_sysconfdir" = "" ; then e_sysconfdir="$sysconfdir" ; fi
AC_SUBST(e_qtmoc)
if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi
ENABLE_FHS
dnl ===
dnl generate files...
dnl
AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gssl/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile)
AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gssl/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile extra/Makefile extra/mips/Makefile src/fragments/Makefile)

33
depcomp
View File

@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18
scriptversion=2007-03-29.01
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@ -215,34 +215,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -41,13 +41,13 @@ converter_mu2docbook=$(top_builddir)/bin/mu2docbook.sh
run_doxygen=$(top_builddir)/bin/doxygen.sh
.txt.html:
$(converter_html) -a "$(AWK)" $(top_srcdir)/doc/$*.txt $(stylesheet) > $*.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/doc/$*.txt" "$(stylesheet)" > "$*.html"
.txt.mu:
$(converter_txt2mu) -a "$(AWK)" $(top_srcdir)/doc/$*.txt > $*.mu
$(converter_txt2mu) -a "$(AWK)" "$(top_srcdir)/doc/$*.txt" > "$*.mu"
.mu.db:
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.mu > $*.db
$(converter_mu2docbook) -a "$(AWK)" -x < "$(top_builddir)/doc/$*.mu" > "$*.db"
head.db: $(converter_mu2docbook)
$(converter_mu2docbook) -a "$(AWK)" --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
@ -65,39 +65,39 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
$(run_doxygen) "$(HAVE_DOXYGEN)" "$(top_srcdir)" "$(top_builddir)" && touch .dox
emailrelay-man.html: emailrelay.1
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html | grep -v '^Time:' > emailrelay-man.html.tmp ; mv emailrelay-man.html.tmp emailrelay-man.html ; fi
developer.html reference.html userguide.html: $(converter_html)
developer.mu reference.mu userguide.mu: $(converter_txt2mu)
readme.html: $(top_srcdir)/README $(converter_html)
$(converter_html) -a "$(AWK)" $(top_srcdir)/README $(stylesheet) > readme.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/README" "$(stylesheet)" > readme.html
changelog.html: $(top_srcdir)/ChangeLog $(converter_html)
$(converter_html) -a "$(AWK)" $(top_srcdir)/ChangeLog $(stylesheet) > changelog.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/ChangeLog" "$(stylesheet)" > changelog.html
emailrelay.1.gz : emailrelay.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay.1 > emailrelay.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay.1" > emailrelay.1.gz ; fi
emailrelay-passwd.1.gz : emailrelay-passwd.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-passwd.1 > emailrelay-passwd.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-passwd.1" > emailrelay-passwd.1.gz ; fi
emailrelay-submit.1.gz : emailrelay-submit.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-submit.1 > emailrelay-submit.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-submit.1" > emailrelay-submit.1.gz ; fi
emailrelay-filter-copy.1.gz : emailrelay-filter-copy.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-filter-copy.1 > emailrelay-filter-copy.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-filter-copy.1" > emailrelay-filter-copy.1.gz ; fi
emailrelay-poke.1.gz: emailrelay-poke.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-poke.1 > emailrelay-poke.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-poke.1" > emailrelay-poke.1.gz ; fi
install-data-local: install-e_docDATA
$(mkinstalldirs) $(DESTDIR)$(e_docdir)/doxygen
if test "$(HAVE_DOXYGEN)" = "yes" ; then for file in doxygen/* ; do $(INSTALL) $$file $(DESTDIR)$(e_docdir)/$$file ; done ; fi
$(mkinstalldirs) "$(DESTDIR)$(e_docdir)/doxygen"
if test "$(HAVE_DOXYGEN)" = "yes" ; then for file in doxygen/* ; do $(INSTALL) "$$file" "$(DESTDIR)$(e_docdir)/$$file" ; done ; fi
uninstall-local:
-rm -f $(DESTDIR)$(e_docdir)/doxygen/* 2>/dev/null
-rmdir $(DESTDIR)$(e_docdir)/doxygen 2>/dev/null
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
-find "$(DESTDIR)$(e_docdir)/doxygen" -type f | xargs rm -f
-rmdir "$(DESTDIR)$(e_docdir)/doxygen" 2>/dev/null
-rmdir "$(DESTDIR)$(e_docdir)" 2>/dev/null

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -84,6 +84,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -93,7 +94,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -117,7 +117,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -426,13 +425,13 @@ uninstall-man: uninstall-man1
.txt.html:
$(converter_html) -a "$(AWK)" $(top_srcdir)/doc/$*.txt $(stylesheet) > $*.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/doc/$*.txt" "$(stylesheet)" > "$*.html"
.txt.mu:
$(converter_txt2mu) -a "$(AWK)" $(top_srcdir)/doc/$*.txt > $*.mu
$(converter_txt2mu) -a "$(AWK)" "$(top_srcdir)/doc/$*.txt" > "$*.mu"
.mu.db:
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.mu > $*.db
$(converter_mu2docbook) -a "$(AWK)" -x < "$(top_builddir)/doc/$*.mu" > "$*.db"
head.db: $(converter_mu2docbook)
$(converter_mu2docbook) -a "$(AWK)" --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
@ -450,41 +449,41 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
$(run_doxygen) "$(HAVE_DOXYGEN)" "$(top_srcdir)" "$(top_builddir)" && touch .dox
emailrelay-man.html: emailrelay.1
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html | grep -v '^Time:' > emailrelay-man.html.tmp ; mv emailrelay-man.html.tmp emailrelay-man.html ; fi
developer.html reference.html userguide.html: $(converter_html)
developer.mu reference.mu userguide.mu: $(converter_txt2mu)
readme.html: $(top_srcdir)/README $(converter_html)
$(converter_html) -a "$(AWK)" $(top_srcdir)/README $(stylesheet) > readme.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/README" "$(stylesheet)" > readme.html
changelog.html: $(top_srcdir)/ChangeLog $(converter_html)
$(converter_html) -a "$(AWK)" $(top_srcdir)/ChangeLog $(stylesheet) > changelog.html
$(converter_html) -a "$(AWK)" "$(top_srcdir)/ChangeLog" "$(stylesheet)" > changelog.html
emailrelay.1.gz : emailrelay.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay.1 > emailrelay.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay.1" > emailrelay.1.gz ; fi
emailrelay-passwd.1.gz : emailrelay-passwd.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-passwd.1 > emailrelay-passwd.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-passwd.1" > emailrelay-passwd.1.gz ; fi
emailrelay-submit.1.gz : emailrelay-submit.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-submit.1 > emailrelay-submit.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-submit.1" > emailrelay-submit.1.gz ; fi
emailrelay-filter-copy.1.gz : emailrelay-filter-copy.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-filter-copy.1 > emailrelay-filter-copy.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-filter-copy.1" > emailrelay-filter-copy.1.gz ; fi
emailrelay-poke.1.gz: emailrelay-poke.1
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/doc/emailrelay-poke.1 > emailrelay-poke.1.gz ; fi
if test -n "$(GZIP)" ; then $(GZIP) -c "$(top_srcdir)/doc/emailrelay-poke.1" > emailrelay-poke.1.gz ; fi
install-data-local: install-e_docDATA
$(mkinstalldirs) $(DESTDIR)$(e_docdir)/doxygen
if test "$(HAVE_DOXYGEN)" = "yes" ; then for file in doxygen/* ; do $(INSTALL) $$file $(DESTDIR)$(e_docdir)/$$file ; done ; fi
$(mkinstalldirs) "$(DESTDIR)$(e_docdir)/doxygen"
if test "$(HAVE_DOXYGEN)" = "yes" ; then for file in doxygen/* ; do $(INSTALL) "$$file" "$(DESTDIR)$(e_docdir)/$$file" ; done ; fi
uninstall-local:
-rm -f $(DESTDIR)$(e_docdir)/doxygen/* 2>/dev/null
-rmdir $(DESTDIR)$(e_docdir)/doxygen 2>/dev/null
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
-find "$(DESTDIR)$(e_docdir)/doxygen" -type f | xargs rm -f
-rmdir "$(DESTDIR)$(e_docdir)/doxygen" 2>/dev/null
-rmdir "$(DESTDIR)$(e_docdir)" 2>/dev/null
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -16,6 +16,9 @@ means that the "gnet" library has to be able to create GUI windows in order to
process network events. The extra GUI and event classes are put into a separate
library in the "src/win32" directory, using the namespace "GGui".
There is also a separate configuration GUI program which uses the "glib" library
together with TrollTech's Qt.
Event model
-----------
The E-MailRelay server uses non-blocking socket i/o, with a select() event loop.
@ -105,9 +108,12 @@ runs the wrapper starts the actual E-MailRelay server by looking for a batch
file called "emailrelay-start.bat" in the same directory as service wrapper
executable. It reads the contents of this batch file in order to construct the
E-MailRelay command-line, adding "--no-daemon" and "--hidden" switches if they
are not there already. The service name and display name can be put onto the
wrapper's "--install" command-line, and it is the service name that is used to
derive the name of the "start" batch file.
are not there already.
The service name and display name can be added to the wrapper's "--install"
command-line, and it is the service name that is used to derive the name of the
"start" batch file. This allows more than one server to be run as services,
using different server command-line switches on each one.
Diagrams
--------
@ -122,6 +128,63 @@ State transition diagrams:
Sequence diagrams:
* *Proxy mode forwarding* [sequence-3.png]
Configuration GUI
-----------------
The optional configuration GUI program "emailrelay-gui" uses TrollTech Qt v4
for its user interface components. The GUI can run as a stand-alone
configuration helper or as part of a self-extracting installation program called
"emailrelay-setup".
The packing scheme used to assemble a self-extracting archive is a simple
concatenation of the "stub" executable followed by a table of contents for the
payload files, followed by the payload files themselves (possibly compressed by
"zlib"), and ending with an twelve-byte ascii representation of the offset of
the table of contents.
On Windows there are two levels of packing: the "setup" program has a stub
executable written in "C" that prints an "extracting..." message to the standard
output, with a payload comprising another packed executable and a small number of
"C++" runtime library files. The inner packed executable has the emailrelay GUI
program as its stub and all the other installable files, including the main
emailrelay executable, as its payload.
When the GUI runs it checks whether it has a payload of packed files. If it
has then it runs as an installer; if it does not then it runs as a configuration
helper. Refer to the comments in "src/gui/guimain.cpp" for more details.
The code works exactly the same on Windows, Mac OS X and unix-like operating
systems. However, on unix-like operating systems "make install", possibly run
via some package manager, is the preferred way to install files so the "setup"
program is never normally built or distributed. On Mac OS X the default packing
scheme works well enough, but there is also provision for having a separate
payload file within the Mac bundle rather than appending the payload to the stub
executable.
The user interface is structured as a "wizard" having a dialog box with the
forward and back buttons at the bottom and a single Qt layout object for the
main area. A stack of Qt widgets representing the various pages of the wizard
are installed into the main layout object in turn as the user navigates from
one page to the next.
Once the wizard is completed it asks each page to dump its state as a set of
key-value pairs into a stringstream (see "src/gui/pages.cpp"). These key-value
pairs are processed by an installer class into a list of action objects (in the
"Command" design pattern) and then the action objects are run in turn. In order
to display the progress of the installation each action object is run within a
timer callback so that the Qt framework get a chance to update the GUI between
each one.
During development the user interface pages and the installer can be tested
separately since the interface between them is a simple text stream containing
key-value pairs.
Source control
--------------
The source code is stored in the SourceForge "svn" repository. A working
copy can be checked out as follows:
$ svn co https://emailrelay.svn.sourceforge.net/svnroot/emailrelay
Directory structure
-------------------
@ -156,7 +219,7 @@ Directory structure
# src/gui
Installation and configuration GUI program using Qt 4.
Installation and configuration GUI program using Qt v4.
# lib
@ -166,15 +229,24 @@ Directory structure
Test scripts and utilities.
Source file names
-----------------
Generally the source file names are follow the name of the principal class,
(often including the namespace) but all in lowercase. Any underscores in the
name indicate a choice of implementation, so class "G::Foo" might have two
implementations in the files "gfoo_main.cpp" and "gfoo_alternate.cpp".
The choice is normally made by the makefile.
Portability
-----------
The E-MailRelay code is written in ISO C++, although avoiding less-widely
supported language features like "mutable", templated methods and "export".
supported language features such as "mutable", templated methods and "export".
The header files "gdef.h" in "src/glib", and "gnet.h" in "src/gnet" are intended
to be used to fix up compiler portability issues such as missing standard types,
non-standard system headers etc. Conditional compilation directives ("#if"
etc.) are largely confined to these headers in order to improve readability.
etc.) are confined to these headers as far as possible in order to improve
readability.
Deficiencies in the standard headers files provided by older compilers are fixed
up by files in the "lib" directory tree. For example, the msvc6.0 compiler
@ -184,8 +256,8 @@ declarations in the "lib/msvc6.0" headers. These work-rounds are kept out of
the "src" tree because they are not necessary for more modern compilers.
Windows/unix portability is generally addressed by providing a common class
declaration with two implementations. Where necessary a "pimple" pattern is used
to hide the system-specific parts of the declaration.
declaration with two implementations. Where necessary a "pimple" (or "Bridge")
pattern is used to hide the system-specific parts of the declaration.
A good example is the "G::Directory" class used for iterating through files in
a directory. The header file "src/glib/gdirectory.h" is common to both systems,
@ -199,14 +271,34 @@ these cases there are three source files per header. For example, "gsocket.cpp",
Compile-time features
---------------------
Compile-time features can normally be selected with switches passed to the
"configure" script. These include the following:
Compile-time features can be selected with switches passed to the "configure"
script. These include the following:
* Debug-level logging ("--enable-debug")
* IPv6 (Linux only) ("--enable-ipv6")
* Configuration GUI ("--enable-gui")
Use "./configure --help" to see a complete list.
The "--enable-fhs" switch alters the compiled-in default directories to conform
to the Linux File Hierarchy Standard (FHS). This is recommended for most modern
Linux distributions.
Some functionality can be disabled at compile-time in order to reduce the size
of the executable, typically when building for embedded systems:
* Disable POP3 protocol, "--disable-pop"
* Disable authentication, "--disable-auth" (requires "--disable-pop")
* Disable administration interface, "--disable-admin"
* Disable execution of external programs, "--disable-exec"
The "--enable-small-config" switch can be used to change the command-line
parsing code to use a configuration file instead, resulting in a smaller
executable. This also removes a lot of the configuration checking code, so it is
not recommended unless size is critical. (The format of the configuration file
is similar to the command-line using the long-form switches without the
double-dash and using '=' to separate the switch from the switch value.)
Use "./configure --help" to see a complete list of options and refer to
"acinclude.m4" for more detailed comments.
Patterns
--------
@ -240,6 +332,10 @@ Gang-of-four Design Patterns (ISBN 0-201-63361-2):
- GSmtp::ProtocolMessage
+ Command
- Installer
Lakos' Large Scale C++ Software Design patterns (ISBN 0-201-63362-0):
+ Insulation; fully insulating concrete class (Meyer's Effective C++ Item 34, pimple pattern)
@ -285,6 +381,10 @@ Other patterns:
- G::Slot0
+ Dependency injection
- GSmtp::Server::newProtocolMessage()
Idioms
------
The "<<=" operator defined in "src/glib/gmemory.h" is used idiomatically
@ -292,4 +392,4 @@ to reassign a std::auto_ptr<> since reset() is not always available.
Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.
Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.

View File

@ -11,4 +11,4 @@
</div>
</body>
</html>
<!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->
<!-- Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->

View File

@ -1,4 +1,4 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
.\"
.\" 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

View File

@ -224,6 +224,10 @@ Enables authentication of remote clients, using the given secrets file.
<DD>
Enables tls/ssl layer for smtp server using the given openssl certificate file (if openssl built in).
<DT><B>-M, --size </B><I>&lt;bytes&gt;</I>
<DD>
Limits the size of submitted messages.
<DT><B>-s, --spool-dir </B><I>&lt;dir&gt;</I>
<DD>
@ -380,7 +384,6 @@ Graeme Walker, mailto:<A HREF="mailto:graeme_walker@users.sourceforge.net">graem
This document was created by
<A HREF="lynxcgi:FOO/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:56:15 GMT, September 19, 2007
</BODY>
</HTML>
<!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->
<!-- Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->

View File

@ -1,4 +1,4 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
.\"
.\" 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

View File

@ -1,4 +1,4 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
.\"
.\" 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

View File

@ -1,4 +1,4 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
.\"
.\" 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

View File

@ -1,4 +1,4 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
.\"
.\" 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
@ -169,6 +169,9 @@ Enables authentication of remote clients, using the given secrets file.
.B \-K, --server-tls \fI<pem-file>\fR
Enables tls/ssl layer for smtp server using the given openssl certificate file (if openssl built in).
.TP
.B \-M, --size \fI<bytes>\fR
Limits the size of submitted messages.
.TP
.B \-s, --spool-dir \fI<dir>\fR
Specifies the spool directory (default is \fI/var/spool/emailrelay\fR).
.TP

View File

@ -21,4 +21,4 @@
</div>
</body>
</html>
<!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->
<!-- Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->

View File

@ -125,6 +125,9 @@ where <switch> is:
# --server-tls (-K)
Enables tls/ssl layer for smtp server using the given openssl certificate file (if openssl built in).
# --size (-M)
Limits the size of submitted messages.
# --spool-dir (-s)
Specifies the spool directory (default is "/var/spool/emailrelay").
@ -535,6 +538,15 @@ switch) but the remote server does not support the AUTH extension, or does not
support the LOGIN or CRAM-MD5 mechanism, then E-MailRelay will log an error
and not forward any messages.
If E-MailRelay successfully authenticates with the remote server then the
client's authentication name (if any) is passed as a parameter to the MAIL
command when the message is forwarded. Some SMTP servers are reported to reject
the message if the name on the MAIL command does not match the name used to
authenticate with them. However, the name passed as a parameter to the MAIL
command is stored in the message's envelope file, so a "--filter" script can be
used to change this to match whatever the remote server expects. An example
script is provided in the distribution.
Note that some ISPs require separate POP/IMAP authentication before SMTP access
from a particular IP address is allowed. This type of POP-before-SMTP
authentication can be done outside the E-MailRelay system by POP/IMAP utilities
@ -742,8 +754,7 @@ To force FHS compliance you can use the "--enable-fhs" switch when running
* /var/spool/emailrelay/emailrelay.*.envelope
For finer control of the directory structure the following can be specified on
the "configure" command-line (but note that the "--enable-fhs" will override
them):
the "configure" command-line:
* --mandir=<dir>
* --sbindir=<dir>
* e_libexecdir=<dir>
@ -780,4 +791,4 @@ the ".pc" file by setting "LDFLAGS":
Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.
Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.

View File

@ -21,8 +21,8 @@ waits for incoming mail and stores anything it receives in a spool directory.
As a forwarding agent E-MailRelay pulls messages out of the spool directory
and passes them on to a remote server -- perhaps your ISP mail server.
E-MailRelay can also run as a POP3 server so that e-mail front-end programs
can read the spooled messages.
E-MailRelay can also run as a POP3 server so that e-mail client programs can
read the spooled messages.
What it's not
-------------
@ -219,8 +219,8 @@ authentication. In this scheme you are required to conduct an authenticated POP
or IMAP dialogue before you try to use SMTP. The POP/IMAP dialogue is done
separately from the SMTP connection, but bear in mind that there might be a time
limit so that your SMTP connection has to be made soon after the POP/IMAP
authentication. You should be able to use an e-mail front-end program, or
something like "fetchmail" to do the POP/IMAP authentication.
authentication. You should be able to use an e-mail client program, or something
like "fetchmail" to do the POP/IMAP authentication.
If you can send mail messages sucessfully using telnet, then you should look at
the E-MailRelay "--verbose" log output and compare what you do interactively
@ -241,9 +241,9 @@ use a firewall in this scenario.
Another option is to require all clients to authenticate by using the
"--server-auth" switch. If you then need local clients, such as your own e-mail
front-end, to connect without authentication then you must put those trusted IP
addresses in the secrets file with an authentication mechanism of "NONE". Refer
to the reference guide for more information.
client program, to connect without authentication then you must put those
trusted IP addresses in the secrets file with an authentication mechanism of
"NONE". Refer to the reference guide for more information.
Taking it one stage further, you may want to allow connections from the Internet
without authentication but only allow them to send mail to local users. In other
@ -257,9 +257,9 @@ details.
Running as a POP server
-----------------------
E-MailRelay can run as a POP server so that e-mail front-end programs can
retrieve messages from the spool directory directly (although it is not a good
idea to run E-MailRelay as a POP server if also forwarding messages by SMTP).
E-MailRelay can run as a POP server so that e-mail client programs can retrieve
messages from the spool directory directly (although it is not a good idea to
run E-MailRelay as a POP server if also forwarding messages by SMTP).
To allow POP access to spooled messages use a command-line something like this:
@ -274,7 +274,7 @@ like this:
If you need to serve up messages to more than one POP client consider using the
"--pop-by-name" option with a "--filter" script that moves messages into the
appropriate subdirectory. The "emailrelay-filter-copy" program is designed
appropriate sub-directory. The "emailrelay-filter-copy" program is designed
to be used in this way: when a message is received over SMTP it copies it
into all available sub-directories for collection by multiple POP clients.
@ -325,7 +325,25 @@ they have not been retried too many times already.
If you are using E-MailRelay to forward outgoing e-mails then you can also get
failed e-mails to bounce back to your in-tray by running the
"emailrelay-notify.sh" script periodically as "root", although this does require
"procmail" to be available to act as a delivery agent.
"procmail" to act as a delivery agent.
Polling and timeouts
--------------------
In normal proxy mode, using "--immediate" or "--as-proxy", the E-MailRelay
server will try forward each message as soon as it is received and only then
will it acknowledge receipt of the message back to the submitting client. This
has the advantage that any problems with the forwarding process can be reported
back to the submitting client; any failures should be reported your e-mail
client program and the failed messages should stay in its "outbox".
However, some e-mail client programs are not always prepared to wait long enough
for the message to be forwarded and this can result in problems with timeouts. A
good fix for this is to use the "--poll" mechanism as a replacement for
"--immediate"/"--as-proxy". In this way the submitting e-mail client program
does not have to wait for the E-MailRelay server to forward each message and so
it should not time out. If you have timeout problems try replacing "--immediate"
with "--poll 0" so that forwarding is done as soon as the client has finished
submitting messages.
Usage patterns
--------------
@ -341,21 +359,12 @@ at any time, as long as the envelope file is not locked (ie. with a special
filename extension). Your "--filter" program can edit messages in any way you
want, and it can even remove the current message from the spool directory.
Another useful technique is to run E-MailRelay as an SMTP server but use the
"--poll" switch so that the server process will also do periodic forwarding.
With a short "--poll" period this behaves rather like a proxy, but the
submitting client program does not have to wait for the message to be delivered
to the remote server. To avoid the overhead of polling the spool directory
continuously you can use get the "--filter" program to force the "--poll" timer
to expire as each new message is received by using a special exit value of 103.
When using E-MailRelay as a POP server the "--pop-by-name" feature can be used
to serve up different spooled messages according to the username that the client
authenticated with: each user's messages are taken from their own sub-directory
of the main spool directory. This means that you can decide how to move or copy
the messages into those sub-directories. If messages are coming in over SMTP
then you could install an SMTP "--filter" script to move each new message into
the relevant sub-directory based on the message addressing.
of the main spool directory. If messages are coming in over SMTP then you could
install an SMTP "--filter" script to move each new message into the relevant
sub-directory based on the message addressing.
For more ideas check out the "--client-filter" and "--poll" switches, and don't
overlook the administration and control interface ("--admin") which you can use
@ -428,7 +437,7 @@ The secrets file should contain one line of text something like this:
login client myname@gmail.com mypassword
Refer to this file using "--client-auth" on the E-MailRelay command-line and
Reference this file using "--client-auth" on the E-MailRelay command-line and
also add in the "--client-tls" switch:
emailrelay --as-proxy smtp.gmail.com:587 --client-tls --client-auth /etc/emailrelay.auth ...
@ -436,4 +445,4 @@ also add in the "--client-tls" switch:
Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.
Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.

View File

@ -9,8 +9,8 @@ setup program is in a writeable directory with plenty of space on the disk
because when you run it it will extract an installation GUI program plus
dependent DLLs in into the same directory.
The installation GUI program will take you through the installation options and
then install the run-time files into your chosen directory.
The installation GUI will take you through the installation options and then
install the run-time files into your chosen directory.
Manual installation
-------------------
@ -36,29 +36,36 @@ at boot-time you must first create a one-line batch file called
the full E-MailRelay server command-line. Then run "emailrelay-service --install"
to install the service.
When the E-MailRelay server is run in this way it has the "--no-daemon" and
"--hidden" switches added so that there is no user interface. (The "--no-daemon"
switch on Windows changes the interface from using the system-tray to using a
normal window, and the "--hidden" switch suppresses the window and any message
boxes.)
When the E-MailRelay server is run in this way the "--no-daemon" and "--hidden"
switches are added automatically to whatever is in the "emailrelay-start" batch
file, so that there is no user interface. (The "--no-daemon" switch on Windows
changes the interface from using the system-tray to using a normal window, and
the "--hidden" switch suppresses the window and any message boxes.)
Note that the batch file and the main E-MailRelay executable must be in the same
directory and that the batch file is only read at install time; if you need to
change the command-line switches for the service you must edit the service
properties.
directory.
If you need to run multiple E-MailRelay services then pass a unique service name
on the "emailrelay-server --install <name>" command-line. This name is used to
derive the name of the "<name>-start.bat" batch file that contains the
E-MailRelay server's command-line switches so you will need to create this too.
Diagnostics
-----------
E-MailRelay normally writes errors and warnings into the system event log, which
you can view by running "eventvwr.exe". You can increase the verbosity by adding
the "--verbose" switch to the E-MailRelay command-line.
the "--verbose" switch to the E-MailRelay command-line, typically by editing the
"emailrelay-start.bat" batch script.
The E-MailRelay server also logs to the standard error stream but the
The E-MailRelay server also logs to the standard error stream, however the
"--as-server" and "--as-proxy" switches implicitly incorporate "--close-stderr"
so with these switches the standard error logging will stop soon after startup.
To get continuous logging you should replace "--as-server" with "--log" and
"--as-proxy" with "--immediate --forward-to". Then you will be able to redirect
the standard error stream to a log file.
To get continuous logging to a log file you should replace "--as-server" with
"--log" and "--as-proxy" with "--immediate --forward-to" and then use "2>" to
redirect the standard error stream, eg:
"c:\program files\emailrelay\emailrelay.exe" --log -v -L ... > c:\temp.out 2>&1
Building from source
--------------------
@ -72,4 +79,4 @@ MinGW please follow the guidelines in "mingw-common.mak" which is also in the
Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.
Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved.

View File

@ -0,0 +1,613 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 44;
objects = {
/* Begin PBXAggregateTarget section */
EE99190B0D9193D100FB06D5 /* all-targets */ = {
isa = PBXAggregateTarget;
buildConfigurationList = EE9919150D91940100FB06D5 /* Build configuration list for PBXAggregateTarget "all-targets" */;
buildPhases = (
);
dependencies = (
EE99190F0D9193DC00FB06D5 /* PBXTargetDependency */,
EE9919110D9193DC00FB06D5 /* PBXTargetDependency */,
EE9919130D9193DC00FB06D5 /* PBXTargetDependency */,
);
name = "all-targets";
productName = "all-targets";
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
EE486FEF0D3E3EA900AB4CC6 /* dir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FCA0D3E3EA900AB4CC6 /* dir.cpp */; };
EE486FF20D3E3EA900AB4CC6 /* gdialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FD00D3E3EA900AB4CC6 /* gdialog.cpp */; };
EE486FF40D3E3EA900AB4CC6 /* gpage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FD40D3E3EA900AB4CC6 /* gpage.cpp */; };
EE486FF50D3E3EA900AB4CC6 /* guimain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FD60D3E3EA900AB4CC6 /* guimain.cpp */; };
EE486FF60D3E3EA900AB4CC6 /* gunpack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FD70D3E3EA900AB4CC6 /* gunpack.cpp */; };
EE486FF70D3E3EA900AB4CC6 /* installer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FDA0D3E3EA900AB4CC6 /* installer.cpp */; };
EE486FF80D3E3EA900AB4CC6 /* legal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FDC0D3E3EA900AB4CC6 /* legal.cpp */; };
EE486FFC0D3E3EA900AB4CC6 /* pages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE486FE50D3E3EA900AB4CC6 /* pages.cpp */; };
EE4870560D3E529100AB4CC6 /* moc_gdialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE4870530D3E529100AB4CC6 /* moc_gdialog.cpp */; };
EE4870570D3E529100AB4CC6 /* moc_gpage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE4870540D3E529100AB4CC6 /* moc_gpage.cpp */; };
EE4870580D3E529100AB4CC6 /* moc_pages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE4870550D3E529100AB4CC6 /* moc_pages.cpp */; };
EEC342C10D50E0BD00DD9918 /* boot_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC342BF0D50E0BD00DD9918 /* boot_mac.cpp */; };
EEC342C20D50E0BD00DD9918 /* dir_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC342C00D50E0BD00DD9918 /* dir_mac.cpp */; };
EEC342C60D50E0D800DD9918 /* glink_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC342C30D50E0D800DD9918 /* glink_mac.cpp */; };
EEC342C80D50E0D800DD9918 /* state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC342C50D50E0D800DD9918 /* state.cpp */; };
EEC342E80D50F68600DD9918 /* guistart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEC342C40D50E0D800DD9918 /* guistart.cpp */; };
EEC342FA0D50F72800DD9918 /* unpackmain.c in Sources */ = {isa = PBXBuildFile; fileRef = EEC342F90D50F72800DD9918 /* unpackmain.c */; };
EEC342FC0D50F73900DD9918 /* unpack.c in Sources */ = {isa = PBXBuildFile; fileRef = EE486FEC0D3E3EA900AB4CC6 /* unpack.c */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
EE99190E0D9193DC00FB06D5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8DD76F620486A84900D96B5E;
remoteInfo = "emailrelay-gui";
};
EE9919100D9193DC00FB06D5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EEC342DE0D50F62E00DD9918;
remoteInfo = "emailrelay-start";
};
EE9919120D9193DC00FB06D5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EEC342EC0D50F6B600DD9918;
remoteInfo = "emailrelay-unpack";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
8DD76F690486A84900D96B5E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
8DD76F6C0486A84900D96B5E /* emailrelay-gui */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "emailrelay-gui"; sourceTree = BUILT_PRODUCTS_DIR; };
EE486FC90D3E3EA900AB4CC6 /* boot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = boot.h; sourceTree = "<group>"; };
EE486FCA0D3E3EA900AB4CC6 /* dir.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dir.cpp; sourceTree = "<group>"; };
EE486FCB0D3E3EA900AB4CC6 /* dir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dir.h; sourceTree = "<group>"; };
EE486FCC0D3E3EA900AB4CC6 /* dir_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dir_unix.cpp; sourceTree = "<group>"; };
EE486FCD0D3E3EA900AB4CC6 /* dir_win32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dir_win32.cpp; sourceTree = "<group>"; };
EE486FCF0D3E3EA900AB4CC6 /* gcominit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gcominit.h; sourceTree = "<group>"; };
EE486FD00D3E3EA900AB4CC6 /* gdialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gdialog.cpp; sourceTree = "<group>"; };
EE486FD10D3E3EA900AB4CC6 /* gdialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdialog.h; sourceTree = "<group>"; };
EE486FD30D3E3EA900AB4CC6 /* glink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glink.h; sourceTree = "<group>"; };
EE486FD40D3E3EA900AB4CC6 /* gpage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gpage.cpp; sourceTree = "<group>"; };
EE486FD50D3E3EA900AB4CC6 /* gpage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gpage.h; sourceTree = "<group>"; };
EE486FD60D3E3EA900AB4CC6 /* guimain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = guimain.cpp; sourceTree = "<group>"; };
EE486FD70D3E3EA900AB4CC6 /* gunpack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gunpack.cpp; sourceTree = "<group>"; };
EE486FD80D3E3EA900AB4CC6 /* gunpack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gunpack.h; sourceTree = "<group>"; };
EE486FDA0D3E3EA900AB4CC6 /* installer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = installer.cpp; sourceTree = "<group>"; };
EE486FDB0D3E3EA900AB4CC6 /* installer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = installer.h; sourceTree = "<group>"; };
EE486FDC0D3E3EA900AB4CC6 /* legal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = legal.cpp; sourceTree = "<group>"; };
EE486FDD0D3E3EA900AB4CC6 /* legal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = legal.h; sourceTree = "<group>"; };
EE486FE00D3E3EA900AB4CC6 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
EE486FE10D3E3EA900AB4CC6 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; };
EE486FE20D3E3EA900AB4CC6 /* mingw.mak */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = mingw.mak; sourceTree = "<group>"; };
EE486FE30D3E3EA900AB4CC6 /* mock */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mock; sourceTree = "<group>"; };
EE486FE40D3E3EA900AB4CC6 /* pack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pack.cpp; sourceTree = "<group>"; };
EE486FE50D3E3EA900AB4CC6 /* pages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pages.cpp; sourceTree = "<group>"; };
EE486FE60D3E3EA900AB4CC6 /* pages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pages.h; sourceTree = "<group>"; };
EE486FE70D3E3EA900AB4CC6 /* qt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qt.h; sourceTree = "<group>"; };
EE486FE80D3E3EA900AB4CC6 /* run.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = run.c; sourceTree = "<group>"; };
EE486FE90D3E3EA900AB4CC6 /* service_install.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = service_install.cpp; sourceTree = "<group>"; };
EE486FEA0D3E3EA900AB4CC6 /* service_install.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = service_install.h; sourceTree = "<group>"; };
EE486FEB0D3E3EA900AB4CC6 /* service_wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = service_wrapper.cpp; sourceTree = "<group>"; };
EE486FEC0D3E3EA900AB4CC6 /* unpack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unpack.c; sourceTree = "<group>"; };
EE486FED0D3E3EA900AB4CC6 /* unpack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unpack.h; sourceTree = "<group>"; };
EE4870530D3E529100AB4CC6 /* moc_gdialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_gdialog.cpp; path = src/gui/moc_gdialog.cpp; sourceTree = "<group>"; };
EE4870540D3E529100AB4CC6 /* moc_gpage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_gpage.cpp; path = src/gui/moc_gpage.cpp; sourceTree = "<group>"; };
EE4870550D3E529100AB4CC6 /* moc_pages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_pages.cpp; path = src/gui/moc_pages.cpp; sourceTree = "<group>"; };
EEC342BF0D50E0BD00DD9918 /* boot_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = boot_mac.cpp; sourceTree = "<group>"; };
EEC342C00D50E0BD00DD9918 /* dir_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dir_mac.cpp; sourceTree = "<group>"; };
EEC342C30D50E0D800DD9918 /* glink_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = glink_mac.cpp; sourceTree = "<group>"; };
EEC342C40D50E0D800DD9918 /* guistart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = guistart.cpp; sourceTree = "<group>"; };
EEC342C50D50E0D800DD9918 /* state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = state.cpp; sourceTree = "<group>"; };
EEC342CB0D50E1D500DD9918 /* state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = state.h; sourceTree = "<group>"; };
EEC342DF0D50F62E00DD9918 /* emailrelay-start-gui */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "emailrelay-start-gui"; sourceTree = BUILT_PRODUCTS_DIR; };
EEC342ED0D50F6B600DD9918 /* emailrelay-unpack */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "emailrelay-unpack"; sourceTree = BUILT_PRODUCTS_DIR; };
EEC342F90D50F72800DD9918 /* unpackmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unpackmain.c; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8DD76F660486A84900D96B5E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
EEC342DD0D50F62E00DD9918 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
EEC342EB0D50F6B600DD9918 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* emailrelay-gui */ = {
isa = PBXGroup;
children = (
EE4870510D3E517800AB4CC6 /* moc */,
EE486FC70D3E3EA900AB4CC6 /* gui */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
name = "emailrelay-gui";
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8DD76F6C0486A84900D96B5E /* emailrelay-gui */,
EEC342DF0D50F62E00DD9918 /* emailrelay-start-gui */,
EEC342ED0D50F6B600DD9918 /* emailrelay-unpack */,
);
name = Products;
sourceTree = "<group>";
};
EE486FC70D3E3EA900AB4CC6 /* gui */ = {
isa = PBXGroup;
children = (
EEC342F90D50F72800DD9918 /* unpackmain.c */,
EEC342CB0D50E1D500DD9918 /* state.h */,
EEC342C30D50E0D800DD9918 /* glink_mac.cpp */,
EEC342C40D50E0D800DD9918 /* guistart.cpp */,
EEC342C50D50E0D800DD9918 /* state.cpp */,
EEC342BF0D50E0BD00DD9918 /* boot_mac.cpp */,
EEC342C00D50E0BD00DD9918 /* dir_mac.cpp */,
EE486FC90D3E3EA900AB4CC6 /* boot.h */,
EE486FCA0D3E3EA900AB4CC6 /* dir.cpp */,
EE486FCB0D3E3EA900AB4CC6 /* dir.h */,
EE486FCC0D3E3EA900AB4CC6 /* dir_unix.cpp */,
EE486FCD0D3E3EA900AB4CC6 /* dir_win32.cpp */,
EE486FCF0D3E3EA900AB4CC6 /* gcominit.h */,
EE486FD00D3E3EA900AB4CC6 /* gdialog.cpp */,
EE486FD10D3E3EA900AB4CC6 /* gdialog.h */,
EE486FD30D3E3EA900AB4CC6 /* glink.h */,
EE486FD40D3E3EA900AB4CC6 /* gpage.cpp */,
EE486FD50D3E3EA900AB4CC6 /* gpage.h */,
EE486FD60D3E3EA900AB4CC6 /* guimain.cpp */,
EE486FD70D3E3EA900AB4CC6 /* gunpack.cpp */,
EE486FD80D3E3EA900AB4CC6 /* gunpack.h */,
EE486FDA0D3E3EA900AB4CC6 /* installer.cpp */,
EE486FDB0D3E3EA900AB4CC6 /* installer.h */,
EE486FDC0D3E3EA900AB4CC6 /* legal.cpp */,
EE486FDD0D3E3EA900AB4CC6 /* legal.h */,
EE486FE00D3E3EA900AB4CC6 /* Makefile.am */,
EE486FE10D3E3EA900AB4CC6 /* Makefile.in */,
EE486FE20D3E3EA900AB4CC6 /* mingw.mak */,
EE486FE30D3E3EA900AB4CC6 /* mock */,
EE486FE40D3E3EA900AB4CC6 /* pack.cpp */,
EE486FE50D3E3EA900AB4CC6 /* pages.cpp */,
EE486FE60D3E3EA900AB4CC6 /* pages.h */,
EE486FE70D3E3EA900AB4CC6 /* qt.h */,
EE486FE80D3E3EA900AB4CC6 /* run.c */,
EE486FE90D3E3EA900AB4CC6 /* service_install.cpp */,
EE486FEA0D3E3EA900AB4CC6 /* service_install.h */,
EE486FEB0D3E3EA900AB4CC6 /* service_wrapper.cpp */,
EE486FEC0D3E3EA900AB4CC6 /* unpack.c */,
EE486FED0D3E3EA900AB4CC6 /* unpack.h */,
);
name = gui;
path = src/gui;
sourceTree = "<group>";
};
EE4870510D3E517800AB4CC6 /* moc */ = {
isa = PBXGroup;
children = (
EE4870530D3E529100AB4CC6 /* moc_gdialog.cpp */,
EE4870540D3E529100AB4CC6 /* moc_gpage.cpp */,
EE4870550D3E529100AB4CC6 /* moc_pages.cpp */,
);
name = moc;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8DD76F620486A84900D96B5E /* emailrelay-gui */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "emailrelay-gui" */;
buildPhases = (
EE4870490D3E4B8200AB4CC6 /* ShellScript */,
8DD76F640486A84900D96B5E /* Sources */,
8DD76F660486A84900D96B5E /* Frameworks */,
8DD76F690486A84900D96B5E /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = "emailrelay-gui";
productInstallPath = "$(HOME)/bin";
productName = "emailrelay-gui";
productReference = 8DD76F6C0486A84900D96B5E /* emailrelay-gui */;
productType = "com.apple.product-type.tool";
};
EEC342DE0D50F62E00DD9918 /* emailrelay-start-gui */ = {
isa = PBXNativeTarget;
buildConfigurationList = EEC342E30D50F64F00DD9918 /* Build configuration list for PBXNativeTarget "emailrelay-start-gui" */;
buildPhases = (
EEC342DC0D50F62E00DD9918 /* Sources */,
EEC342DD0D50F62E00DD9918 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "emailrelay-start-gui";
productName = "emailrelay-start";
productReference = EEC342DF0D50F62E00DD9918 /* emailrelay-start-gui */;
productType = "com.apple.product-type.tool";
};
EEC342EC0D50F6B600DD9918 /* emailrelay-unpack */ = {
isa = PBXNativeTarget;
buildConfigurationList = EEC342F60D50F6D600DD9918 /* Build configuration list for PBXNativeTarget "emailrelay-unpack" */;
buildPhases = (
EEC342EA0D50F6B600DD9918 /* Sources */,
EEC342EB0D50F6B600DD9918 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "emailrelay-unpack";
productName = "emailrelay-unpack";
productReference = EEC342ED0D50F6B600DD9918 /* emailrelay-unpack */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "emailrelay-gui" */;
compatibilityVersion = "Xcode 3.0";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* emailrelay-gui */;
projectDirPath = "";
projectRoot = "";
targets = (
8DD76F620486A84900D96B5E /* emailrelay-gui */,
EEC342DE0D50F62E00DD9918 /* emailrelay-start-gui */,
EEC342EC0D50F6B600DD9918 /* emailrelay-unpack */,
EE99190B0D9193D100FB06D5 /* all-targets */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
EE4870490D3E4B8200AB4CC6 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/src/gui/gpage.h",
"$(SRCROOT)/src/gui/gdialog.h",
"$(SRCROOT)/src/gui/pages.h",
);
outputPaths = (
"$(SRCROOT)/src/gui/moc_gpage.cpp",
"$(SRCROOT)/src/gui/moc_gdialog.cpp",
"$(SRCROOT)/src/gui/moc_pages.cpp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\ni=0\nwhile test $i -lt $SCRIPT_INPUT_FILE_COUNT\ndo\n\tinput=\"`eval echo '$'SCRIPT_INPUT_FILE_$i`\"\n\toutput=\"`eval echo '$'SCRIPT_OUTPUT_FILE_$i`\"\n\techo moc -o$output $input\n\tmoc -o$output $input\n\ti=`expr $i + 1`\ndone";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8DD76F640486A84900D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EE486FEF0D3E3EA900AB4CC6 /* dir.cpp in Sources */,
EE486FF20D3E3EA900AB4CC6 /* gdialog.cpp in Sources */,
EE486FF40D3E3EA900AB4CC6 /* gpage.cpp in Sources */,
EE486FF50D3E3EA900AB4CC6 /* guimain.cpp in Sources */,
EE486FF60D3E3EA900AB4CC6 /* gunpack.cpp in Sources */,
EE486FF70D3E3EA900AB4CC6 /* installer.cpp in Sources */,
EE486FF80D3E3EA900AB4CC6 /* legal.cpp in Sources */,
EE486FFC0D3E3EA900AB4CC6 /* pages.cpp in Sources */,
EE4870560D3E529100AB4CC6 /* moc_gdialog.cpp in Sources */,
EE4870570D3E529100AB4CC6 /* moc_gpage.cpp in Sources */,
EE4870580D3E529100AB4CC6 /* moc_pages.cpp in Sources */,
EEC342C10D50E0BD00DD9918 /* boot_mac.cpp in Sources */,
EEC342C20D50E0BD00DD9918 /* dir_mac.cpp in Sources */,
EEC342C60D50E0D800DD9918 /* glink_mac.cpp in Sources */,
EEC342C80D50E0D800DD9918 /* state.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EEC342DC0D50F62E00DD9918 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EEC342E80D50F68600DD9918 /* guistart.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EEC342EA0D50F6B600DD9918 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EEC342FA0D50F72800DD9918 /* unpackmain.c in Sources */,
EEC342FC0D50F73900DD9918 /* unpack.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
EE99190F0D9193DC00FB06D5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DD76F620486A84900D96B5E /* emailrelay-gui */;
targetProxy = EE99190E0D9193DC00FB06D5 /* PBXContainerItemProxy */;
};
EE9919110D9193DC00FB06D5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EEC342DE0D50F62E00DD9918 /* emailrelay-start-gui */;
targetProxy = EE9919100D9193DC00FB06D5 /* PBXContainerItemProxy */;
};
EE9919130D9193DC00FB06D5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EEC342EC0D50F6B600DD9918 /* emailrelay-unpack */;
targetProxy = EE9919120D9193DC00FB06D5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB923208733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"_GLIBCXX_DEBUG=1",
"_GLIBCXX_DEBUG_PEDANTIC=1",
"G_UNIX=1",
"_DEBUG=1",
);
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = "emailrelay-gui";
ZERO_LINK = YES;
};
name = Debug;
};
1DEB923308733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_MODEL_TUNING = G5;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = "emailrelay-gui";
};
name = Release;
};
1DEB923608733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PREPROCESSOR_DEFINITIONS = (
"_DEBUG=1",
"G_UNIX=1",
);
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
src/main,
src/glib,
);
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-lglib",
"-framework",
QtGui,
"-framework",
Carbon,
"-framework",
QtCore,
"-lz",
);
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Debug;
};
1DEB923708733DC60010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ADDITIONAL_SDKS = "";
ARCHS = (
i386,
ppc,
);
GCC_ENABLE_OBJC_EXCEPTIONS = NO;
GCC_FAST_OBJC_DISPATCH = NO;
GCC_PREPROCESSOR_DEFINITIONS = "G_UNIX=1";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
src/main,
src/glib,
);
OTHER_LDFLAGS = (
"-lglib",
"-framework",
QtGui,
"-framework",
Carbon,
"-framework",
QtCore,
"-lz",
);
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Release;
};
EE99190C0D9193D200FB06D5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = "all-targets";
};
name = Debug;
};
EE99190D0D9193D200FB06D5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = "all-targets";
ZERO_LINK = NO;
};
name = Release;
};
EEC342E10D50F63100DD9918 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/bin;
PREBINDING = NO;
PRODUCT_NAME = "emailrelay-start-gui";
ZERO_LINK = YES;
};
name = Debug;
};
EEC342E20D50F63100DD9918 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/bin;
PREBINDING = NO;
PRODUCT_NAME = "emailrelay-start-gui";
ZERO_LINK = NO;
};
name = Release;
};
EEC342EF0D50F6B800DD9918 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/bin;
PREBINDING = NO;
PRODUCT_NAME = "emailrelay-unpack";
ZERO_LINK = YES;
};
name = Debug;
};
EEC342F00D50F6B800DD9918 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/bin;
PREBINDING = NO;
PRODUCT_NAME = "emailrelay-unpack";
ZERO_LINK = NO;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "emailrelay-gui" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923208733DC60010E9CD /* Debug */,
1DEB923308733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "emailrelay-gui" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB923608733DC60010E9CD /* Debug */,
1DEB923708733DC60010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EE9919150D91940100FB06D5 /* Build configuration list for PBXAggregateTarget "all-targets" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EE99190C0D9193D200FB06D5 /* Debug */,
EE99190D0D9193D200FB06D5 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EEC342E30D50F64F00DD9918 /* Build configuration list for PBXNativeTarget "emailrelay-start-gui" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EEC342E10D50F63100DD9918 /* Debug */,
EEC342E20D50F63100DD9918 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EEC342F60D50F6D600DD9918 /* Build configuration list for PBXNativeTarget "emailrelay-unpack" */ = {
isa = XCConfigurationList;
buildConfigurations = (
EEC342EF0D50F6B800DD9918 /* Debug */,
EEC342F00D50F6B800DD9918 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}

View File

@ -1,11 +1,11 @@
Summary: Simple e-mail message transfer agent and proxy using SMTP
Name: emailrelay
Version: 1.7
Version: 1.8
Release: 1
License: GPL3
Group: System Environment/Daemons
URL: http://emailrelay.sourceforge.net/
Source: http://sourceforge.net/sourceforge/emailrelay/emailrelay-1.7-src.tar.gz
Source: http://sourceforge.net/sourceforge/emailrelay/emailrelay-1.8-src.tar.gz
BuildRoot: /tmp/emailrelay-install
%description
@ -86,6 +86,7 @@ test "$RPM_BUILD_ROOT" = "/" || rm -rf "$RPM_BUILD_ROOT"
/usr/lib/emailrelay/examples/emailrelay-resubmit.sh
/usr/lib/emailrelay/examples/emailrelay-notify.sh
/usr/lib/emailrelay/examples/emailrelay-submit.sh
/usr/lib/emailrelay/examples/emailrelay-multicast.sh
/usr/lib/emailrelay/emailrelay-poke
/usr/lib/emailrelay/emailrelay-filter-copy
/usr/sbin/emailrelay-submit

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -14,7 +14,11 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = emailrelay.conf.template
e_sysconf_DATA = emailrelay.conf.template
install-data-hook:
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cat "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" | sed "s:^#spool-dir /var/spool/emailrelay:spool-dir $(DESTDIR)$(e_spooldir):g" | sed 's:"/var/spool/emailrelay":"'"$(e_spooldir)"'":g' | sed "s:/etc:$(e_sysconfdir):g" | sed "s:/usr/local/bin:$(e_libexecdir):g" > "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,6 +14,9 @@
@SET_MAKE@
#
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -76,6 +79,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -85,7 +89,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -109,7 +112,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -164,9 +166,6 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
#
EXTRA_DIST = emailrelay.conf.template
e_sysconf_DATA = emailrelay.conf.template
all: all-am
@ -352,8 +351,9 @@ uninstall-am: uninstall-e_sysconfDATA
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-e_sysconfDATA
install-data-hook:
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cat "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" | sed "s:^#spool-dir /var/spool/emailrelay:spool-dir $(DESTDIR)$(e_spooldir):g" | sed 's:"/var/spool/emailrelay":"'"$(e_spooldir)"'":g' | sed "s:/etc:$(e_sysconfdir):g" | sed "s:/usr/local/bin:$(e_libexecdir):g" > "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -32,8 +32,8 @@
# Format: interface <ip-address>
# Description: Specifies an interface to listen on. The default is to listen
# on all interfaces (INADDR_ANY). Using a specific interface can make it harder
# for clients on other sub-networks to connect, so improving security. Up to
# three interface addresses can be specified using comma separators.
# for clients on other sub-networks to connect, so improving security. Multiple
# interface addresses can be specified using comma separators.
#
#interface 192.168.0.10
@ -67,6 +67,12 @@
#
#client-auth /etc/emailrelay.auth
# Name: client-tls
# Format: client-tls
# Description: Enables the tls/ssl layer when acting as an smtp client.
#
#client-tls
# Name: connection-timeout
# Format: connection-timeout <time>
# Description: Sets the timeout (in seconds) when connecting to a remote server. The default is 40.
@ -117,7 +123,8 @@
# Name: poll
# Format: poll <period>
# Description: Enables polling of the spool directory for new messages with the
# specified period (in seconds). Requires --forward-to.
# specified period (in seconds). A value of zero means that forwarding is done
# once the submitting client disconnects. Requires --forward-to.
#
#poll 120

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -14,4 +14,5 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = xar
EXTRA_DIST =
SUBDIRS = mips

480
extra/Makefile.in Normal file
View File

@ -0,0 +1,480 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = extra
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILER_VERSION = @COMPILER_VERSION@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
HAVE_MAN2HTML = @HAVE_MAN2HTML@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
#
EXTRA_DIST =
SUBDIRS = mips
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu extra/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu extra/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic ctags \
ctags-recursive distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

17
extra/mips/Makefile.am Normal file
View File

@ -0,0 +1,17 @@
#
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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 3 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, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = toolchain.mak configure-mips.sh_

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -29,8 +29,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = lib/sunpro5
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
subdir = extra/mips
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@ -66,6 +66,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -75,7 +76,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -99,7 +99,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -157,7 +156,7 @@ top_srcdir = @top_srcdir@
#
#
EXTRA_DIST = xar
EXTRA_DIST = toolchain.mak configure-mips.sh_
all: all-am
.SUFFIXES:
@ -170,9 +169,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/sunpro5/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu extra/mips/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/sunpro5/Makefile
$(AUTOMAKE) --gnu extra/mips/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

24
extra/mips/README Normal file
View File

@ -0,0 +1,24 @@
E-MailRelay MIPS
================
To help with running E-MailRelay on MIPS-based routers, such as the Buffalo
WHR-G54S, a makefile for building a cross-compiler toolchain is provided as
"extra/mips/toolchain.mak".
The shell script "extra/mips/configure-mips.sh" can be used to run the main
E-MailRelay "configure" script with all the size optimisations suitable for an
embedded target system.
These build-time size optimisations yield the following approximate savings for
the main executable:
* "--disable-exec" 184k
* "--enable-small-config" 121k
* "--disable-pop" 121k
* "--disable-auth" 109k
* "--disable-debug" 67k
* "--disable-admin" 63k
* "--enable-small-exceptions" 46k
* "--enable-small-fragments" 32k
* "--disable-proxy" 30k
* "--disable-dns" 26k
* "--disable-verbose" 15k

View File

@ -0,0 +1,185 @@
#!/bin/sh
#
# Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# configure-mips.sh
#
# Runs the emailrelay "configure" script for a size-optimised mips build
# using uclibc.
#
# The toolchain is expected to have been built by "extra/mips/toolchain.mak".
#
# Note that in order to minimise the size of the executable a lot of
# functionality is disabled using "--disable-whatever" switches,
# and the emailrelay command-line usage is altered.
#
# usage:
# configure-mips.sh [-n] [-d <toolchain-root>] [{enable|disable} ...]
# configure-mips.sh [-a|-x]
#
# eg:
#
# build the toolchain...
# $ cd ~/emailrelay-1.8/extra/mips
# $ vi toolchain.mak
# $ make -f toolchain.mak
#
# build emailrelay...
# $ mkdir -p ~/emailrelay-1.8/mips
# $ cd ~/emailrelay-1.8/mips
# $ ../extra/mips/configure-mips.sh
# $ make
#
# install...
# $ ../extra/mips/binutils/bin/mipsel-elf-linux-gnu-strip src/main/emailrelay
# $ cp src/main/emailrelay ...
# $ cp ../extra/mips/uclibc/lib/libuClibc-0.9.27.so ...
# $ cp ../extra/mips/uclibc/usr/uClibc++/lib/libuClibc++-0.2.2.so ...
#
# Consider static linking if no other c++ programs are used
# ("configure --enable-static-linking" may work), but note that
# some parts of the c runtime library seem to require dynamic
# linking; "configure --disable-dns --disable-identity" may
# help with this.
#
# For a smaller c++ runtime library take a look at the script
# "uClibc*/extra/libstrip/libstrip".
#
# Edit the dynamic-linker switch below to match the target environment.
#
# configure the ld.so path on the target system
UCLIBC="/lib/ld-uClibc.so.0"
# parse the command line switches
if test "$1" = "-a" -o "$1" = "-x" -o "$1" = "-n" -o "$1" = "-z" ; then sw="$1" ; shift ; fi
# get the absolute path of the toolchain directory
TOOLCHAIN="`dirname $0`"
if test "$1" = "-d" ; then shift ; TOOLCHAIN="$1" ; shift ; fi
if test ! -d "${TOOLCHAIN}/gcc" -a -d "${HOME}/cross/gcc" ; then TOOLCHAIN="${HOME}/cross" ; fi
TOOLCHAIN="`cd $TOOLCHAIN && pwd`"
echo `basename $0`: toolchain root: $TOOLCHAIN
if test "$sw" = "" -o "$sw" = "-n"
then
# prepare enable/disable switches
debug=${1-disable}
exec=${2-disable}
auth=${3-disable}
admin=${4-disable}
identity=${5-disable}
pop=${6-disable}
dns=${7-disable}
if test "$8" = "enable" ; then a8="disable" ; else a8="enable" ; fi
if test "$9" = "enable" ; then a9="disable" ; else a9="enable" ; fi
if test "$10" = "enable" ; then a10="disable" ; else a10="enable" ; fi
verbose=${11-disable}
proxy=${12-disable}
small_config=${a8}
small_exceptions=${a9}
small_fragments=${a10}
args="--$debug-debug --$exec-exec --$auth-auth --$admin-admin --$identity-identity --$pop-pop --$dns-dns"
args="$args --$a8-small-config --$a9-small-exceptions --$a10-small-fragments --$verbose-verbose --$proxy-proxy"
# prepare the configure command-line parts
cxx="$TOOLCHAIN/uclibc/usr/uClibc++/bin/g++-uc"
cc="$TOOLCHAIN/gcc/2/bin/gcc-mips"
cppflags="-I$TOOLCHAIN/uclibc/usr/uClibc++/include"
cxxflags="-Os"
ldflags="-L$TOOLCHAIN/uclibc/usr/uClibc++/lib -Xlinker --dynamic-linker=$UCLIBC -Xlinker -Map -Xlinker /tmp/map"
cfg="../configure"
args_="--host=mipsel-elf-linux-gnu --enable-fhs --disable-gui --without-glob --without-openssl"
args_="$args_ --without-doxygen --without-man2html"
# run "configure"
if test "$sw" = ""
then
CXX="$cxx" CC="$cc" CPPFLAGS="$cppflags" CXXFLAGS="$cxxflags" LDFLAGS="$ldflags" $cfg $args_ $args
else
echo -n CXX=\"$cxx\" CC=\"$cc\" CPPFLAGS=\"$cppflags\" CXXFLAGS=\"$cxxflags\" LDFLAGS=\"$ldflags\" " "
echo $cfg $args_ $args
fi
exit
fi
# extra stuff for testing ...
Args()
{
for i_ in 1 2 3 4 5 6 7 8 9 10 11 12
do
if test $1 -ge $i_ ; then echo -n "enable " ; else echo -n "disable " ; fi
done
echo ''
}
if test "$sw" = "-a"
then
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12
do
echo `dirname $0`/configure-mips.sh '"$@"' `Args $i` > configure-$i.sh
chmod +x configure-$i.sh
done
exit
fi
Make()
{
make distclean
rm -f src/main/emailrelay
./configure-$1.sh
grep '#' config.h | sed 's/^/:: /'
grep 'echo.*running.*configure' config.status | sed 's/^/++ /'
make -j 4
$TOOLCHAIN/binutils/bin/mipsel-elf-linux-gnu-strip src/main/emailrelay
ls -l src/main/emailrelay | sed 's/^/** /'
mv src/main/emailrelay emailrelay-$1
( cd src/main && make emailrelay && cp /tmp/map ../../map-$1 )
}
if test "$sw" = "-x"
then
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12
do
Make $i > make-$i.out 2>&1
done
fi
if test "$sw" = "-z"
then
perl -e '
my %size = () ;
for $i ( qw/00 01 02 03 04 05 06 07 08 09 10 11 12/ )
{
my @part = split( /\s+/ , `ls -l emailrelay-$i` ) ;
$size{$i} = $part[4] ;
}
my @vv = qw/disable-debug disable-exec disable-auth disable-admin disable-identity disable-pop disable-dns enable-small-config enable-small-exceptions enable-small-fragments disable-verbose disable-proxy/ ;
my $previous ;
for $i ( sort keys %size )
{
my $n = $size{$i} ;
my $k = ( $n - $previous + 500 ) / 1000 ;
my $v = $vv[$i-1] ;
print "* \"--$v\" " , int($k) ,"k\n" if defined($previous) ;
$previous = $n ;
}'
fi

687
extra/mips/toolchain.mak Normal file
View File

@ -0,0 +1,687 @@
#
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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 3 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, see <http://www.gnu.org/licenses/>.
#
#
# Makefile / toolchain.mak
#
# A makefile for building a cross-compiling toolchain for little-endian
# mips ("mipsel") using:
#
# * gcc 3.4.6
# * linux 2.4.20
# * uclibc 0.9.27
# * uclibc++ 0.2.2
# * binutils 2.18-ubuntu
#
# These versions of linux and uclibc correspond to those pre-installed
# on the Buffalo WHR-G54S router as of late 2007. The version of gcc
# is 3.4.6 rather than 3.3.3 because of compiler bugs in the c++
# code generation.
#
# Usage: make -f toolchain.mak
#
# Note that, unlike other toolchain build scripts, the required source
# packages (linux, uclibc, etc) are not downloaded automatically, so
# the following package tarballs must be made available under the
# 'tar-dir' directory (see below):
#
# * uClibc-0.9.27.tar.bz2
# * uClibc++-0.2.2.tar.bz2
# * linux-2.4.20.tar.gz
# * binutils_2.18.orig.tar.gz
# * gcc-3.4.6.tar.bz2
# * gcc-core-3.4.6.tar.bz2
# * gcc-g++-3.4.6.tar.bz2
#
# Uses perl with the MIME::Base64 package to prepare patch files.
#
# The final cross-compiler ends up in "gcc/2/bin", with a gcc wrapper
# script for using uclibc++ in "uclibc/usr/uClibc++/bin".
#
# In addition to the cross-compiler there are various bits and bobs
# which are built to run on the target machine:
# * uclibc utilities in "uclibc/*/utils"
# * binutils under "binutils/build-for-target"
# * simple hello-world test programs in the cwd
#
# This makefile works by defining the following top-level build tasks:
# 1. binutils
# 2. linux headers -- simple untar and make config
# 3. gcc, pass 1 -- C only, no run-time library
# 4. uclibc -- built using gcc-1
# 5. gcc, pass 2 -- includes C++ language, refers to uclibc, builds stdlibc++-v3
# 6. uclibc++ -- built using gcc-2
# 7. test programs
#
# Top-level directories roughly correspond to the top-level build tasks:
# * gcc
# + gcc/gcc-x.x.x -- gcc source tree
# + gcc/build-1 -- gcc-1 build tree
# + gcc/1 -- gcc-1 install root
# + gcc/build-2 -- gcc-2 build tree
# + gcc/2 -- gcc-2 install root
# * uclibc -- uclibc/uclibc++ install root
# + uclibc/uClibc-x.x.x -- uclibc source and build tree
# + uclibc/uClibc++-x.x.x -- uclibc++ source and build tree
# * linux
# + linux/linux-x.x.x -- linux source tree
# * binutils -- binutils install root
# + binutils/binutils-x.x -- binutils source tree
# + binutils/build -- binutils build tree
#
# When a top-level build task completes a "done" file is created in an
# appropriate sub-directory. This "done" file is used for makefile
# dependencies between the top-level tasks, so "touch"-ing a "done"
# file can be used to trigger rebuilding of selected top-level
# build tasks.
#
# A key feature for this build system is that whole directory trees
# can be deleted in order to get them and their dependents to rebuild:
# if source trees are deleted they will get restored from the tar file,
# if build trees are deleted they will get rebuilt from source, if
# install trees are deleted they will get reinstalled, etc.
#
# Deleting directory trees is the preferred way to trigger rebuilds,
# but there are also a set of pseudo-targets defined to help with
# debugging this makefile.
#
# Note that "make clean" does not clean the binutils build. This
# is because the binutils build is only dependent on native tools
# so it tends to be very stable in comparison to the rest of the
# toolchain. A "make vclean" can be used to clean up everything,
# leaving (roughly speaking) only this makefile.
#
# Bzipped source tar files for the various packages must be made
# available in the directories configured below...
#
#####
# configure these...
tar_dir = /usr/share/data/packages
binutils_tar_dir = $(tar_dir)/development/binutils
gcc_tar_dir = $(tar_dir)/development/gcc
uclibc_tar_dir = $(tar_dir)/development/uclibc
linux_tar_dir = $(tar_dir)/linux
#####
# define TEE=|tee for more verbosity, but note that the pipe messes up the exit codes
TEE:=>
TEEE:=2>&1
# gnu sed, or a wrapper that supports --in-place
SED=sed
mk_root = $(shell pwd)
gcc_configure_1 = --program-suffix=-mips --with-gnu-as --with-gnu-ld --with-abi=32
gcc_configure_2 = --target=mipsel-elf-linux-gnu
gcc_configure_3 = --with-as=$(mk_root)/binutils/mipsel-elf-linux-gnu/bin/as
gcc_configure_4 = --with-ld=$(mk_root)/binutils/mipsel-elf-linux-gnu/bin/ld
gcc_configure = $(gcc_configure_1) $(gcc_configure_2) $(gcc_configure_3) $(gcc_configure_4)
gcc_1_configure = $(gcc_configure) --disable-threads --enable-languages=c --without-headers --with-newlib
gcc_2_configure = $(gcc_configure) --enable-languages=c,c++ --enable-sjlj-exceptions --enable-threads=posix --with-sysroot=$(mk_root)/uclibc
gcc_files = gcc/gcc-3.4.6/README
gcc_diff = gcc-3.4.6.diff
gcc_patch = gcc/gcc-3.4.6/.gcc_patch.done
gcc_1_config = gcc/build-1/Makefile
gcc_1_make = gcc/build-1/.gcc_1_make.done
gcc_1_install = gcc/1/.gcc_1_install.done
gcc_2_config = gcc/build-2/Makefile
gcc_2_make = gcc/build-2/.gcc_2_make.done
gcc_2_install = gcc/2/.gcc_2_install.done
binutils_files = binutils/binutils-2.18/README
binutils_config = binutils/build/Makefile
binutils_make = binutils/build/.binutils_make.done
binutils_install = binutils/.binutils_install.done
binutils_for_target_config = binutils/build-for-target/Makefile
binutils_for_target_make = binutils/build-for-target/.binutils_for_target_make.done
linux_files = linux/linux-2.4.20/README
linux_config = linux/linux-2.4.20/.config
uclibc_files = uclibc/uClibc-0.9.27/README
uclibc_config = uclibc/uClibc-0.9.27/.config
uclibc_patch = uclibc/uClibc-0.9.27/.uclibc_patch.done
uclibc_make = uclibc/uClibc-0.9.27/.uclibc_make.done
uclibc_install = uclibc/.uclibc_install.done
uclibc_for_target = uclibc/uClibc-0.9.27/utils/.uclibc_for_target.done
uclibcpp_files = uclibc/uClibc++-0.2.2/README
uclibcpp_patch = uclibc/uClibc++-0.2.2/.uclibcpp_patch.done
uclibcpp_config = uclibc/uClibc++-0.2.2/.config
uclibcpp_make = uclibc/uClibc++-0.2.2/.uclibcpp_make.done
uclibcpp_install = uclibc/.uclibcpp_install.done
test_c_for_target = test-c
test_cpp_for_target = test-c++
test_cpp_for_target_static = test-c++-s
test_cpp_for_target_uclibcpp = test-c++-u
tests = $(test_c_for_target) $(test_cpp_for_target) $(test_cpp_for_target_static) $(test_cpp_for_target_uclibcpp)
.PHONY: all
all: $(uclibc_for_target) $(binutils_for_target_make) $(tests) $(uclibcpp_install) configure-mips.sh
# ==
$(linux_files):
@echo
@echo ++ untaring linux
@mkdir linux 2>/dev/null || true
tar -C linux -xzf $(linux_tar_dir)/linux-2.4.20.tar.gz
@rm -f $(linux_config) 2>/dev/null || true
@touch $(linux_files)
$(linux_config): $(linux_files)
@echo
@echo ++ configuring linux
@cd linux/linux-2.4.20 && make oldconfig ARCH=mips $(TEE) ../../linux_config.out $(TEEE)
# ==
$(binutils_files):
@echo
@echo ++ untaring binutils
@mkdir binutils 2>/dev/null || true
tar -C binutils -xzf $(binutils_tar_dir)/binutils_2.18.orig.tar.gz
-zcat $(binutils_tar_dir)/binutils_2.18-0ubuntu3.diff.gz | ( cd binutils/binutils-2.18 && patch -p1 -s )
@rm -f $(binutils_config) 2>/dev/null || true
@touch $(binutils_files)
$(binutils_config): $(binutils_files)
@echo
@echo ++ configuring binutils
@if test -d binutils/build ; then : ; else mkdir binutils/build ; fi
@cd binutils/build && ../binutils-2.18/configure --prefix=`dirname \`pwd\`` --target=mipsel-elf-linux-gnu $(TEE) ../../binutils_config.out $(TEEE)
$(binutils_make): $(binutils_config)
@echo
@echo ++ building binutils
@cd binutils/build && make $(TEE) ../../binutils_make.out $(TEEE)
@touch $(binutils_make)
$(binutils_install): $(binutils_make)
@echo
@echo ++ installing binutils
@cd binutils/build && make install $(TEE) ../../binutils_install.out $(TEEE)
@touch $(binutils_install)
$(binutils_for_target_make): $(binutils_make) $(gcc_2_install) $(binutils_for_target_config)
@echo
@echo ++ building binutils for target
@cd binutils/build-for-target && PATH="`dirname \`pwd\``/bin:$$PATH" CC=`dirname \`pwd\``/../gcc/2/bin/gcc-mips make LDFLAGS="-Xlinker --dynamic-linker=/lib/ld-uClibc.so.0" $(TEE) ../../binutils_for_target_make.out $(TEEE)
@touch $(binutils_for_target_make)
$(binutils_for_target_config):
@echo
@echo ++ configuring binutils for target
@if test -d binutils/build-for-target ; then : ; else mkdir binutils/build-for-target ; fi
@cd binutils/build-for-target && PATH="`dirname \`pwd\``/bin:$$PATH" CC=`dirname \`pwd\``/../gcc/2/bin/gcc-mips ../binutils-2.18/configure --with-build-time-tools=`dirname \`pwd\``/bin --with-build-sysroot=`dirname \`pwd\``/../uclibc --target=mipsel-elf-linux-gnu --host=mipsel-elf-linux-gnu $(TEE) ../../binutils_for_target_config.out $(TEEE)
@$(SED) -e 's/^CFLAGS_FOR_BUILD *=.*/CFLAGS_FOR_BUILD = /' --in-place binutils/build-for-target/Makefile
# ==
$(uclibc_files):
@echo
@echo ++ untaring uclibc
@mkdir uclibc 2>/dev/null || true
tar -C uclibc -xjf $(uclibc_tar_dir)/uClibc-0.9.27.tar.bz2
@touch $(uclibc_files)
$(uclibc_config): $(uclibc_files) $(linux_config) $(gcc_1_install)
@echo
@echo ++ configuring uclibc
@$(SED) -e 's/\( *\)default TARGET_i386/\1default TARGET_mips/' --in-place=.orig uclibc/uClibc-0.9.27/extra/Configs/Config.in
@cd uclibc/uClibc-0.9.27 && make defconfig $(TEE) ../../uclibc_config.out $(TEEE)
@$(SED) -e 's:^KERNEL_SOURCE=.*:KERNEL_SOURCE="'"`pwd`/linux/linux-2.4.20"'":' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:^SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX="'"/lib"'":' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:^RUNTIME_PREFIX=.*:RUNTIME_PREFIX="'"`pwd`/uclibc"'":' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:^DEVEL_PREFIX=.*:DEVEL_PREFIX="'"`pwd`/uclibc/usr"'":' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:^LDSO_BASE_FILENAME=.*:LDSO_BASE_FILENAME="'"ld-uClibc.so"'":' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*CONFIG_MIPS_ISA_MIPS32.*:CONFIG_MIPS_ISA_MIPS32=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:^CONFIG_MIPS_ISA_1.*:# CONFIG_MIPS_ISA_1 is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_WCHAR.*:UCLIBC_HAS_WCHAR=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_LOCALE.*:# UCLIBC_HAS_LOCALE is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_TM_EXTENSIONS.*:# UCLIBC_HAS_TM_EXTENSIONS is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_RPC.*:UCLIBC_HAS_RPC=y\nUCLIBC_HAS_FULL_RPC=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_FULL_RPC.*:UCLIBC_HAS_FULL_RPC=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_CTYPE_TABLES.*:UCLIBC_HAS_CTYPE_TABLES=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_CTYPE_SIGNED.*:# UCLIBC_HAS_CTYPE_SIGNED is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_CTYPE_UNSAFE.*:# UCLIBC_HAS_CTYPE_UNSAFE is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_GLIBC_CUSTOM_PRINTF.*:UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_HEXADECIMAL_FLOATS.*:# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_GLIBC_CUSTOM_STREAMS.*:UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UNIX98PTY_ONLY.*:# UNIX98PTY_ONLY is not set:' --in-place uclibc/uClibc-0.9.27/.config
@$(SED) -e 's:.*UCLIBC_HAS_FTW.*:UCLIBC_HAS_FTW=y:' --in-place uclibc/uClibc-0.9.27/.config
@rm uclibc/uClibc-0.9.27/include/bits/uClibc_config.h 2>/dev/null || true
$(uclibc_patch): $(uclibc_files)
@echo
@echo ++ patching uclibc
@: # no patching required -- it used to add -EL to Rules.mak
@touch $(uclibc_patch)
$(uclibc_make): $(uclibc_config) $(uclibc_patch)
@echo
@echo ++ building uclibc
@cd uclibc/uClibc-0.9.27 && echo PATH=\"`pwd`/../../binutils/bin:$$PATH\" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../gcc/1/bin/gcc-mips \"$$\@\" > make.sh # for convenience
@cd uclibc/uClibc-0.9.27 && PATH="`pwd`/../../binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../gcc/1/bin/gcc-mips $(TEE) ../../uclibc_make.out $(TEEE)
@touch $(uclibc_make)
$(uclibc_install): $(uclibc_make)
@echo
@echo ++ installing uclibc
@cd uclibc/uClibc-0.9.27 && PATH="`pwd`/../../binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../gcc/1/bin/gcc-mips install $(TEE) ../../uclibc_install.out $(TEEE)
@touch $(uclibc_install)
$(uclibc_for_target): $(gcc_2_install) $(uclibc_make)
@echo
@echo ++ building uclibc utils
@cd uclibc/uClibc-0.9.27/utils && PATH="`pwd`/../../../binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../../gcc/2/bin/gcc-mips clean > /dev/null
@cd uclibc/uClibc-0.9.27/utils && PATH="`pwd`/../../../binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../../gcc/2/bin/gcc-mips CFLAGS="-static" RUNTIME_PREFIX=/ $(TEE) ../../../uclibc_for_target_make.out $(TEEE)
@touch $(uclibc_for_target)
# ==
$(uclibcpp_files):
@echo
@echo ++ untaring uclibc++
@mkdir uclibc 2>/dev/null || true
tar -C uclibc -xjf $(uclibc_tar_dir)/uClibc++-0.2.2.tar.bz2
@touch $(uclibcpp_files)
$(uclibcpp_patch): $(uclibcpp_files)
@echo
@echo ++ patching uclibc++
@: no-op
@touch $(uclibcpp_patch)
$(uclibcpp_config): $(uclibcpp_patch) $(uclibc_config)
@echo
@echo ++ configuring uclibc++
@cd uclibc/uClibc++-0.2.2 && make defconfig $(TEE) ../../uclibcpp_config.out $(TEEE)
@$(SED) 's:.*UCLIBCXX_HAS_LONG_DOUBLE.*:# UCLIBCXX_HAS_LONG_DOUBLE is not set:' --in-place uclibc/uClibc++-0.2.2/.config
@$(SED) 's:.*UCLIBCXX_HAS_TLS.*:# UCLIBCXX_HAS_TLS is not set:' --in-place uclibc/uClibc++-0.2.2/.config
@$(SED) 's:.*UCLIBCXX_HAS_LFS.*:# UCLIBCXX_HAS_LFS is not set:' --in-place uclibc/uClibc++-0.2.2/.config
@rm -f uclibc/uClibc++-0.2.2/include/system_configuration.h
$(uclibcpp_make): $(uclibcpp_config) $(gcc_2_install)
@echo
@echo ++ building uclibc++
@cd uclibc/uClibc++-0.2.2 && echo PATH="$(mk_root)/binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CXX=$(mk_root)/gcc/2/bin/g++-mips CC=$(mk_root)/gcc/2/bin/gcc-mips LIBS=\"-lc -Bstatic -ldl_pic\" \"$$\@\" > make.sh
@cd uclibc/uClibc++-0.2.2 && PATH="$(mk_root)/binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CXX=$(mk_root)/gcc/2/bin/g++-mips CC=$(mk_root)/gcc/2/bin/gcc-mips LIBS="-lc -Bstatic -ldl_pic" $(TEE) ../../uclibcpp_make.out $(TEEE)
@touch $(uclibcpp_make)
$(uclibcpp_install): $(uclibcpp_make) $(uclibc_config)
@echo
@echo ++ installing uclibc++
@cd uclibc/uClibc++-0.2.2 && PATH="`pwd`/../../binutils/bin:$$PATH" make CROSS=mipsel-elf-linux-gnu- CC=`pwd`/../../gcc/2/bin/gcc-mips DESTDIR=$(mk_root)/uclibc install $(TEE) ../../uclibcpp_install.out $(TEEE)
@touch $(uclibcpp_install)
# ==
$(gcc_files):
@echo
@echo ++ untaring gcc
@mkdir gcc 2>/dev/null || true
tar -C gcc -xjf $(gcc_tar_dir)/gcc-3.4.6.tar.bz2
tar -C gcc -xjf $(gcc_tar_dir)/gcc-core-3.4.6.tar.bz2
tar -C gcc -xjf $(gcc_tar_dir)/gcc-g++-3.4.6.tar.bz2
@touch $(gcc_files)
$(gcc_patch): $(gcc_files) $(gcc_diff)
@echo
@echo ++ patching gcc
@f=`echo gcc-3.4.6|tr -d .`.diff ; if test -f $$f ; then cat $$f | ( cd gcc/gcc-3.4.6 && patch -p1 -N -s ) ; fi
@touch $(gcc_patch)
$(gcc_1_config): $(gcc_patch) $(binutils_install)
@echo
@echo ++ configuring gcc 1
@if test -d gcc/build-1 ; then : ; else mkdir gcc/build-1 ; fi
@echo configure --prefix=$(mk_root)/gcc/1 $(gcc_1_configure)
@cd gcc/build-1 && ../gcc-3.4.6/configure --prefix=$(mk_root)/gcc/1 $(gcc_1_configure) $(TEE) ../../gcc_1_config.out $(TEEE)
$(gcc_1_make): $(gcc_1_config)
@echo
@echo ++ building gcc 1
@for f in binutils/mips*/bin/* ; do ( cd gcc/build-1 && ln -fs ../../$$f `basename $$f`-mips ) ; done
@mkdir -p gcc/build-1/gcc
@touch gcc/build-1/gcc/crti.o
@touch gcc/build-1/gcc/crtn.o
@touch gcc/build-1/gcc/libc.a
@cd gcc/build-1 && PATH="`pwd`:$$PATH" make $(TEE) ../../gcc_1_make.out $(TEEE)
@touch $(gcc_1_make)
$(gcc_1_install): $(gcc_1_make)
@echo
@echo ++ installing gcc 1
@cd gcc/build-1 && PATH="`pwd`:$$PATH" make install $(TEE) ../../gcc_1_install.out $(TEEE)
@if test -f gcc/1/bin/mipsel-elf-linux-gnu-gcc -a ! -h gcc/1/bin/gcc-mips ; then ( cd gcc/1/bin && ln -s mipsel-elf-linux-gnu-gcc gcc-mips ) ; fi # for gcc-3.3.x
@touch $(gcc_1_install)
$(gcc_2_config): $(gcc_1_install) $(uclibc_install)
@echo
@echo ++ configuring gcc 2
@if test -d gcc/build-2 ; then : ; else mkdir gcc/build-2 ; fi
@echo configure --prefix=$(mk_root)/gcc/2 $(gcc_2_configure)
@cd gcc/build-2 && CXXFLAGS=-g ../gcc-3.4.6/configure --prefix=$(mk_root)/gcc/2 $(gcc_2_configure) $(TEE) ../../gcc_2_config.out $(TEEE)
$(gcc_2_make): $(gcc_2_config)
@echo
@echo ++ building gcc 2
@for f in binutils/mips*/bin/* ; do ( cd gcc/build-2 && ln -fs ../../$$f `basename $$f`-mips ) ; done
@cd gcc/build-2 && PATH="`pwd`:$$PATH" make $(TEE) ../../gcc_2_make.out $(TEEE)
@touch $(gcc_2_make)
$(gcc_2_install): $(gcc_2_make)
@echo
@echo ++ installing gcc 2
@cd gcc/build-2 && PATH="`pwd`:$$PATH" make install $(TEE) ../../gcc_2_install.out $(TEEE)
@if test -f gcc/2/bin/mipsel-elf-linux-gnu-gcc -a ! -h gcc/2/bin/gcc-mips ; then ( cd gcc/2/bin && ln -s mipsel-elf-linux-gnu-gcc gcc-mips ) ; fi # for gcc-3.3.x
@if test -f gcc/2/bin/mipsel-elf-linux-gnu-g++ -a ! -h gcc/2/bin/g++-mips ; then ( cd gcc/2/bin && ln -s mipsel-elf-linux-gnu-g++ g++-mips ) ; fi # for gcc-3.3.x
@touch $(gcc_2_install)
$(gcc_diff): gcc-334.diff gcc-343.diff gcc-336.diff gcc-346.diff
@cp `echo gcc-3.4.6 | tr -d .`.diff $(gcc_diff)
gcc-334.diff.tmp:
@:
@: # magic patch to mips/linux.h
@:
@echo ZGlmZiAtTmF1ciBvbGQvZ2NjL2NvbmZpZy9taXBzL2xpbnV4LmggbmV3L2djYy9jb25maWcvbWlw > $@
@echo cy9saW51eC5oCg== >> $@
@echo LS0tIG9sZC9nY2MvY29uZmlnL21pcHMvbGludXguaAkyMDA3LTExLTI5IDE0OjUyOjI1LjAwMDAw >> $@
@echo MDAwMCArMDAwMAo= >> $@
@echo KysrIG5ldy9nY2MvY29uZmlnL21pcHMvbGludXguaAkyMDA3LTExLTI5IDE0OjU0OjI5LjAwMDAw >> $@
@echo MDAwMCArMDAwMAo= >> $@
@echo QEAgLTIzOCwxMCArMjM4LDggQEAK >> $@
@echo ICAgIHBzZXVkby1vcHMuICAqLwo= >> $@
@echo ICNkZWZpbmUgRlVOQ1RJT05fTkFNRV9BTFJFQURZX0RFQ0xBUkVECg== >> $@
@echo IAo= >> $@
@echo LSNkZWZpbmUgQVNNX1BSRUZFUlJFRF9FSF9EQVRBX0ZPUk1BVChDT0RFLCBHTE9CQUwpICAgICAg >> $@
@echo IAkJXAo= >> $@
@echo LSAgKGZsYWdfcGljCQkJCQkJCQlcCg== >> $@
@echo LSAgICA/ICgoR0xPQkFMKSA/IERXX0VIX1BFX2luZGlyZWN0IDogMCkgfCBEV19FSF9QRV9wY3Jl >> $@
@echo bCB8IERXX0VIX1BFX3NkYXRhNFwK >> $@
@echo LSAgIDogRFdfRUhfUEVfYWJzcHRyKQo= >> $@
@echo Ky8qIGdodyBHSFcgaHR0cDovL2djYy5nbnUub3JnL21sL2djYy1wYXRjaGVzLzIwMDQtMDYvbXNn >> $@
@echo MDA5NzAuaHRtbCAqLwo= >> $@
@echo KyNkZWZpbmUgQVNNX1BSRUZFUlJFRF9FSF9EQVRBX0ZPUk1BVChDT0RFLCBHTE9CQUwpIERXX0VI >> $@
@echo X1BFX2Fic3B0cgo= >> $@
@echo IAo= >> $@
@echo IC8qIFRoZSBnbGliYyBfbWNvdW50IHN0dWIgd2lsbCBzYXZlICR2MCBmb3IgdXMuICBEb24ndCBt >> $@
@echo ZXNzIHdpdGggc2F2aW5nCg== >> $@
@echo ICAgIGl0LCBzaW5jZSBBU01fT1VUUFVUX1JFR19QVVNIL0FTTV9PVVRQVVRfUkVHX1BPUCBkbyBu >> $@
@echo b3Qgd29yayBpbiB0aGUK >> $@
@:
@: # ctype map data-type patch for c++
@:
@echo ZGlmZiAtTmF1ciBvbGQvbGlic3RkYysrLXYzL2NvbmZpZy9vcy9nbnUtbGludXgvY3R5cGVfYmFz >> $@
@echo ZS5oIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgK >> $@
@echo LS0tIG9sZC9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wNyAxMzo1OTo1Mi4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo KysrIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wNyAxNDowMDoyNC4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo QEAgLTM2LDcgKzM2LDcgQEAK >> $@
@echo ICAgc3RydWN0IGN0eXBlX2Jhc2UK >> $@
@echo ICAgewo= >> $@
@echo ICAgICAvLyBOb24tc3RhbmRhcmQgdHlwZWRlZnMuCg== >> $@
@echo LSAgICB0eXBlZGVmIGNvbnN0IGludCogCQlfX3RvX3R5cGU7Cg== >> $@
@echo KyAgICB0eXBlZGVmIGNvbnN0IF9fY3R5cGVfdG91cGxvd190KiAJCV9fdG9fdHlwZTsK >> $@
@echo IAo= >> $@
@echo ICAgICAvLyBOQjogT2Zmc2V0cyBpbnRvIGN0eXBlPGNoYXI+OjpfTV90YWJsZSBmb3JjZSBhIHBh >> $@
@echo cnRpY3VsYXIgc2l6ZQo= >> $@
@echo ICAgICAvLyBvbiB0aGUgbWFzayB0eXBlLiBCZWNhdXNlIG9mIHRoaXMsIHdlIGRvbid0IHVzZSBh >> $@
@echo biBlbnVtLgo= >> $@
gcc-334.diff: gcc-334.diff.tmp
@perl -e 'use MIME::Base64;while(<>){print MIME::Base64::decode_base64($$_)}'< $< >.tmp && mv .tmp $@
gcc-343.diff: gcc-343.diff.tmp
@perl -e 'use MIME::Base64;while(<>){print MIME::Base64::decode_base64($$_)}'< $< >.tmp && mv .tmp $@
gcc-343.diff.tmp:
@:
@: # ctype map data-type patch for c++
@:
@echo ZGlmZiAtTmF1ciBvbGQvbGlic3RkYysrLXYzL2NvbmZpZy9vcy9nbnUtbGludXgvY3R5cGVfYmFz > $@
@echo ZS5oIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgK >> $@
@echo LS0tIG9sZC9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wMyAxNjoyNzowMy4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo KysrIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wMyAxNjoyODowMS4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo QEAgLTM3LDcgKzM3LDcgQEAK >> $@
@echo ICAgc3RydWN0IGN0eXBlX2Jhc2UK >> $@
@echo ICAgewo= >> $@
@echo ICAgICAvLyBOb24tc3RhbmRhcmQgdHlwZWRlZnMuCg== >> $@
@echo LSAgICB0eXBlZGVmIGNvbnN0IGludCogCQlfX3RvX3R5cGU7Cg== >> $@
@echo KyAgICB0eXBlZGVmIGNvbnN0IF9fY3R5cGVfdG91cGxvd190KiAJCV9fdG9fdHlwZTsK >> $@
@echo IAo= >> $@
@echo ICAgICAvLyBOQjogT2Zmc2V0cyBpbnRvIGN0eXBlPGNoYXI+OjpfTV90YWJsZSBmb3JjZSBhIHBh >> $@
@echo cnRpY3VsYXIgc2l6ZQo= >> $@
@echo ICAgICAvLyBvbiB0aGUgbWFzayB0eXBlLiBCZWNhdXNlIG9mIHRoaXMsIHdlIGRvbid0IHVzZSBh >> $@
@echo biBlbnVtLgo= >> $@
gcc-336.diff: gcc-334.diff
@cp $< $@
gcc-346.diff: gcc-346.diff.tmp
@perl -e 'use MIME::Base64;while(<>){print MIME::Base64::decode_base64($$_)}'< $< >.tmp && mv .tmp $@
gcc-346.diff.tmp:
@:
@: # ctype map data-type patch for c++
@:
@echo ZGlmZiAtTmF1ciBvbGQvbGlic3RkYysrLXYzL2NvbmZpZy9vcy9nbnUtbGludXgvY3R5cGVfYmFz > $@
@echo ZS5oIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgK >> $@
@echo LS0tIG9sZC9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wMyAxNjoyNzowMy4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo KysrIG5ldy9saWJzdGRjKystdjMvY29uZmlnL29zL2dudS1saW51eC9jdHlwZV9iYXNlLmgJMjAw >> $@
@echo Ny0xMi0wMyAxNjoyODowMS4wMDAwMDAwMDAgKzAwMDAK >> $@
@echo QEAgLTM3LDcgKzM3LDcgQEAK >> $@
@echo ICAgc3RydWN0IGN0eXBlX2Jhc2UK >> $@
@echo ICAgewo= >> $@
@echo ICAgICAvLyBOb24tc3RhbmRhcmQgdHlwZWRlZnMuCg== >> $@
@echo LSAgICB0eXBlZGVmIGNvbnN0IGludCogCQlfX3RvX3R5cGU7Cg== >> $@
@echo KyAgICB0eXBlZGVmIGNvbnN0IF9fY3R5cGVfdG91cGxvd190KiAJCV9fdG9fdHlwZTsK >> $@
@echo IAo= >> $@
@echo ICAgICAvLyBOQjogT2Zmc2V0cyBpbnRvIGN0eXBlPGNoYXI+OjpfTV90YWJsZSBmb3JjZSBhIHBh >> $@
@echo cnRpY3VsYXIgc2l6ZQo= >> $@
@echo ICAgICAvLyBvbiB0aGUgbWFzayB0eXBlLiBCZWNhdXNlIG9mIHRoaXMsIHdlIGRvbid0IHVzZSBh >> $@
@echo biBlbnVtLgo= >> $@
@:
@: # hack in an implementation of finitef
@:
@echo ZGlmZiAtTmF1ciBvbGQvbGlic3RkYysrLXYzL3NyYy9jdHlwZS5jYyBuZXcvbGlic3RkYysrLXYz >> $@
@echo L3NyYy9jdHlwZS5jYwo= >> $@
@echo LS0tIG9sZC9saWJzdGRjKystdjMvc3JjL2N0eXBlLmNjCTIwMDctMTItMTAgMTM6NTA6NDAuMDAw >> $@
@echo MDAwMDAwICswMDAwCg== >> $@
@echo KysrIG5ldy9saWJzdGRjKystdjMvc3JjL2N0eXBlLmNjCTIwMDctMTItMTAgMTM6NDg6MjUuMDAw >> $@
@echo MDAwMDAwICswMDAwCg== >> $@
@echo QEAgLTExMiwzICsxMTIsNCBAQAo= >> $@
@echo ICNlbmRpZgo= >> $@
@echo IH0gLy8gbmFtZXNwYWNlIHN0ZAo= >> $@
@echo IAo= >> $@
@echo K2V4dGVybiAiQyIgaW50IGZpbml0ZWYoZmxvYXQgeCkgeyB1bmlvbiB7dV9pbnQzMl90IGx2YWw7 >> $@
@echo ZmxvYXQgZnZhbDt9IHo7ei5mdmFsPXg7cmV0dXJuICgoei5sdmFsJjB4N2Y4MDAwMDApIT0weDdm >> $@
@echo ODAwMDAwKTt9IC8qIGdodyBHSFcgKi8K >> $@
# ==
test.c:
@echo '#include <stdio.h>' > $@
@echo 'int main() { printf("Hello, world!\\n") ; return 0 ; }' >> $@
test.cpp:
@echo '#include <iostream>' > $@
@echo 'int main() { std::cout << "Hello, world!" << std::endl ; return 0 ; }' >> $@
$(test_c_for_target): test.c $(gcc_2_install)
@echo
@echo ++ testing c
gcc/2/bin/gcc-mips -Xlinker --dynamic-linker=/lib/ld-uClibc.so.0 -o $@ test.c -lm
$(test_cpp_for_target): test.cpp $(gcc_2_install)
@echo
@echo ++ testing c++
gcc/2/bin/g++-mips -Xlinker --dynamic-linker=/lib/ld-uClibc.so.0 -o $@ test.cpp -lgcc_s -ldl_pic
$(test_cpp_for_target_static): test.cpp $(gcc_2_install)
@echo
@echo ++ testing c++ all-static
gcc/build-2/mipsel-elf-linux-gnu/libstdc++-v3/libtool --quiet --tag=CXX --mode=link gcc/2/bin/g++-mips -all-static -Xlinker --dynamic-linker=/lib/ld-uClibc.so.0 -o $@ test.cpp -lgcc_eh -ldl
$(test_cpp_for_target_uclibcpp): test.cpp $(uclibcpp_install)
@echo
@echo ++ testing uclibc++
uclibc/usr/uClibc++/bin/g++-uc -Xlinker --dynamic-linker=/lib/ld-uClibc.so.0 -Iuclibc/usr/uClibc++/include -Luclibc/usr/uClibc++/lib -o $@ test.cpp
configure-mips.sh:
@test -f configure-mips.sh_ && cp configure-mips.sh_ $@ && chmod +x $@ || true
# ==
.PHONY: vclean
vclean: clean clean_binutils
@rm -f *.out
@rm -f *.tmp
.PHONY: clean_binutils
clean_binutils:
@rm $(binutils_make) 2>/dev/null || true
@rm $(binutils_install) 2>/dev/null || true
@rm $(binutils_for_target_make) 2>/dev/null || true
@rm -rf binutils/binutils-2.18
@rm -rf binutils/build
@rm -rf binutils/bin binutils/info binutils/lib binutils/man binutils/mips*-elf-linux-gnu binutils/share
@rm -rf binutils/build-for-target
@if test -d binutils ; then rmdir binutils ; fi
.PHONY: clean
clean:
@rm $(gcc_1_make) 2>/dev/null || true
@rm $(gcc_1_install) 2>/dev/null || true
@rm $(gcc_2_make) 2>/dev/null || true
@rm $(gcc_2_install) 2>/dev/null || true
@rm $(uclibc_patch) 2>/dev/null || true
@rm $(uclibc_make) 2>/dev/null || true
@rm $(uclibc_install) 2>/dev/null || true
@rm $(uclibcpp_install) 2>/dev/null || true
@rm $(uclibc_for_target) 2>/dev/null || true
@rm -rf linux/linux-2.4.20
@rm -rf uclibc/uClibc-0.9.27
@rm -rf uclibc/uClibc++-0.2.2
@rm -rf uclibc/lib uclibc/usr uclibc/sbin
@rm -rf gcc/gcc-3.*
@rm -rf gcc/build-1
@rm -rf gcc/build-2
@rm -rf gcc/1
@rm -rf gcc/2
@rm -f gcc*.diff
@rm -f *diff.tmp
@if test -d linux ; then rmdir linux ; fi
@if test -d uclibc ; then rmdir uclibc ; fi
@if test -d gcc ; then rmdir gcc ; fi
.PHONY: done
done:
touch $(linux_files) || true
touch $(linux_config) || true
touch $(gcc_files) || true
touch $(gcc_diff) || true
touch $(gcc_patch) || true
touch $(gcc_1_config) || true
touch $(gcc_1_make) || true
touch $(gcc_1_install) || true
touch $(binutils_files) || true
touch $(binutils_config) || true
touch $(binutils_make) || true
touch $(binutils_install) || true
touch $(uclibc_files) || true
touch $(uclibc_config) || true
touch $(uclibc_patch) || true
touch $(uclibc_make) || true
touch $(uclibc_install) || true
touch $(gcc_2_config) || true
touch $(gcc_2_make) || true
touch $(gcc_2_install) || true
touch $(binutils_for_target_config) || true
touch $(binutils_for_target_make) || true
touch $(uclibc_for_target) || true
.PHONY: gcc_files
.PHONY: gcc_diff
.PHONY: gcc_patch
.PHONY: gcc_1_config
.PHONY: gcc_1_make
.PHONY: gcc_1_install
.PHONY: gcc_2_config
.PHONY: gcc_2_make
.PHONY: gcc_2_install
.PHONY: binutils_files
.PHONY: binutils_config
.PHONY: binutils_make
.PHONY: binutils_install
.PHONY: binutils_for_target_config
.PHONY: binutils_for_target_make
.PHONY: linux_files
.PHONY: linux_config
.PHONY: uclibc_files
.PHONY: uclibc_config
.PHONY: uclibc_patch
.PHONY: uclibc_make
.PHONY: uclibc_install
.PHONY: uclibc_for_target
.PHONY: uclibcpp_files
.PHONY: uclibcpp_patch
.PHONY: uclibcpp_config
.PHONY: uclibcpp_make
.PHONY: uclibcpp_install
gcc_files: $(gcc_files)
gcc_diff: $(gcc_diff)
gcc_patch: $(gcc_patch)
gcc_1_config: $(gcc_1_config)
gcc_1_make: $(gcc_1_make)
gcc_1_install: $(gcc_1_install)
gcc_2_config: $(gcc_2_config)
gcc_2_make: $(gcc_2_make)
gcc_2_install: $(gcc_2_install)
binutils_files: $(binutils_files)
binutils_config: $(binutils_config)
binutils_make: $(binutils_make)
binutils_install: $(binutils_install)
binutils_for_target_config: $(binutils_for_target_config)
binutils_for_target_make: $(binutils_for_target_make)
linux_files: $(linux_files)
linux_config: $(linux_config)
uclibc_files: $(uclibc_files)
uclibc_config: $(uclibc_config)
uclibc_patch: $(uclibc_patch)
uclibc_make: $(uclibc_make)
uclibc_install: $(uclibc_install)
uclibc_for_target: $(uclibc_for_target)
uclibcpp_files: $(uclibcpp_files)
uclibcpp_patch: $(uclibcpp_patch)
uclibcpp_config: $(uclibcpp_config)
uclibcpp_make: $(uclibcpp_make)
uclibcpp_install: $(uclibcpp_install)

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-10-14.15
scriptversion=2006-12-25.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -48,7 +48,7 @@ IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
@ -58,34 +58,49 @@ fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
mvcmd="$mvprog"
stripcmd=
src=
dst=
dir_arg=
dstarg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
@ -95,7 +110,11 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
@ -103,57 +122,43 @@ Options:
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) shift
continue;;
-c) ;;
-d) dir_arg=true
shift
continue;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
shift
shift
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;;
shift;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
shift;;
-s) stripcmd=$stripprog
shift
continue;;
-s) stripcmd=$stripprog;;
-t) dstarg=$2
shift
shift
continue;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true
shift
continue;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
@ -165,21 +170,22 @@ while test $# -ne 0; do
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dstarg=$arg
dst_arg=$arg
done
fi
@ -242,12 +248,12 @@ do
exit 1
fi
if test -z "$dstarg"; then
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
@ -257,7 +263,7 @@ do
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
@ -378,26 +384,19 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob && set -f
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob && set +f
$posix_glob set +f
IFS=$oIFS
prefixes=
@ -459,41 +458,54 @@ do
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dst" >&2
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
} || exit 1
fi || exit 1
trap '' 0
fi

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -14,4 +14,6 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SUBDIRS = gcc2.95 msvc6.0 sunpro5
SUBDIRS = gcc2.95 msvc6.0

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -13,6 +13,9 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
#
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -78,6 +81,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -87,7 +91,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -111,7 +114,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -166,10 +168,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
#
SUBDIRS = gcc2.95 msvc6.0 sunpro5
SUBDIRS = gcc2.95 msvc6.0
all: all-recursive
.SUFFIXES:
@ -278,8 +277,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@ -304,8 +303,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -315,13 +314,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -69,6 +69,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -78,7 +79,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -102,7 +102,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -69,6 +69,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -78,7 +79,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -102,7 +102,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

View File

@ -1,39 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# ===
#
# xar
#
# A replacement for 'ar' that uses the Workshop compiler
# as 'CC -xar'. It also discards autoconf's bogus "cru"
# command-line argument.
#
# For example:
# $ chmod +x lib/sunpro5/xar
# $ ./configure --enable-whatever AR=`pwd`/lib/sunpro5/xar
#
# Or just:
# $ ./configure --enable-workshop
#
# Also note that gcc on solaris may require:
# $ ./configure --enable-whatever AR=/usr/ccs/bin/ar
#
CC="CC"
if test -x "${CXX}" ; then CC="${CXX}" ; fi
if test "${1}" = "--cxx" ; then CC="${2}" ; shift ; shift ; fi
shift # get rid of "cru" flags
exec ${CC} -xar -o "$@"

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -15,4 +15,4 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = mingw.mak mingw-common.mak emailrelay.dsw
SUBDIRS = glib gssl gnet gsmtp gpop main win32 gui
SUBDIRS = glib gssl gnet gsmtp gpop fragments main win32 gui

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -78,6 +78,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -87,7 +88,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -111,7 +111,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -170,7 +169,7 @@ top_srcdir = @top_srcdir@
#
#
EXTRA_DIST = mingw.mak mingw-common.mak emailrelay.dsw
SUBDIRS = glib gssl gnet gsmtp gpop main win32 gui
SUBDIRS = glib gssl gnet gsmtp gpop fragments main win32 gui
all: all-recursive
.SUFFIXES:
@ -279,8 +278,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@ -305,8 +304,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -316,13 +315,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique

26
src/fragments/Makefile.am Normal file
View File

@ -0,0 +1,26 @@
#
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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 3 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, see <http://www.gnu.org/licenses/>.
#
noinst_LIBRARIES = libfragments.a
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
INCLUDES += -I$(top_srcdir)/src/glib
INCLUDES += -I$(top_srcdir)/src/gssl
INCLUDES += -I$(top_srcdir)/src/gnet
libfragments_a_SOURCES = empty.cpp
libfragments_a_LIBADD = @FRAGMENTS_LIST@
libfragments_a_DEPENDENCIES = @FRAGMENTS_LIST@
distclean-local:
$(RM) g*.cpp

422
src/fragments/Makefile.in Normal file
View File

@ -0,0 +1,422 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = src/fragments
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libfragments_a_AR = $(AR) $(ARFLAGS)
am_libfragments_a_OBJECTS = empty.$(OBJEXT)
libfragments_a_OBJECTS = $(am_libfragments_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
SOURCES = $(libfragments_a_SOURCES)
DIST_SOURCES = $(libfragments_a_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPILER_VERSION = @COMPILER_VERSION@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
HAVE_MAN2HTML = @HAVE_MAN2HTML@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKE = @MAKE@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
#
noinst_LIBRARIES = libfragments.a
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION) \
-I$(top_srcdir)/src/glib -I$(top_srcdir)/src/gssl \
-I$(top_srcdir)/src/gnet
libfragments_a_SOURCES = empty.cpp
libfragments_a_LIBADD = @FRAGMENTS_LIST@
libfragments_a_DEPENDENCIES = @FRAGMENTS_LIST@
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/fragments/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/fragments/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libfragments.a: $(libfragments_a_OBJECTS) $(libfragments_a_DEPENDENCIES)
-rm -f libfragments.a
$(libfragments_a_AR) libfragments.a $(libfragments_a_OBJECTS) $(libfragments_a_LIBADD)
$(RANLIB) libfragments.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/empty.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-local distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES ctags distclean distclean-compile \
distclean-generic distclean-local distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am
distclean-local:
$(RM) g*.cpp
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0
src/fragments/empty.cpp Normal file
View File

View File

@ -1,5 +1,5 @@
#
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
##
## 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
@ -14,27 +14,82 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
noinst_LIBRARIES = libglib.a
if MAC
MAC_EXTRA_DIST = garg_unix.cpp
MAC_SOURCES = garg_mac.cpp
else
MAC_EXTRA_DIST = garg_mac.cpp
MAC_SOURCES = garg_unix.cpp
endif
if EXEC
EXEC_EXTRA_DIST = gnewprocess_unix_exec_disabled.cpp
EXEC_SOURCES = gnewprocess_unix_exec_enabled.cpp
else
EXEC_EXTRA_DIST = gnewprocess_unix_exec_enabled.cpp
EXEC_SOURCES = gnewprocess_unix_exec_disabled.cpp
endif
if IDENTITY
IDENTITY_EXTRA_DIST = gidentity_disabled.cpp
IDENTITY_SOURCES = gidentity_unix.cpp
else
IDENTITY_EXTRA_DIST = gidentity_unix.cpp
IDENTITY_SOURCES = gidentity_disabled.cpp
endif
if GLOB
GLOB_EXTRA_DIST = gdirectory_unix_noglob.cpp
GLOB_SOURCES = gdirectory_unix_glob.cpp
else
GLOB_EXTRA_DIST = gdirectory_unix_glob.cpp
GLOB_SOURCES = gdirectory_unix_noglob.cpp
endif
if SMALL_FRAGMENTS
FRAGMENTS_EXTRA_DIST = gstr.cpp gdate.cpp gfile.cpp gpath.cpp gfs_unix.cpp gexception.cpp glogoutput.cpp
FRAGMENTS_SOURCES =
else
FRAGMENTS_EXTRA_DIST =
FRAGMENTS_SOURCES = gstr.cpp gdate.cpp gfile.cpp gpath.cpp gfs_unix.cpp gexception.cpp glogoutput.cpp
endif
EXTRA_DIST=\
$(EXEC_EXTRA_DIST) \
$(FRAGMENTS_EXTRA_DIST) \
$(IDENTITY_EXTRA_DIST) \
$(GLOB_EXTRA_DIST) \
$(MAC_EXTRA_DIST) \
garg_win32.cpp \
gcleanup_win32.cpp \
gdaemon_win32.cpp \
gdatetime_win32.cpp \
gdirectory_win32.cpp \
gexecutable_win32.cpp \
gfile_win32.cpp \
gfs_win32.cpp \
ghostname_win32.cpp \
gidentity_win32.cpp \
glogoutput_win32.cpp \
gprocess_win32.cpp \
gfile_win32.cpp \
gnewprocess_win32.cpp \
mingw.mak
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
noinst_LIBRARIES = libglib.a
libglib_a_SOURCES = \
$(EXEC_SOURCES) \
$(FRAGMENTS_SOURCES) \
$(IDENTITY_SOURCES) \
$(GLOB_SOURCES) \
$(MAC_SOURCES) \
md5.cpp \
md5.h \
garg.cpp \
garg.h \
garg_unix.cpp \
gassert.h \
gconvert.h \
gcleanup.h \
@ -43,7 +98,6 @@ libglib_a_SOURCES = \
gcounter.h \
gdaemon.h \
gdaemon_unix.cpp \
gdate.cpp \
gdate.h \
gdatetime.cpp \
gdatetime.h \
@ -53,30 +107,28 @@ libglib_a_SOURCES = \
gdirectory.cpp \
gdirectory.h \
gdirectory_unix.cpp \
gexception.cpp \
gexception.h \
gexecutable_unix.cpp \
gexecutable.cpp \
gexecutable.h \
gfile.cpp \
gfile.h \
gfile_unix.cpp \
gfs.h \
gfs_unix.cpp \
ggetopt.cpp \
ggetopt.h \
ggetopt.cpp \
ghostname_unix.cpp \
ghostname.h \
gidentity.h \
gidentity_unix.cpp \
glimits.h \
glog.cpp \
glog.h \
glogoutput.cpp \
glogoutput.h \
glogoutput_unix.cpp \
gnewprocess.h \
gmd5_native.cpp \
gmd5.h \
gmemory.h \
gnoncopyable.h \
gpath.cpp \
gpath.h \
gpidfile.cpp \
gpidfile.h \
@ -90,7 +142,6 @@ libglib_a_SOURCES = \
gslot.cpp \
gslot.h \
gstatemachine.h \
gstr.cpp \
gstr.h \
gstrings.h \
gtest.cpp \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,6 +14,9 @@
@SET_MAKE@
#
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -44,21 +47,51 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libglib_a_AR = $(AR) $(ARFLAGS)
libglib_a_LIBADD =
am_libglib_a_OBJECTS = md5.$(OBJEXT) garg.$(OBJEXT) \
garg_unix.$(OBJEXT) gcleanup_unix.$(OBJEXT) gcounter.$(OBJEXT) \
gdaemon_unix.$(OBJEXT) gdate.$(OBJEXT) gdatetime.$(OBJEXT) \
am__libglib_a_SOURCES_DIST = gnewprocess_unix_exec_disabled.cpp \
gnewprocess_unix_exec_enabled.cpp gstr.cpp gdate.cpp gfile.cpp \
gpath.cpp gfs_unix.cpp gexception.cpp glogoutput.cpp \
gidentity_disabled.cpp gidentity_unix.cpp \
gdirectory_unix_noglob.cpp gdirectory_unix_glob.cpp \
garg_unix.cpp garg_mac.cpp md5.cpp md5.h garg.cpp garg.h \
gassert.h gconvert.h gcleanup.h gcleanup_unix.cpp gcounter.cpp \
gcounter.h gdaemon.h gdaemon_unix.cpp gdate.h gdatetime.cpp \
gdatetime.h gdatetime_unix.cpp gdebug.h gdef.h gdirectory.cpp \
gdirectory.h gdirectory_unix.cpp gexception.h \
gexecutable_unix.cpp gexecutable.cpp gexecutable.h gfile.h \
gfile_unix.cpp gfs.h ggetopt.h ggetopt.cpp ghostname_unix.cpp \
ghostname.h gidentity.h glimits.h glog.cpp glog.h glogoutput.h \
glogoutput_unix.cpp gnewprocess.h gmd5_native.cpp gmd5.h \
gmemory.h gnoncopyable.h gpath.h gpidfile.cpp gpidfile.h \
gprocess.h gprocess_unix.cpp groot.cpp groot.h gsetter.h \
gsignalsafe.h gsleep.h gslot.cpp gslot.h gstatemachine.h \
gstr.h gstrings.h gtest.cpp gtest.h gtime.cpp gtime.h \
gxtext.cpp gxtext.h
@EXEC_FALSE@am__objects_1 = gnewprocess_unix_exec_disabled.$(OBJEXT)
@EXEC_TRUE@am__objects_1 = gnewprocess_unix_exec_enabled.$(OBJEXT)
@SMALL_FRAGMENTS_FALSE@am__objects_2 = gstr.$(OBJEXT) gdate.$(OBJEXT) \
@SMALL_FRAGMENTS_FALSE@ gfile.$(OBJEXT) gpath.$(OBJEXT) \
@SMALL_FRAGMENTS_FALSE@ gfs_unix.$(OBJEXT) gexception.$(OBJEXT) \
@SMALL_FRAGMENTS_FALSE@ glogoutput.$(OBJEXT)
@IDENTITY_FALSE@am__objects_3 = gidentity_disabled.$(OBJEXT)
@IDENTITY_TRUE@am__objects_3 = gidentity_unix.$(OBJEXT)
@GLOB_FALSE@am__objects_4 = gdirectory_unix_noglob.$(OBJEXT)
@GLOB_TRUE@am__objects_4 = gdirectory_unix_glob.$(OBJEXT)
@MAC_FALSE@am__objects_5 = garg_unix.$(OBJEXT)
@MAC_TRUE@am__objects_5 = garg_mac.$(OBJEXT)
am_libglib_a_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
md5.$(OBJEXT) garg.$(OBJEXT) gcleanup_unix.$(OBJEXT) \
gcounter.$(OBJEXT) gdaemon_unix.$(OBJEXT) gdatetime.$(OBJEXT) \
gdatetime_unix.$(OBJEXT) gdirectory.$(OBJEXT) \
gdirectory_unix.$(OBJEXT) gexception.$(OBJEXT) \
gexecutable_unix.$(OBJEXT) gexecutable.$(OBJEXT) \
gfile.$(OBJEXT) gfile_unix.$(OBJEXT) gfs_unix.$(OBJEXT) \
ggetopt.$(OBJEXT) gidentity_unix.$(OBJEXT) glog.$(OBJEXT) \
glogoutput.$(OBJEXT) glogoutput_unix.$(OBJEXT) \
gmd5_native.$(OBJEXT) gpath.$(OBJEXT) gpidfile.$(OBJEXT) \
gprocess_unix.$(OBJEXT) groot.$(OBJEXT) gslot.$(OBJEXT) \
gstr.$(OBJEXT) gtest.$(OBJEXT) gtime.$(OBJEXT) \
gdirectory_unix.$(OBJEXT) gexecutable_unix.$(OBJEXT) \
gexecutable.$(OBJEXT) gfile_unix.$(OBJEXT) ggetopt.$(OBJEXT) \
ghostname_unix.$(OBJEXT) glog.$(OBJEXT) \
glogoutput_unix.$(OBJEXT) gmd5_native.$(OBJEXT) \
gpidfile.$(OBJEXT) gprocess_unix.$(OBJEXT) groot.$(OBJEXT) \
gslot.$(OBJEXT) gtest.$(OBJEXT) gtime.$(OBJEXT) \
gxtext.$(OBJEXT)
libglib_a_OBJECTS = $(am_libglib_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@ -71,7 +104,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libglib_a_SOURCES)
DIST_SOURCES = $(libglib_a_SOURCES)
DIST_SOURCES = $(am__libglib_a_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -99,6 +132,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FRAGMENTS_LIST = @FRAGMENTS_LIST@
GREP = @GREP@
GZIP = @GZIP@
HAVE_DOXYGEN = @HAVE_DOXYGEN@
@ -108,7 +142,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IP = @IP@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -132,7 +165,6 @@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL = @SSL@
SSL_LIBS = @SSL_LIBS@
STATIC_END = @STATIC_END@
STATIC_START = @STATIC_START@
@ -187,31 +219,59 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
#
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
noinst_LIBRARIES = libglib.a
@MAC_FALSE@MAC_EXTRA_DIST = garg_mac.cpp
@MAC_TRUE@MAC_EXTRA_DIST = garg_unix.cpp
@MAC_FALSE@MAC_SOURCES = garg_unix.cpp
@MAC_TRUE@MAC_SOURCES = garg_mac.cpp
@EXEC_FALSE@EXEC_EXTRA_DIST = gnewprocess_unix_exec_enabled.cpp
@EXEC_TRUE@EXEC_EXTRA_DIST = gnewprocess_unix_exec_disabled.cpp
@EXEC_FALSE@EXEC_SOURCES = gnewprocess_unix_exec_disabled.cpp
@EXEC_TRUE@EXEC_SOURCES = gnewprocess_unix_exec_enabled.cpp
@IDENTITY_FALSE@IDENTITY_EXTRA_DIST = gidentity_unix.cpp
@IDENTITY_TRUE@IDENTITY_EXTRA_DIST = gidentity_disabled.cpp
@IDENTITY_FALSE@IDENTITY_SOURCES = gidentity_disabled.cpp
@IDENTITY_TRUE@IDENTITY_SOURCES = gidentity_unix.cpp
@GLOB_FALSE@GLOB_EXTRA_DIST = gdirectory_unix_glob.cpp
@GLOB_TRUE@GLOB_EXTRA_DIST = gdirectory_unix_noglob.cpp
@GLOB_FALSE@GLOB_SOURCES = gdirectory_unix_noglob.cpp
@GLOB_TRUE@GLOB_SOURCES = gdirectory_unix_glob.cpp
@SMALL_FRAGMENTS_FALSE@FRAGMENTS_EXTRA_DIST =
@SMALL_FRAGMENTS_TRUE@FRAGMENTS_EXTRA_DIST = gstr.cpp gdate.cpp gfile.cpp gpath.cpp gfs_unix.cpp gexception.cpp glogoutput.cpp
@SMALL_FRAGMENTS_FALSE@FRAGMENTS_SOURCES = gstr.cpp gdate.cpp gfile.cpp gpath.cpp gfs_unix.cpp gexception.cpp glogoutput.cpp
@SMALL_FRAGMENTS_TRUE@FRAGMENTS_SOURCES =
EXTRA_DIST = \
$(EXEC_EXTRA_DIST) \
$(FRAGMENTS_EXTRA_DIST) \
$(IDENTITY_EXTRA_DIST) \
$(GLOB_EXTRA_DIST) \
$(MAC_EXTRA_DIST) \
garg_win32.cpp \
gcleanup_win32.cpp \
gdaemon_win32.cpp \
gdatetime_win32.cpp \
gdirectory_win32.cpp \
gexecutable_win32.cpp \
gfile_win32.cpp \
gfs_win32.cpp \
ghostname_win32.cpp \
gidentity_win32.cpp \
glogoutput_win32.cpp \
gprocess_win32.cpp \
gfile_win32.cpp \
gnewprocess_win32.cpp \
mingw.mak
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
noinst_LIBRARIES = libglib.a
libglib_a_SOURCES = \
$(EXEC_SOURCES) \
$(FRAGMENTS_SOURCES) \
$(IDENTITY_SOURCES) \
$(GLOB_SOURCES) \
$(MAC_SOURCES) \
md5.cpp \
md5.h \
garg.cpp \
garg.h \
garg_unix.cpp \
gassert.h \
gconvert.h \
gcleanup.h \
@ -220,7 +280,6 @@ libglib_a_SOURCES = \
gcounter.h \
gdaemon.h \
gdaemon_unix.cpp \
gdate.cpp \
gdate.h \
gdatetime.cpp \
gdatetime.h \
@ -230,30 +289,28 @@ libglib_a_SOURCES = \
gdirectory.cpp \
gdirectory.h \
gdirectory_unix.cpp \
gexception.cpp \
gexception.h \
gexecutable_unix.cpp \
gexecutable.cpp \
gexecutable.h \
gfile.cpp \
gfile.h \
gfile_unix.cpp \
gfs.h \
gfs_unix.cpp \
ggetopt.cpp \
ggetopt.h \
ggetopt.cpp \
ghostname_unix.cpp \
ghostname.h \
gidentity.h \
gidentity_unix.cpp \
glimits.h \
glog.cpp \
glog.h \
glogoutput.cpp \
glogoutput.h \
glogoutput_unix.cpp \
gnewprocess.h \
gmd5_native.cpp \
gmd5.h \
gmemory.h \
gnoncopyable.h \
gpath.cpp \
gpath.h \
gpidfile.cpp \
gpidfile.h \
@ -267,7 +324,6 @@ libglib_a_SOURCES = \
gslot.cpp \
gslot.h \
gstatemachine.h \
gstr.cpp \
gstr.h \
gstrings.h \
gtest.cpp \
@ -325,6 +381,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg_mac.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcleanup_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcounter.Po@am__quote@
@ -334,6 +391,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdatetime_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory_unix_glob.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory_unix_noglob.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexception.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexecutable.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexecutable_unix.Po@am__quote@
@ -341,11 +400,15 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfs_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggetopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ghostname_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gidentity_disabled.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gidentity_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glogoutput.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glogoutput_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmd5_native.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnewprocess_unix_exec_disabled.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnewprocess_unix_exec_enabled.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpidfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gprocess_unix.Po@am__quote@
@ -376,8 +439,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@ -389,8 +452,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -400,13 +463,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -33,6 +33,7 @@ G::Arg::Arg( int argc , char *argv[] )
for( int i = 0 ; i < argc ; i++ )
m_array.push_back( argv[i] ) ;
setExe() ;
setPrefix() ;
}
@ -42,6 +43,8 @@ G::Arg::~Arg()
G::Arg::Arg()
{
setExe() ;
setPrefix() ;
// now use parse()
}
@ -69,71 +72,6 @@ void G::Arg::setPrefix()
m_prefix = path.basename() ;
}
void G::Arg::parse( HINSTANCE hinstance , const std::string & command_line )
{
m_array.push_back( moduleName(hinstance) ) ;
parseCore( command_line ) ;
setPrefix() ;
}
void G::Arg::reparse( const std::string & command_line )
{
while( m_array.size() > 1U ) m_array.pop_back() ;
parseCore( command_line ) ;
}
void G::Arg::parseCore( const std::string & command_line )
{
std::string s( command_line ) ;
protect( s ) ;
G::Str::splitIntoTokens( s , m_array , " " ) ;
unprotect( m_array ) ;
dequote( m_array ) ;
}
void G::Arg::protect( std::string & s )
{
// replace all quoted spaces with a replacement
// (could do better: escaped quotes, tabs, single quotes)
G_DEBUG( "protect: before: " << Str::printable(s) ) ;
bool in_quote = false ;
const char quote = '"' ;
const char space = ' ' ;
const char replacement = '\0' ;
for( std::string::size_type pos = 0U ; pos < s.length() ; pos++ )
{
if( s.at(pos) == quote ) in_quote = ! in_quote ;
if( in_quote && s.at(pos) == space ) s[pos] = replacement ;
}
G_DEBUG( "protect: after: " << Str::printable(s) ) ;
}
void G::Arg::unprotect( StringArray & array )
{
// restore replacements to spaces
const char space = ' ' ;
const char replacement = '\0' ;
for( StringArray::iterator p = array.begin() ; p != array.end() ; ++p )
{
std::string & s = *p ;
G::Str::replaceAll( s , std::string(1U,replacement) , std::string(1U,space) ) ;
}
}
void G::Arg::dequote( StringArray & array )
{
// remove quotes if first and last characters
char qq = '\"' ;
for( StringArray::iterator p = array.begin() ; p != array.end() ; ++p )
{
std::string & s = *p ;
if( s.length() > 1U && s.at(0U) == qq && s.at(s.length()-1U) == qq )
{
s = s.substr(1U,s.length()-2U) ;
}
}
}
bool G::Arg::contains( const std::string & sw , size_type sw_args , bool cs ) const
{
return find( cs , sw , sw_args , NULL ) ;

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -34,10 +34,12 @@ namespace G
/// \class G::Arg
/// A class which holds a represention of the
/// argc/argv command line array. Also does simple command line
/// parsing, and, under Windows, command line splitting (the
/// single command line string is split into an argv[] array,
/// including argv[0]).
/// argc/argv command line array. In some environments the
/// argv(0) path is fixed up so that it refers to the calling
/// executable regardless of what the exec()ing process
/// specified.
///
/// Also supports simple command line parsing.
///
/// \see G::GetOpt
///
@ -47,7 +49,8 @@ public:
typedef unsigned int size_type ;
Arg( int argc , char *argv[] ) ;
///< Constructor taking argc/argv.
///< Constructor taking argc/argv. Should not
///< be used in a shared object or dll.
Arg() ;
///< Default constructor for Windows.
@ -58,8 +61,6 @@ public:
///<
///< Parses the given command line, splitting
///< it up into an array of tokens.
///< The full exe name is automatically
///< added as the first token (cf. argv[0]).
void reparse( const std::string & command_line ) ;
///< Reinitialises the object with the given
@ -81,15 +82,15 @@ public:
std::string prefix() const ;
///< Returns the basename of v(0) without
///< any extension.
///< any extension. Typically used in error
///< messages.
static const char * prefix( char * argv[] ) ; // throw()
///< An exception-free version of prefix() which can
///< be used in main() outside of the outermost try
///< block.
bool contains( const std::string & sw ,
size_type sw_args = 0U , bool case_sensitive = true ) const ;
bool contains( const std::string & sw , size_type sw_args = 0U , bool case_sensitive = true ) const ;
///< Returns true if the command line
///< contains the given switch with enough
///< command line arguments left to satisfy
@ -117,6 +118,7 @@ private:
static std::string moduleName( HINSTANCE h ) ;
bool find( bool , const std::string & , size_type , size_type * ) const ;
void setPrefix() ;
void setExe() ;
static bool match( bool , const std::string & , const std::string & ) ;
void parseCore( const std::string & ) ;
static void protect( std::string & ) ;

33
src/glib/garg_mac.cpp Normal file
View File

@ -0,0 +1,33 @@
//
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
// ===
//
// garg_mac.cpp
//
#include "gdef.h"
#include "garg.h"
#include "gfile.h"
#include <cstdlib> // std::getenv()
void G::Arg::setExe()
{
const char * p = std::getenv( "_" ) ;
if( p != NULL && *p != '\0' && G::File::exists(p) )
m_array[0] = p ;
}
/// \file garg_mac.cpp

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -20,11 +20,35 @@
#include "gdef.h"
#include "garg.h"
#include "gdebug.h"
#include "gstr.h"
#include "glimits.h"
#include <sstream>
#include <sys/types.h> // pid_t
#include <unistd.h> // getpid(), readlink()
std::string G::Arg::moduleName( HINSTANCE )
void G::Arg::setExe()
{
return std::string() ;
// better than nothing?
char buffer[limits::path] = { '\0' } ;
int n = ::readlink( "/proc/self" , buffer , sizeof(buffer) ) ;
if( n > 0 )
{
std::ostringstream ss ;
ss << ::getpid() ;
bool procfs = std::string(buffer,n) == ss.str() ;
if( procfs )
{
n = ::readlink( "/proc/self/exe" , buffer , sizeof(buffer) ) ;
if( n > 0 )
m_array[0] = std::string(buffer,n) ;
}
}
else
{
// could use getenv("_") on some systems, but
// too unreliable in general
}
}
/// \file garg_unix.cpp

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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
@ -20,11 +20,21 @@
#include "gdef.h"
#include "garg.h"
#include "glimits.h"
#include "gstr.h"
#include "gdebug.h"
void G::Arg::setExe()
{
if( m_array.empty() )
m_array.push_back( moduleName(NULL) ) ;
else
m_array[0] = moduleName( NULL ) ;
}
std::string G::Arg::moduleName( HINSTANCE hinstance )
{
char buffer[10000U] ;
char buffer[limits::path] ;
size_t size = sizeof(buffer) ;
*buffer = '\0' ;
::GetModuleFileName( hinstance , buffer , size-1U ) ;
@ -32,4 +42,77 @@ std::string G::Arg::moduleName( HINSTANCE hinstance )
return std::string(buffer) ;
}
void G::Arg::parse( HINSTANCE hinstance , const std::string & command_line )
{
m_array.clear() ;
m_array.push_back( moduleName(hinstance) ) ;
parseCore( command_line ) ;
setPrefix() ;
}
void G::Arg::reparse( const std::string & command_line )
{
while( m_array.size() > 1U ) m_array.pop_back() ;
parseCore( command_line ) ;
}
void G::Arg::parseCore( const std::string & command_line )
{
std::string s( command_line ) ;
protect( s ) ;
G::Str::splitIntoTokens( s , m_array , " " ) ;
unprotect( m_array ) ;
dequote( m_array ) ;
}
void G::Arg::protect( std::string & s )
{
// replace all quoted spaces with a replacement
// (could do better: escaped quotes, tabs, single quotes)
G_DEBUG( "protect: before: " << Str::printable(s) ) ;
bool in_quote = false ;
const char quote = '"' ;
const char space = ' ' ;
const char replacement = '\0' ;
for( std::string::size_type pos = 0U ; pos < s.length() ; pos++ )
{
if( s.at(pos) == quote ) in_quote = ! in_quote ;
if( in_quote && s.at(pos) == space ) s[pos] = replacement ;
}
G_DEBUG( "protect: after: " << Str::printable(s) ) ;
}
void G::Arg::unprotect( StringArray & array )
{
// restore replacements to spaces
const char space = ' ' ;
const char replacement = '\0' ;
for( StringArray::iterator p = array.begin() ; p != array.end() ; ++p )
{
std::string & s = *p ;
G::Str::replaceAll( s , std::string(1U,replacement) , std::string(1U,space) ) ;
}
}
void G::Arg::dequote( StringArray & array )
{
// remove quotes if first and last characters (or equivalent)
char qq = '\"' ;
for( StringArray::iterator p = array.begin() ; p != array.end() ; ++p )
{
std::string & s = *p ;
if( s.length() > 1U )
{
std::string::size_type start = s.at(0U) == qq ? 0U : s.find("=\"") ;
if( start != std::string::npos && s.at(start) != qq ) ++start ;
std::string::size_type end = s.at(s.length()-1U) == qq ? (s.length()-1U) : std::string::npos ;
if( start != std::string::npos && end != std::string::npos && start != end )
{
s.erase( end , 1U ) ; // first!
s.erase( start , 1U ) ;
}
}
}
}
/// \file garg_win32.cpp

View File

@ -1,5 +1,5 @@
//
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// Copyright (C) 2001-2008 Graeme Walker <graeme_walker@users.sourceforge.net>
//
// 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

Some files were not shown because too many files have changed in this diff Show More