Skip to content

Commit 7fd9ac7

Browse files
Jose Kahanjkbzh
authored andcommitted
- autoconf wasn't handling the trio library since the autoconf version update. - Removed the Makefile patch to src/trio/Makefile as I found a way to pass the subdir config options in the main configure.ac file.
1 parent 9dc65fb commit 7fd9ac7

File tree

6 files changed

+155
-244
lines changed

6 files changed

+155
-244
lines changed

configure

Lines changed: 145 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.ac Revision: 1.8 .
2+
# From configure.ac Revision: 1.1 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.67.
55
#
@@ -605,7 +605,6 @@ PCRE_DEP
605605
PCRE_CONFIG
606606
EGREP
607607
GREP
608-
subdirs
609608
domainaddr
610609
defaultindex
611610
htmlsuffix
@@ -708,7 +707,7 @@ CPPFLAGS
708707
CPP
709708
YACC
710709
YFLAGS'
711-
ac_subdirs_all='SUBDIRS'
710+
712711

713712
# Initialize some variables set by options.
714713
ac_init_help=
@@ -2205,8 +2204,6 @@ GDBM_LIB=""
22052204
PCRE_DEP=""
22062205
FNV_DEP=""
22072206

2208-
SUBDIRS="src/trio"
2209-
22102207

22112208
ac_aux_dir=
22122209
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -3755,7 +3752,149 @@ fi
37553752

37563753

37573754

3758-
subdirs="$subdirs SUBDIRS"
3755+
3756+
# save our work to this point; this allows the sub-package to use it
3757+
cat >confcache <<\_ACEOF
3758+
# This file is a shell script that caches the results of configure
3759+
# tests run on this system so they can be shared between configure
3760+
# scripts and configure runs, see configure's option --config-cache.
3761+
# It is not useful on other systems. If it contains results you don't
3762+
# want to keep, you may remove or edit it.
3763+
#
3764+
# config.status only pays attention to the cache file if you give it
3765+
# the --recheck option to rerun configure.
3766+
#
3767+
# `ac_cv_env_foo' variables (set or unset) will be overridden when
3768+
# loading this file, other *unset* `ac_cv_foo' will be assigned the
3769+
# following values.
3770+
3771+
_ACEOF
3772+
3773+
# The following way of writing the cache mishandles newlines in values,
3774+
# but we know of no workaround that is simple, portable, and efficient.
3775+
# So, we kill variables containing newlines.
3776+
# Ultrix sh set writes to stderr and can't be redirected directly,
3777+
# and sets the high bit in the cache file unless we assign to the vars.
3778+
(
3779+
for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
3780+
eval ac_val=\$$ac_var
3781+
case $ac_val in #(
3782+
*${as_nl}*)
3783+
case $ac_var in #(
3784+
*_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3785+
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3786+
esac
3787+
case $ac_var in #(
3788+
_ | IFS | as_nl) ;; #(
3789+
BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3790+
*) { eval $ac_var=; unset $ac_var;} ;;
3791+
esac ;;
3792+
esac
3793+
done
3794+
3795+
(set) 2>&1 |
3796+
case $as_nl`(ac_space=' '; set) 2>&1` in #(
3797+
*${as_nl}ac_space=\ *)
3798+
# `set' does not quote correctly, so add quotes: double-quote
3799+
# substitution turns \\\\ into \\, and sed turns \\ into \.
3800+
sed -n \
3801+
"s/'/'\\\\''/g;
3802+
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3803+
;; #(
3804+
*)
3805+
# `set' quotes correctly as required by POSIX, so do not add quotes.
3806+
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3807+
;;
3808+
esac |
3809+
sort
3810+
) |
3811+
sed '
3812+
/^ac_cv_env_/b end
3813+
t clear
3814+
:clear
3815+
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3816+
t end
3817+
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3818+
:end' >>confcache
3819+
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
3820+
if test -w "$cache_file"; then
3821+
test "x$cache_file" != "x/dev/null" &&
3822+
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3823+
$as_echo "$as_me: updating cache $cache_file" >&6;}
3824+
cat confcache >$cache_file
3825+
else
3826+
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3827+
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
3828+
fi
3829+
fi
3830+
rm -f confcache
3831+
3832+
echo "configuring package in src/trio now"
3833+
ac_popdir=`pwd`
3834+
apr_config_subdirs="src/trio"
3835+
test -d src/trio || $mkdir_p src/trio
3836+
ac_abs_srcdir=`(cd $srcdir/src/trio && pwd)`
3837+
cd src/trio
3838+
3839+
# A "../" for each directory in /$config_subdirs.
3840+
ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3841+
3842+
# Make the cache file pathname absolute for the subdirs
3843+
# required to correctly handle subdirs that might actually
3844+
# be symlinks
3845+
case "$cache_file" in
3846+
/*) # already absolute
3847+
ac_sub_cache_file=$cache_file ;;
3848+
*) # Was relative path.
3849+
ac_sub_cache_file="$ac_popdir/$cache_file" ;;
3850+
esac
3851+
3852+
3853+
apr_configure_args=
3854+
apr_sep=
3855+
for apr_configure_arg in $ac_configure_args
3856+
do
3857+
case "$apr_configure_arg" in
3858+
--with-pcre=*|\'--with-pcre=*)
3859+
continue ;;
3860+
esac
3861+
apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
3862+
apr_sep=" "
3863+
done
3864+
3865+
3866+
test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
3867+
3868+
apr_configure_args="--disable-option-checking $apr_configure_args"
3869+
3870+
if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir CFLAGS=-DTRIO_MINIMAL
3871+
then :
3872+
echo "src/trio configured properly"
3873+
else
3874+
echo "configure failed for src/trio"
3875+
exit 1
3876+
fi
3877+
3878+
cd $ac_popdir
3879+
3880+
# grab any updates from the sub-package
3881+
if test -r "$cache_file"; then
3882+
# Some versions of bash will fail to source /dev/null (special files
3883+
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
3884+
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3885+
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3886+
$as_echo "$as_me: loading cache $cache_file" >&6;}
3887+
case $cache_file in
3888+
[\\/]* | ?:[\\/]* ) . "$cache_file";;
3889+
*) . "./$cache_file";;
3890+
esac
3891+
fi
3892+
else
3893+
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3894+
$as_echo "$as_me: creating cache $cache_file" >&6;}
3895+
>$cache_file
3896+
fi
3897+
37593898
37603899
37613900
@@ -6705,151 +6844,6 @@ if test "$no_create" != yes; then
67056844
# would make configure fail if this is the last instruction.
67066845
$ac_cs_success || as_fn_exit 1
67076846
fi
6708-
6709-
#
6710-
# CONFIG_SUBDIRS section.
6711-
#
6712-
if test "$no_recursion" != yes; then
6713-
6714-
# Remove --cache-file, --srcdir, and --disable-option-checking arguments
6715-
# so they do not pile up.
6716-
ac_sub_configure_args=
6717-
ac_prev=
6718-
eval "set x $ac_configure_args"
6719-
shift
6720-
for ac_arg
6721-
do
6722-
if test -n "$ac_prev"; then
6723-
ac_prev=
6724-
continue
6725-
fi
6726-
case $ac_arg in
6727-
-cache-file | --cache-file | --cache-fil | --cache-fi \
6728-
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6729-
ac_prev=cache_file ;;
6730-
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6731-
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6732-
| --c=*)
6733-
;;
6734-
--config-cache | -C)
6735-
;;
6736-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6737-
ac_prev=srcdir ;;
6738-
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6739-
;;
6740-
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6741-
ac_prev=prefix ;;
6742-
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6743-
;;
6744-
--disable-option-checking)
6745-
;;
6746-
*)
6747-
case $ac_arg in
6748-
*\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6749-
esac
6750-
as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6751-
esac
6752-
done
6753-
6754-
# Always prepend --prefix to ensure using the same prefix
6755-
# in subdir configurations.
6756-
ac_arg="--prefix=$prefix"
6757-
case $ac_arg in
6758-
*\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6759-
esac
6760-
ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6761-
6762-
# Pass --silent
6763-
if test "$silent" = yes; then
6764-
ac_sub_configure_args="--silent $ac_sub_configure_args"
6765-
fi
6766-
6767-
# Always prepend --disable-option-checking to silence warnings, since
6768-
# different subdirs can have different --enable and --with options.
6769-
ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6770-
6771-
ac_popdir=`pwd`
6772-
for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
6773-
6774-
# Do not complain, so a configure script can configure whichever
6775-
# parts of a large source tree are present.
6776-
test -d "$srcdir/$ac_dir" || continue
6777-
6778-
ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6779-
$as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6780-
$as_echo "$ac_msg" >&6
6781-
as_dir="$ac_dir"; as_fn_mkdir_p
6782-
ac_builddir=.
6783-
6784-
case "$ac_dir" in
6785-
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
6786-
*)
6787-
ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
6788-
# A ".." for each directory in $ac_dir_suffix.
6789-
ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
6790-
case $ac_top_builddir_sub in
6791-
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
6792-
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
6793-
esac ;;
6794-
esac
6795-
ac_abs_top_builddir=$ac_pwd
6796-
ac_abs_builddir=$ac_pwd$ac_dir_suffix
6797-
# for backward compatibility:
6798-
ac_top_builddir=$ac_top_build_prefix
6799-
6800-
case $srcdir in
6801-
.) # We are building in place.
6802-
ac_srcdir=.
6803-
ac_top_srcdir=$ac_top_builddir_sub
6804-
ac_abs_top_srcdir=$ac_pwd ;;
6805-
[\\/]* | ?:[\\/]* ) # Absolute name.
6806-
ac_srcdir=$srcdir$ac_dir_suffix;
6807-
ac_top_srcdir=$srcdir
6808-
ac_abs_top_srcdir=$srcdir ;;
6809-
*) # Relative name.
6810-
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
6811-
ac_top_srcdir=$ac_top_build_prefix$srcdir
6812-
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
6813-
esac
6814-
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
6815-
6816-
6817-
cd "$ac_dir"
6818-
6819-
# Check for guested configure; otherwise get Cygnus style configure.
6820-
if test -f "$ac_srcdir/configure.gnu"; then
6821-
ac_sub_configure=$ac_srcdir/configure.gnu
6822-
elif test -f "$ac_srcdir/configure"; then
6823-
ac_sub_configure=$ac_srcdir/configure
6824-
elif test -f "$ac_srcdir/configure.in"; then
6825-
# This should be Cygnus configure.
6826-
ac_sub_configure=$ac_aux_dir/configure
6827-
else
6828-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
6829-
$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
6830-
ac_sub_configure=
6831-
fi
6832-
6833-
# The recursion is here.
6834-
if test -n "$ac_sub_configure"; then
6835-
# Make the cache file name correct relative to the subdirectory.
6836-
case $cache_file in
6837-
[\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6838-
*) # Relative name.
6839-
ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6840-
esac
6841-
6842-
{ $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
6843-
$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6844-
# The eval makes quoting arguments work.
6845-
eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6846-
--cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6847-
as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6848-
fi
6849-
6850-
cd "$ac_popdir"
6851-
done
6852-
fi
68536847
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68546848
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68556849
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}

configure.ac

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dnl Process this file with autoconf to produce a configure script.
22

33
AC_PREREQ([2.67])
4-
AC_REVISION($Revision: 1.1 $)dnl
4+
AC_REVISION($Revision: 1.2 $)dnl
55
AC_INIT
66
AC_CONFIG_SRCDIR([src/hypermail.c])
77
AC_CONFIG_HEADER(config.h)
@@ -15,11 +15,6 @@ GDBM_LIB=""
1515
PCRE_DEP=""
1616
FNV_DEP=""
1717

18-
dnl These are the subdirs that are compiled systematically
19-
dnl For subdirs that can be disabled thru configure options,
20-
dnl we configure them in a dedicated section near the test
21-
SUBDIRS="src/trio"
22-
2318
dnl ===========================================================================
2419
dnl Get host, target and build variables filled with appropriate info.
2520
dnl ===========================================================================
@@ -152,9 +147,15 @@ AC_SUBST(domainaddr)
152147

153148
dnl ===========================================================================
154149
dnl Configure the subdirectories
150+
dnl
151+
dnl These are the subdirs that are compiled systematically
152+
dnl For subdirs that can be disabled thru configure options,
153+
dnl we configure them in a dedicated section near the test
155154
dnl ===========================================================================
156155
AC_DISABLE_OPTION_CHECKING
157-
AC_CONFIG_SUBDIRS([SUBDIRS])
156+
APR_SUBDIR_CONFIG([src/trio],
157+
[CFLAGS=[-DTRIO_MINIMAL]],
158+
[--with-pcre=*|\'--with-pcre=*])
158159

159160
dnl ===========================================================================
160161
dnl Checks headers

0 commit comments

Comments
 (0)