Autotools and libtool support.
This commit is contained in:
parent
8b8cf2b543
commit
da55bd2c26
@ -2,6 +2,13 @@
|
|||||||
VERSION 0.6.1-cvs
|
VERSION 0.6.1-cvs
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
2004-12-27 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
|
* Added support for 'libtool'. All files needed for autoconf/automake
|
||||||
|
can be generated with SConstruct script, using the 'autotools'
|
||||||
|
target ("scons autotools"). These are also built and included
|
||||||
|
automatically in the distribution tarball ("scons dist").
|
||||||
|
|
||||||
2004-12-26 Vincent Richard <vincent@vincent-richard.net>
|
2004-12-26 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
* Removed relative paths from #include's and moved all header files
|
* Removed relative paths from #include's and moved all header files
|
||||||
@ -71,7 +78,7 @@ VERSION 0.6.0
|
|||||||
|
|
||||||
For example, to use the default platform handler for POSIX (GNU/Linux):
|
For example, to use the default platform handler for POSIX (GNU/Linux):
|
||||||
|
|
||||||
#include <vmime/platforms/posix/handler.hpp>
|
#include <vmime/platforms/posix/posixHandler.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
932
SConstruct
932
SConstruct
File diff suppressed because it is too large
Load Diff
74
bootstrap
Executable file
74
bootstrap
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Bootstrap file for 'autotools' build
|
||||||
|
#
|
||||||
|
|
||||||
|
export WANT_AUTOCONF_2_5=1
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
|
amvers="no"
|
||||||
|
|
||||||
|
if automake-1.8 --version >/dev/null 2>&1; then
|
||||||
|
amvers="-1.8"
|
||||||
|
#if automake-1.7 --version >/dev/null 2>&1; then
|
||||||
|
# amvers="-1.7"
|
||||||
|
#elif automake-1.6 --version >/dev/null 2>&1; then
|
||||||
|
# amvers="-1.6"
|
||||||
|
#elif automake-1.5 --version >/dev/null 2>&1; then
|
||||||
|
# amvers="-1.5"
|
||||||
|
elif automake --version > /dev/null 2>&1; then
|
||||||
|
amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
|
||||||
|
# if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
|
||||||
|
if expr "$amvers" "<" "1.8" > /dev/null 2>&1; then
|
||||||
|
amvers="no"
|
||||||
|
else
|
||||||
|
amvers=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$amvers" = "no"; then
|
||||||
|
echo "$0: you need automake version 1.8 or later"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh INSTALL
|
||||||
|
rm -Rf autom4te.cache
|
||||||
|
(mkdir autotools >& /dev/null)
|
||||||
|
(cd autotools && rm -f config.guess config.sub missing mkinstalldirs compile ltmain.sh depcomp install-sh)
|
||||||
|
|
||||||
|
DIE=0
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if test $DIE = 0 ; then
|
||||||
|
echo -n "* Running aclocal... " ; (aclocal${amvers} >& bootstrap.tmpout) \
|
||||||
|
&& (echo "[OK]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout) \
|
||||||
|
|| (echo "[NO]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout ; not_a_command >& /dev/null) || DIE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $DIE = 0 ; then
|
||||||
|
echo -n "* Running autoconf... " ; (autoconf >& bootstrap.tmpout) \
|
||||||
|
&& (echo "[OK]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout) \
|
||||||
|
|| (echo "[NO]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout ; not_a_command >& /dev/null) || DIE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $DIE = 0 ; then
|
||||||
|
echo -n "* Running autoheader... " ; (autoheader >& bootstrap.tmpout) \
|
||||||
|
&& (echo "[OK]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout) \
|
||||||
|
|| (echo "[NO]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout ; not_a_command >& /dev/null) || DIE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $DIE = 0 ; then
|
||||||
|
echo -n "* Running libtoolize... " ; (libtoolize --copy --force --automake >& bootstrap.tmpout) \
|
||||||
|
&& (echo "[OK]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout) \
|
||||||
|
|| (echo "[NO]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout ; not_a_command >& /dev/null) || DIE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $DIE = 0 ; then
|
||||||
|
echo -n "* Running automake... " ; (automake${amvers} --add-missing --copy >& bootstrap.tmpout) \
|
||||||
|
&& (echo "[OK]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout) \
|
||||||
|
|| (echo "[NO]" ; cat bootstrap.tmpout ; rm -f bootstrap.tmpout ; not_a_command >& /dev/null) || DIE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
@ -30,7 +30,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//
|
//
|
||||||
|
// VMime library (http://vmime.sourceforge.net)
|
||||||
// Copyright (C) 2002-2004 Vincent Richard <vincent@vincent-richard.net>
|
// Copyright (C) 2002-2004 Vincent Richard <vincent@vincent-richard.net>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
@ -29,7 +30,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -75,6 +75,12 @@ const string libname() { return (VMIME_PACKAGE); }
|
|||||||
*/
|
*/
|
||||||
const string libversion() { return (VMIME_VERSION " (" __DATE__ " " __TIME__ ")"); }
|
const string libversion() { return (VMIME_VERSION " (" __DATE__ " " __TIME__ ")"); }
|
||||||
|
|
||||||
|
/** Return the library API version (eg. "6:1:6").
|
||||||
|
*
|
||||||
|
* @return library API version
|
||||||
|
*/
|
||||||
|
const string libapi() { return (VMIME_API); }
|
||||||
|
|
||||||
|
|
||||||
// New line sequence to be used when folding header fields.
|
// New line sequence to be used when folding header fields.
|
||||||
const string NEW_LINE_SEQUENCE = "\r\n ";
|
const string NEW_LINE_SEQUENCE = "\r\n ";
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "vmime/exception.hpp"
|
#include "vmime/exception.hpp"
|
||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
|
|
||||||
#include "builtinServices.inl"
|
#include "src/messaging/builtinServices.inl"
|
||||||
|
|
||||||
|
|
||||||
namespace vmime {
|
namespace vmime {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
using namespace unitpp;
|
using namespace unitpp;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
using namespace unitpp;
|
using namespace unitpp;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
#include "tests/parser/testUtils.hpp"
|
#include "tests/parser/testUtils.hpp"
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
using namespace unitpp;
|
using namespace unitpp;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "vmime/vmime.hpp"
|
#include "vmime/vmime.hpp"
|
||||||
#include "vmime/platforms/posix/handler.hpp"
|
#include "vmime/platforms/posix/posixHandler.hpp"
|
||||||
|
|
||||||
#include "tests/parser/testUtils.hpp"
|
#include "tests/parser/testUtils.hpp"
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ namespace vmime
|
|||||||
|
|
||||||
const string libname();
|
const string libname();
|
||||||
const string libversion();
|
const string libversion();
|
||||||
|
const string libapi();
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -70,23 +70,23 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
smart_ptr() : m_data(NULL) { }
|
smart_ptr() : m_data(NULL) { }
|
||||||
smart_ptr(T* const ptr) : m_data(NULL) { if (ptr) { attach(ptr); } }
|
smart_ptr(T* const p) : m_data(NULL) { if (p) { attach(p); } }
|
||||||
smart_ptr(smart_ptr& ptr) : m_data(NULL) { if (ptr.m_data) { attach(ptr); } }
|
smart_ptr(smart_ptr& p) : m_data(NULL) { if (p.m_data) { attach(p); } }
|
||||||
|
|
||||||
~smart_ptr() { detach(); }
|
~smart_ptr() { detach(); }
|
||||||
|
|
||||||
smart_ptr& operator=(smart_ptr& ptr)
|
smart_ptr& operator=(smart_ptr& p)
|
||||||
{
|
{
|
||||||
attach(ptr);
|
attach(p);
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
smart_ptr& operator=(T* const ptr)
|
smart_ptr& operator=(T* const p)
|
||||||
{
|
{
|
||||||
if (!ptr)
|
if (!p)
|
||||||
detach();
|
detach();
|
||||||
else
|
else
|
||||||
attach(ptr);
|
attach(p);
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
@ -123,11 +123,11 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void attach(T* const ptr)
|
void attach(T* const p)
|
||||||
{
|
{
|
||||||
detach();
|
detach();
|
||||||
|
|
||||||
typename MapType::iterator it = sm_map.find(ptr);
|
typename MapType::iterator it = sm_map.find(p);
|
||||||
|
|
||||||
if (it != sm_map.end())
|
if (it != sm_map.end())
|
||||||
{
|
{
|
||||||
@ -137,15 +137,15 @@ private:
|
|||||||
{
|
{
|
||||||
m_data = new data;
|
m_data = new data;
|
||||||
m_data->refCount = 1;
|
m_data->refCount = 1;
|
||||||
m_data->ptr = ptr;
|
m_data->ptr = p;
|
||||||
|
|
||||||
sm_map.insert(typename MapType::value_type(ptr, m_data));
|
sm_map.insert(typename MapType::value_type(p, m_data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void attach(smart_ptr <T>& ptr)
|
void attach(smart_ptr <T>& p)
|
||||||
{
|
{
|
||||||
data* newData = ptr.m_data;
|
data* newData = p.m_data;
|
||||||
if (newData) newData->refCount++;
|
if (newData) newData->refCount++;
|
||||||
|
|
||||||
detach();
|
detach();
|
||||||
|
Loading…
Reference in New Issue
Block a user