This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
MQServer/subdirconfig.m4
2004-09-26 13:54:02 +00:00

44 lines
1.4 KiB
Text

dnl
dnl NEO_SUBDIR_CONFIG(dir [, sub-package-cmdline-args])
dnl
dnl Note that this code is a direct copy of that which is found in
dnl the apr project's build/apr_common.m4.
AC_DEFUN([NEO_SUBDIR_CONFIG], [
# save our work to this point; this allows the sub-package to use it
AC_CACHE_SAVE
echo
echo "----------------------------------------------------------------"
echo "configuring package in $1 now"
echo "----------------------------------------------------------------"
ac_popdir=`pwd`
ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
apr_config_subdirs="$1"
test -d $1 || $MKDIR $1
cd $1
#changequote(, )dnl
# A "../" for each directory in /$config_subdirs.
#ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
#changequote([, ])dnl
# Make the cache file name correct relative to the subdirectory.
case "$cache_file" in
/*) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file="$ac_dots$cache_file" ;;
esac
# The eval makes quoting arguments work.
if eval $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
then :
echo "$1 configured properly"
else
echo "configure failed for $1"
exit 1
fi
cd $ac_popdir
# grab any updates from the sub-package
AC_CACHE_LOAD
])dnl