RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 25-Jun-2007 13:27:34 Branch: HEAD Handle: 2007062512273400 Modified files: rpm acinclude.m4 configure.ac Log: add AC_MSG_HEADER and AC_MSG_VERBOSE macros and use them for displaying the configure parts and verbose messages Summary: Revision Changes Path 2.12 +49 -30 rpm/acinclude.m4 2.136 +46 -15 rpm/configure.ac ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/acinclude.m4 ============================================================================ $ cvs diff -u -r2.11 -r2.12 acinclude.m4 --- rpm/acinclude.m4 25 Jun 2007 10:49:41 -0000 2.11 +++ rpm/acinclude.m4 25 Jun 2007 11:27:34 -0000 2.12 @@ -4,6 +4,33 @@ dnl ## dnl ## NAME: +dnl ## AC_MSG_HEADER -- Display a configuration header +dnl ## +dnl ## USAGE: +dnl ## AC_MSG_HEADER(<text>) +dnl ## + +AC_DEFUN([AC_MSG_HEADER],[ + _AS_ECHO([]) + _AS_ECHO([=== $1 ===]) +]) + +dnl ## +dnl ## NAME: +dnl ## AC_MSG_VERBOSE -- Display a message under --verbose +dnl ## +dnl ## USAGE: +dnl ## AC_MSG_VERBOSE(<text>) +dnl ## + +AC_DEFUN([AC_MSG_VERBOSE], [ + if test ".$verbose" = .yes; then + _AS_ECHO([$1]) + fi +]) + +dnl ## +dnl ## NAME: dnl ## RPM_CHECK_LIB -- Check for third-party libraries dnl ## dnl ## COPYRIGHT @@ -67,14 +94,6 @@ dnl ## dnl ## -dnl # internal helper macro -m4_define([__rcl_verbose], [ - dnl # printing of verbose message - if test ".$verbose" = .yes; then - _AS_ECHO([$1]) - fi -]) - dnl # public API macro AC_DEFUN([RPM_CHECK_LIB], [ dnl ## @@ -89,12 +108,12 @@ if test ".${with_$2+set}" != .set; then dnl # initialize to default enable mode with_$2="__rcl_default_enable" - __rcl_verbose([++ assuming --with-$2=$with_$2]) + AC_MSG_VERBOSE([++ assuming --with-$2=$with_$2]) fi if test ".${with_$2}" = .yes; then dnl # map simple "--with-foo=yes" to an enabled default location path with_$2="__rcl_default_locations" - __rcl_verbose([++ mapping --with-$2=yes to --with-$2="$with_$2"]) + AC_MSG_VERBOSE([++ mapping --with-$2=yes to --with-$2="$with_$2"]) fi dnl ## @@ -113,17 +132,17 @@ for __rcl_location in ${with_$2}; do IFS="${__rcl_IFS}" __rcl_location_last="${__rcl_location}" - __rcl_verbose([++ searching location: ${__rcl_location}]) + AC_MSG_VERBOSE([++ searching location: ${__rcl_location}]) if test ".${__rcl_location}" = .none; then dnl # no operation in loop, ignore failure later, too. - __rcl_verbose([-- no operation]) + AC_MSG_VERBOSE([-- no operation]) m4_if([$7],,, [ elif test ".${__rcl_location}" = .internal; then dnl # optional support for <internal-subdir> feature m4_define([__rcl_subdir], [m4_if(m4_index([$7], [:]), -1, [$7], m4_substr([$7], 0, m4_index([$7], [:])))]) if test -d __rcl_subdir; then - __rcl_verbose([-- activating local sub-directory: __rcl_subdir]) + AC_MSG_VERBOSE([-- activating local sub-directory: __rcl_subdir]) AC_CONFIG_SUBDIRS(__rcl_subdir) WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR="__rcl_subdir" dnl # divert deferred flags handling because in the "internal" @@ -132,7 +151,7 @@ __rcl_location_$2=internal AC_CONFIG_COMMANDS_PRE([ if test ".${__rcl_location_$2}" = .internal; then - __rcl_verbose([++ post-adjustments for --with-$2 (${__rcl_location_$2})]) + AC_MSG_VERBOSE([++ post-adjustments for --with-$2 (${__rcl_location_$2})]) __rcl_dirs_inc=`echo '$7' | sed -e 's/^[[^:]]*://' -e 's/:[[^:]]*[$]//'` __rcl_dirs_lib=`echo '$7' | sed -e 's/^[[^:]]*:[[^:]]*://'` __rcl_basedir="\[$](top_srcdir)/\[$](WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR)" @@ -142,33 +161,33 @@ for __rcl_dir in ${__rcl_dirs_inc}; do IFS="${__rcl_IFS}" test ".${__rcl_dir}" = . && continue - __rcl_verbose([-- extending CPPFLAGS: -I${__rcl_basedir}/${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_basedir}/${__rcl_dir}]) CPPFLAGS="${CPPFLAGS} -I${__rcl_basedir}/${__rcl_dir}" done IFS="${__rcl_IFS}" fi - __rcl_verbose([-- extending CPPFLAGS: -I${__rcl_basedir}]) + AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_basedir}]) CPPFLAGS="${CPPFLAGS} -I${__rcl_basedir}" if test ".${__rcl_dirs_lib}" != ".$7"; then __rcl_IFS="${IFS}"; IFS="," for __rcl_dir in ${__rcl_dirs_lib}; do IFS="${__rcl_IFS}" test ".${__rcl_dir}" = . && continue - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_basedir}/${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_basedir}/${__rcl_dir}]) LDFLAGS="${LDFLAGS} -L${__rcl_basedir}/${__rcl_dir}" done IFS="${__rcl_IFS}" fi - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_basedir}]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_basedir}]) LDFLAGS="${LDFLAGS} -L${__rcl_basedir}" - __rcl_verbose([-- extending LIBS: -l${__rcl_firstlib}]) + AC_MSG_VERBOSE([-- extending LIBS: -l${__rcl_firstlib}]) LIBS="${LIBS} -l${__rcl_firstlib}" fi ]) __rcl_result_hint="internal: sub-directory __rcl_subdir" break else - __rcl_verbose([-- skipping not existing local sub-directory: __rcl_subdir]) + AC_MSG_VERBOSE([-- skipping not existing local sub-directory: __rcl_subdir]) fi ]) elif test ".${__rcl_location}" = .external; then @@ -178,7 +197,7 @@ m4_define([__rcl_query_config], [ __rcl_flags="`($][1 --$][2) 2>/dev/null`" if test ".${__rcl_flags}" != .; then - __rcl_verbose([-- extending $][3: ${__rcl_flags}]) + AC_MSG_VERBOSE([-- extending $][3: ${__rcl_flags}]) $][3="${$][3} ${__rcl_flags}" fi ]) @@ -193,7 +212,7 @@ m4_define([__rcl_query_pkgconfig], [ __rcl_flags="`($][1 --$][2) 2>/dev/null`" if test ".${__rcl_flags}" != .; then - __rcl_verbose([-- extending $][3: ${__rcl_flags}]) + AC_MSG_VERBOSE([-- extending $][3: ${__rcl_flags}]) $][3="${$][3} ${__rcl_flags}" fi ]) @@ -258,7 +277,7 @@ for __rcl_dir in ${__rcl_location}/include/$2 ${__rcl_location}/include ${__rcl_location}; do if test -f "${__rcl_dir}/$5"; then if test ".${__rcl_dir}" != "./usr/include"; then - __rcl_verbose([-- extending CPPFLAGS: -I${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_dir}]) CPPFLAGS="${CPPFLAGS} -I${__rcl_dir}" fi __rcl_found=yes @@ -272,8 +291,8 @@ if test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).la" && \ test -d "${__rcl_dir}/.libs"; then if test ".${__rcl_dir}" != "./usr/lib"; then - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_dir}]) - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_dir}/.libs]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}/.libs]) LDFLAGS="${LDFLAGS} -L${__rcl_dir} -L${__rcl_dir}/.libs" fi __rcl_found=yes @@ -284,7 +303,7 @@ test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).sl" || \ test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).dylib"; then if test ".${__rcl_dir}" != "./usr/lib"; then - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}]) LDFLAGS="${LDFLAGS} -L${__rcl_dir}" fi __rcl_found=yes @@ -303,7 +322,7 @@ test .${__rcl_file} = ._ && continue __rcl_dir=`echo ${__rcl_file} | sed -e 's;[[^/]]*[$];;' -e 's;\(.\)/[$];\1;'` if test ".${__rcl_dir}" != "./usr/include"; then - __rcl_verbose([-- extending CPPFLAGS: -I${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_dir}]) CPPFLAGS="${CPPFLAGS} -I${__rcl_dir}" fi __rcl_found=yes @@ -317,7 +336,7 @@ test .${__rcl_file} = ._ && continue __rcl_dir=`echo ${__rcl_file} | sed -e 's;[[^/]]*[$];;' -e 's;\(.\)/[$];\1;'` if test ".${__rcl_dir}" != "./usr/lib"; then - __rcl_verbose([-- extending LDFLAGS: -L${__rcl_dir}]) + AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}]) LDFLAGS="${LDFLAGS} -L${__rcl_dir}" fi __rcl_found=yes @@ -396,11 +415,11 @@ if test ".${with_$2}" = .yes; then AC_DEFINE([WITH_]m4_translit([$2],[a-z],[A-Z]), 1, [Define as 1 if building with $1 library]) dnl # support optional <action-success> - __rcl_verbose([++ executing success action]) + AC_MSG_VERBOSE([++ executing success action]) m4_if([$8],, :, [$8]) else dnl # support optional <action-failure> - __rcl_verbose([++ executing failure action]) + AC_MSG_VERBOSE([++ executing failure action]) m4_if([$9],, [ if test ".${RPM_CHECK_LIB_LOCATION}" != . && \ test ".${RPM_CHECK_LIB_LOCATION}" != .none; then @@ . patch -p0 <<'@@ .' Index: rpm/configure.ac ============================================================================ $ cvs diff -u -r2.135 -r2.136 configure.ac --- rpm/configure.ac 25 Jun 2007 10:49:41 -0000 2.135 +++ rpm/configure.ac 25 Jun 2007 11:27:34 -0000 2.136 @@ -8,9 +8,9 @@ AC_PREREQ(2.57) AC_INIT(rpm, 5.0, [EMAIL PROTECTED]) -AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([rpmqv.c]) AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([foreign]) dnl # Library code modified: REVISION++ @@ -24,21 +24,12 @@ dnl # set of available languages. ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk" -dnl # RPM installation user/group and uid/gid -: ${RPMUSER=rpm} -: ${RPMUID=37} -: ${RPMGROUP=rpm} -: ${RPMGID=37} -export RPMUSER RPMUID RPMGROUP RPMGID -AC_SUBST(RPMUSER) -AC_SUBST(RPMUID) -AC_SUBST(RPMGROUP) -AC_SUBST(RPMGID) - dnl ## dnl ## ==== TOOL-CHAIN CHECKS ==== dnl ## +AC_MSG_HEADER([TOOL-CHAIN CHECKS]) + AC_PROG_CC AC_PROG_CPP @@ -196,6 +187,8 @@ dnl ## ==== PROGRAM CHECKS ==== dnl ## +AC_MSG_HEADER([PROGRAM CHECKS]) + dnl # look for POSIX chmod attributes AC_MSG_CHECKING(POSIX chmod) touch foo.chmodtest @@ -373,6 +366,8 @@ dnl ## ==== API CHECKS ==== dnl ## +AC_MSG_HEADER([API CHECKS]) + dnl # platform specific checks AC_ISC_POSIX @@ -532,6 +527,8 @@ dnl ## ==== THIRD-PARTY LIBRARIES (1/2) ==== dnl ## +AC_MSG_HEADER([THIRD-PARTY LIBRARIES (1/2)]) + dnl # check for libelf library. Prefer external, then internal, otherwise none. WITH_ELFUTILS_SUBDIR= WITH_LIBELF_INCLUDE= @@ -733,6 +730,8 @@ dnl ## ==== THIRD-PARTY LIBRARIES (2/2) ==== dnl ## +AC_MSG_HEADER([THIRD-PARTY LIBRARIES (2/2)]) + dnl # ZLib RPM_CHECK_LIB( [ZLib], [zlib], @@ -854,8 +853,10 @@ dnl ## ==== INSTALLATION PARAMETERS ==== dnl ## +AC_MSG_HEADER([INSTALLATION PARAMETERS]) + dnl # figure out what root's primary group is -AC_MSG_CHECKING(root's primary group) +AC_MSG_CHECKING([root's primary group]) AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> #include <sys/types.h> #include <pwd.h> @@ -880,7 +881,7 @@ exit(1); }]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root" ]) -AC_MSG_RESULT($ROOT_GROUP) +AC_MSG_RESULT([$ROOT_GROUP]) AC_SUBST(ROOT_GROUP) dnl # provide platform-specific "find-provides" and "find-requires" script symlinks @@ -971,6 +972,17 @@ AC_SUBST(RPMCANONVENDOR) AC_SUBST(RPMCANONOS) +dnl # RPM installation user/group and uid/gid +: ${RPMUSER=rpm} +: ${RPMUID=37} +: ${RPMGROUP=rpm} +: ${RPMGID=37} +export RPMUSER RPMUID RPMGROUP RPMGID +AC_SUBST(RPMUSER) +AC_SUBST(RPMUID) +AC_SUBST(RPMGROUP) +AC_SUBST(RPMGID) + if test "x$varprefix" = "x"; then # For /usr and /usr/local, we want the 'var' directory to go # in /var and /var/local respectively. For everything else, @@ -988,44 +1000,63 @@ else usrprefix=$prefix fi + +AC_MSG_CHECKING([for locale installation directory]) LOCALEDIR="`echo ${usrprefix}/share/locale`" AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Full path to rpm locale directory (usually /usr/share/locale)]) AC_SUBST(LOCALEDIR) +AC_MSG_RESULT([$LOCALEDIR]) + +AC_MSG_CHECKING([for library installation directory]) LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`" AC_SUBST(LIBDIR) +AC_MSG_RESULT([$LIBDIR]) + +AC_MSG_CHECKING([for RPM global configuration installation directory]) USRLIBRPM="`echo ${usrprefix}/lib/rpm`" AC_DEFINE_UNQUOTED(USRLIBRPM, "$USRLIBRPM", [Full path to rpm global configuration directory (usually /usr/lib/rpm)]) AC_SUBST(USRLIBRPM) +AC_MSG_RESULT([$USRLIBRPM]) +AC_MSG_CHECKING([for RPM system configuration installation directory]) SYSCONFIGDIR="`echo /etc/rpm`" AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR", [Full path to rpm system configuration directory (usually /etc/rpm)]) AC_SUBST(SYSCONFIGDIR) +AC_MSG_RESULT([$SYSCONFIGDIR]) +AC_MSG_CHECKING([for RPM macro files path]) MACROFILES="${USRLIBRPM}/${VERSION}/macros:${USRLIBRPM}/%{_target}/macros:${SYSCONFIGDIR}/macros.*:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/%{_target}/macros:~/.rpmmacros" AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES", [Colon separated paths of macro files to read.]) AC_SUBST(MACROFILES) +AC_MSG_RESULT([$MACROFILES]) +AC_MSG_CHECKING([for RPM run-command files path]) RPMRCFILES="${USRLIBRPM}/${RPMCANONVENDOR}/rpmrc:${USRLIBRPM}/${RPMCANONVENDOR}/rpmrc:/etc/rpmrc:~/.rpmrc" AC_DEFINE_UNQUOTED(RPMRCFILES, "$RPMRCFILES", [Colon separated paths of rpmrc files to read.]) AC_SUBST(RPMRCFILES) +AC_MSG_RESULT([$RPMRCFILES]) +AC_MSG_CHECKING([for POPT configuration file]) RPMPOPTFILE="${USRLIBRPM}/${VERSION}/rpmpopt" AC_DEFINE_UNQUOTED(RPMPOPTFILE, "$RPMPOPTFILE", [Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)]) AC_SUBST(RPMPOPTFILE) +AC_MSG_RESULT([$RPMPOPTFILE]) testdir="`pwd`/tests" AC_SUBST(testdir) dnl ## -dnl ## ==== OUTPUT HANDLING ==== +dnl ## ==== OUTPUT GENERATION ==== dnl ## +AC_MSG_HEADER([OUTPUT GENERATION]) + dnl # explicit list of sub-directories to step into for additional "configure" scripts dnl # (RPM_CHECK_LIB extends this implicitly, too) AC_CONFIG_SUBDIRS() @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org