RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: r...@rpm5.org Module: rpm Date: 15-Apr-2009 13:49:40 Branch: HEAD Handle: 2009041511493901 Modified files: rpm CHANGES acinclude.m4 Log: RPM_CHECK_LIB: support --with-<name>=system to enable a library but control detection via flags only. This allows one to especially ignore any <name>-config and <name>.pc stuff and indeas control everything manually via CPPFLAGS and LDFLAGS. Summary: Revision Changes Path 1.2930 +1 -0 rpm/CHANGES 2.28 +20 -0 rpm/acinclude.m4 ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.2929 -r1.2930 CHANGES --- rpm/CHANGES 15 Apr 2009 11:28:07 -0000 1.2929 +++ rpm/CHANGES 15 Apr 2009 11:49:39 -0000 1.2930 @@ -1,5 +1,6 @@ 5.2a4 -> 5.2b1: + - rse: RPM_CHECK_LIB: support --with-<name>=system to enable a library but control detection via flags only - rse: let Lua's lregex_lposix to build against PCRE POSIX out of the box - jbj: inject $1/$2 into embedded tcl/perl/python/ruby interpreter contexts. - jbj: perl: add use RPM; so that perl bindings are available. @@ . patch -p0 <<'@@ .' Index: rpm/acinclude.m4 ============================================================================ $ cvs diff -u -r2.27 -r2.28 acinclude.m4 --- rpm/acinclude.m4 7 Apr 2009 16:41:39 -0000 2.27 +++ rpm/acinclude.m4 15 Apr 2009 11:49:40 -0000 2.28 @@ -99,6 +99,7 @@ dnl ## <with-arg-mode> ::= "yes" | "no" dnl ## <with-arg-location> ::= <with-arg-location> ":" <with-arg-location> dnl ## | <directory-path> +dnl ## | "system" dnl ## | "external" dnl ## | "internal" dnl ## | "none" @@ -298,6 +299,23 @@ break fi fi + elif test ".${__rcl_location}" = .system; then + dnl # detection of library in external locations controlled + dnl # by explicit build flags or in standard system locations + dnl # (usually /usr/include and /usr/lib) + __rcl_found_hdr=no + __rcl_found_lib=no + AC_PREPROC_IFELSE([AC_LANG_SOURCE([...@%:@include <$5>])], [ __rcl_found_hdr=yes ]) + m4_foreach_w([__rcl_lib], [$3], [ + __rcl_safe_LIBS="${LIBS}" + LIBS="-l[]m4_defn([__rcl_lib]) ${LIBS}" + AC_LINK_IFELSE([AC_LANG_CALL([], [$4])], [ __rcl_found_lib=yes ]) + LIBS="${__rcl_safe_LIBS}" + ]) + if test ".${__rcl_found_hdr}:${__rcl_found_lib}" = ".yes:yes"; then + __rcl_result_hint="system: explicitly controlled or system location" + break + fi elif test -d "${__rcl_location}"; then dnl # detection of library in particular external location __rcl_found=no @@ -428,6 +446,8 @@ if test ".${__rcl_found}" = .yes; then break fi + else + AC_MSG_ERROR( fi done IFS="${__rcl_IFS}" @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org