diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-16 01:30:44 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-16 01:37:24 +0200 |
commit | 5000c56d29cf616c8df80f8ec9a19682769f512e (patch) | |
tree | d2cc46fda9e8905bdd2fb81bffdaf3a58898be53 /configure.ac | |
parent | a72cd5987c404080f18ba40bdc4c06811493ab1c (diff) | |
download | wydawca-5000c56d29cf616c8df80f8ec9a19682769f512e.tar.gz wydawca-5000c56d29cf616c8df80f8ec9a19682769f512e.tar.bz2 |
Rewrite configuration parser, drop dependency on GSC
* bootstrap: Replaced with a modified version from gnulib.
* configure.ac: Bump version to 1.9.90
(--without-preprocessor): New option
Require Mailutils 2.0
(AC_CONFIG_FILES): Remove lib, add gconf
* gconf/: New directory. Contains general-purpose configuration file
parser, distilled from Dico and Mailutils.
* src/Makefile.am (wydawca_SOURCES): Add interval.c
* src/pp-setup, src/update-2.0.awk: New files.
* src/config.c: Full rewrite.
* src/exec.c (start_prog): Use getdtablesize unconditionally.
* src/mail.c: Keep templates in a hash table.
Template references begin with a single @
* src/process.c, src/triplet.c, src/verify.c: Reflect changes to struct
directory_pair
* src/wydawca.c: Change configuration parsing.
* src/wydawca.h (enum access_method_id): New constants
(struct directory_pair): Replace four access methods with an array.
* Makefile.am (SUBDIRS): Remove lib, add gconf
* .gitignore, NEWS, doc/.gitignore, src/.gitignore
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 79deed7..bc612af 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # along with wydawca. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ(2.59) -AC_INIT([wydawca], 1.2, [bug-wydawca@gnu.org.ua]) +AC_INIT([wydawca], 1.9.90, [bug-wydawca@gnu.org.ua]) AC_CONFIG_SRCDIR([src/wydawca.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADER([config.h]) @@ -76,7 +76,7 @@ fi # Mailutils # ********************** -AM_GNU_MAILUTILS(1.0, [mailer], [:]) +AM_GNU_MAILUTILS(2.0, [mailer], [:]) # ********************** # MySQL @@ -107,6 +107,48 @@ MU_CHECK_LIB([gpgme],[main],[], [ AC_MSG_FAILURE([The requested library libgpgme is not found or is unusable])], [/usr/pkg/lib /opt/lib /sw/lib]) +# ********************** +# Preprocessor +# ********************** +AC_ARG_WITH([preprocessor], + AC_HELP_STRING([--without-preprocessor], + [do not use external preprocessor]), + [ +case "${withval}" in +yes) use_ext_pp=yes ;; +no) use_ext_pp=no ;; +*) AC_MSG_ERROR(bad value ${withval} for --with-preprocessor) ;; +esac],[use_ext_pp=yes]) + +if test $use_ext_pp != no; then + # Check for default preprocessor + AC_ARG_VAR([DEFAULT_PREPROCESSOR], + [Set default preprocessor name]) + if test -z "$DEFAULT_PREPROCESSOR" ; then + DEFAULT_PREPROCESSOR="m4 -s" + fi + + save_PATH=$PATH + PREPROC_OPTIONS=`echo $DEFAULT_PREPROCESSOR | sed -n 's/[[^ ]][[^ ]]* //p'` + case "$DEFAULT_PREPROCESSOR" in + /*) PATH=`expr $DEFAULT_PREPROCESSOR : '\(.*\)/.*'`:$PATH + DEFAULT_PREPROCESSOR=`expr $DEFAULT_PREPROCESSOR : '.*/\(.*\)'`;; + esac + AC_PATH_PROG(PPBIN, $DEFAULT_PREPROCESSOR) + DEFAULT_PREPROCESSOR=$PPBIN + if test -n "$DEFAULT_PREPROCESSOR"; then + DEFAULT_PREPROCESSOR="$DEFAULT_PREPROCESSOR $PREPROC_OPTIONS" + case $PPBIN in + *m4) AC_SUBST(PP_SETUP_FILE,'pp-setup');; # Install default pp-setup + esac + fi + PATH=$save_PATH + DEFAULT_PREPROCESSOR="\\\"$DEFAULT_PREPROCESSOR\\\"" +else + DEFAULT_PREPROCESSOR=NULL +fi + + AH_BOTTOM([ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) @@ -120,7 +162,7 @@ AH_BOTTOM([ AC_CONFIG_FILES([Makefile doc/Makefile gnu/Makefile - lib/Makefile + gconf/Makefile src/Makefile etc/Makefile]) |