|
From: Jeff S. <jsq...@us...> - 2002-10-30 12:31:01
|
jsquyres 02/10/30 04:31:00
Added: . .cvsignore LICENSE Makefile.am acinclude.m4
autogen.sh configure.in
Log:
First take of skeleton structure for maildb
Revision Changes Path
1.1 maildb/.cvsignore
Index: .cvsignore
===================================================================
Makefile
Makefile.in
autom4te.cache
config.log
config.status
libtool
aclocal.m4
configure
1.1 maildb/LICENSE
Index: LICENSE
===================================================================
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. The name of the author may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
1.1 maildb/Makefile.am
Index: Makefile.am
===================================================================
# -*- makefile -*-
#
# Copyright (c) 2002 Jeff Squyres
#
# This file is part of the MailDB software package. For license
# information, see the LICENSE file in the top level directory of the
# MailDB source distribution.
#
# $Id: Makefile.am,v 1.1 2002/10/30 12:31:00 jsquyres Exp $
#
SUBDIRS = dist libmaildb
EXTRA_DIST = LICENSE README
#
# For making the distribution. MailDB maintainers only. It won't work
# for you. :-)
#
dist-hook:
csh -f dist/distscript.csh $(DESTDIR)$(distdir)
1.1 maildb/acinclude.m4
Index: acinclude.m4
===================================================================
# -*- makefile -*-
#
# Copyright (c) 2002 Jeff Squyres
#
# This file is part of the MailDB software package. For license
# information, see the LICENSE file in the top level directory of the
# MailDB source distribution.
#
# $Id: acinclude.m4,v 1.1 2002/10/30 12:31:00 jsquyres Exp $
#
sinclude(dist/maildb_functions.m4)
sinclude(dist/maildb_get_version.m4)
1.1 maildb/autogen.sh
Index: autogen.sh
===================================================================
#! /bin/sh
#
# $Id: autogen.sh,v 1.1 2002/10/30 12:31:00 jsquyres Exp $
#
# Copyright (c) 2002 Jeff Squyres
#
# This file is part of the MailDB software package. For license
# information, see the LICENSE file in the top level directory of the
# MailDB source distribution.
#
# This script is run on developer copies of MailDB -- *not*
# distribution tarballs.
#
# Some helper functions
#
#
# Subroutine to check for the existence of various standard GNU tools
#
test_for_existence() {
tfe_prog="$1"
tfe_foo="`$tfe_prog --version`"
if test "$?" != 0; then
cat <<EOF
You must have GNU autoconf, automake, and libtool installed to build
the developer's version of MailDB. You can obtain these packages
from ftp://ftp.gnu.org/gnu/.
EOF
# Stupid emacs: '
exit 1
fi
unset tfe_prog tfe_foo
}
#
# Subroutine to execite the standard GNU tools, and if they fail,
# print out a warning.
#
run_and_check() {
rac_progs="$*"
echo "$rac_progs"
eval $rac_progs
if test "$?" != 0; then
cat <<EOF
It seems that the execution of "$progs" has failed.
I am gonna abort. :-(
This may be caused by an older version of one of the required
packages. Please make sure you are using at least the following
versions:
GNU Autoconf 2.52
GNU Automake 1.5
GNU Libtool 1.4.2
EOF
exit 1
fi
unset rac_progs
}
#
# Subroutine to look for standard files in a number of common places
# (e.g., ./config.guess, config/config.guess, dist/config.guess), and
# delete it. If it's not found there, look for AC_CONFIG_AUX_DIR in
# the configure.in script and try there. If it's not there, oh well.
#
find_and_delete() {
fad_file="$1"
# Look for the file in "standard" places
if test -f $fad_file; then
rm -f $fad_file
elif test -d config/$fad_file; then
rm -f config/$fad_file
elif test -d dist/$fad_file; then
rm -f dist/$fad_file
else
# Didn't find it -- look for an AC_CONFIG_AUX_DIR line in
# configure.[in|ac]
if test -f configure.in; then
fad_cfile=configure.in
elif test -f configure.ac; then
fad_cfile=configure.ac
else
echo "--> Errr... there's no configure.in or configure.ac file!"
fi
if test -n "$fad_cfile"; then
auxdir="`grep AC_CONFIG_AUX_DIR $fad_cfile | cut -d\( -f 2 | cut -d\) -f 1`"
fi
if test -f "$auxdir/$fad_file"; then
rm -f "$auxdir/$fad_file"
fi
unset fad_cfile
fi
unset fad_file
}
#
# Subroutine to actually do the GNU tool setup in the proper order, etc.
#
run_gnu_tools() {
rgt_dir="$1"
rgt_cur_dir="`pwd`"
if test -d "$rgt_dir"; then
cd "$rgt_dir"
# See if the package doesn't want us to set it up
if test -f .maildb_no_gnu; then
cat <<EOF
*** Found .maildb_no_gnu file -- skipping GNU setup in:
*** `pwd`
EOF
elif test -f .maildb_ignore; then
cat <<EOF
*** Found .maildb_ignore file -- skipping entire tree:
*** `pwd`
EOF
elif test "$rgt_dir" != "." -a -x autogen.sh; then
cat <<EOF
*** Found custom autogen.sh file in:
*** `pwd`
EOF
./autogen.sh
else
cat <<EOF
*** Running GNU tools in directory:
*** `pwd`
EOF
# Sanity check to ensure that there's a configure.in or
# configure.ac file here
if test -f configure.in -o -f configure.ac; then
happy=1
else
echo "---> Err... there's no configure.in or configure.ac file in this directory"
echo "---> I'm confused, so I'm going to abort"
exit 1
fi
unset happy
# Find and delete the GNU helper script files
find_and_delete config.guess
find_and_delete config.sub
find_and_delete depcomp
find_and_delete install-sh
find_and_delete ltconfig
find_and_delete ltmain.sh
find_and_delete missing
find_and_delete mkinstalldirs
find_and_delete libtool
# Run the GNU tools
run_and_check aclocal
run_and_check autoheader
run_and_check autoconf
run_and_check libtoolize --automake --copy
run_and_check automake --foreign -a --copy --include-deps
fi
# Go back to the original directory
cd "$rgt_cur_dir"
fi
unset rgt_dir rgt_cur_dir
}
#
# Subroutine to run in just one directory
#
run_local() {
run_gnu_tools .
}
#
# Subroutine to run across the entire MailDB tree
#
run_global() {
# Run the config in the top-level directory
run_gnu_tools .
# Now run the config in every directory in share/ssi/*/* that has
# a configure.in or configure.ac script
for db in libmaildb/db/*; do
if test -d "$db"; then
if test -f "$db/configure.in" -o -f "$db/configure.ac"; then
run_gnu_tools "$db"
fi
fi
done
unset db
}
##########################################################################
# Main
##########################################################################
# Check the command line to see if we should run the whole shebang, or
# just in this current directory.
want_local=0
for arg in $*; do
case $arg in
-l) want_local=1 ;;
*) ;;
esac
done
# Are we in the right directory? We must be in the top-level MailDB
# directory.
if test "$want_local" = "0"; then
if test -f dist/VERSION -a -f configure.in ; then
bad=0
else
cat <<EOF
You must run this script from the top-level MailDB directory.
EOF
exit 1
fi
fi
test_for_existence autoconf
test_for_existence automake
test_for_existence libtool
# Now do the run
if test "$want_local" = "1"; then
run_local
else
run_global
fi
# All done
exit 0
1.1 maildb/configure.in
Index: configure.in
===================================================================
# -*- shell-script -*-
#
# Copyright (c) 2002 Jeff Squyres
#
# This file is part of the MailDB software package. For license
# information, see the LICENSE file in the top level directory of the
# MailDB source distribution.
#
# $Id: configure.in,v 1.1 2002/10/30 12:31:00 jsquyres Exp $
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
# Init autoconf
AC_INIT(./LICENSE)
AC_PREREQ(2.52)
AC_CONFIG_AUX_DIR(./dist)
# Get the version of MailDB that we are installing
MAILDB_GET_VERSION($srcdir/dist, $srcdir/dist/VERSION, MAILDB)
AC_DEFINE_UNQUOTED(MAILDB_MAJOR_VERSION, $MAILDB_MAJOR_VERSION,
[Major MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_MINOR_VERSION, $MAILDB_MINOR_VERSION,
[Minor MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_RELEASE_VERSION, $MAILDB_RELEASE_VERSION,
[Release MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_ALPHA_VERSION, $MAILDB_ALPHA_VERSION,
[Alpha MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_BETA_VERSION, $MAILDB_BETA_VERSION,
[Beta MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_CVS_VERSION, $MAILDB_CVS_VERSION,
[CVS MAILDB version])
AC_DEFINE_UNQUOTED(MAILDB_VERSION, "$MAILDB_VERSION",
[Overall MAILDB version number])
# Need to also AC_SUBST these for share/include/patchlevel.h and
# share/include/mpif.h
AC_SUBST(MAILDB_MAJOR_VERSION)
AC_SUBST(MAILDB_MINOR_VERSION)
AC_SUBST(MAILDB_RELEASE_VERSION)
AC_SUBST(MAILDB_ALPHA_VERSION)
AC_SUBST(MAILDB_BETA_VERSION)
AC_SUBST(MAILDB_CVS_VERSION)
AC_SUBST(MAILDB_VERSION)
#
# Start it up
#
MAILDB_CONFIGURE_SETUP
maildb_show_title "Configuring MailDB version $MAILDB_VERSION"
maildb_show_subtitle "Initialization, setup"
#
# Init automake
# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and
# VERSION macors
#
AM_INIT_AUTOMAKE(maildb, $MAILDB_VERSION, 'no')
# Setup the top of the share/include/maildb_config.h file
AH_TOP([/* -*- c -*-
*
* Copyright (c) 2002 Jeff Squyres
*
* This file is part of the MailDB software package. For license
* information, see the LICENSE file in the top level directory of the
* MailDB source distribution.
*
* Function: - OS, CPU and compiler dependent configuration
*/
#ifndef _MAILDB_CONFIG_H
#define _MAILDB_CONFIG_H
])
AH_BOTTOM([#endif /* _MAILDB_CONFIG_H */])
#
# This is useful later
#
MAILDB_BASIC_SETUP
############################################################################
# libtool magic
############################################################################
maildb_show_subtitle "GNU libtool setup"
AM_PROG_LIBTOOL
############################################################################
# Party on
############################################################################
maildb_show_subtitle "Final output"
AM_CONFIG_HEADER([libmaildb/common/maildb_config.h])
AC_CONFIG_FILES([
Makefile
dist/Makefile
libmaildb/Makefile
libmaildb/common/Makefile
libmaildb/db/Makefile
])
AC_OUTPUT
|