1From 54a4c9d3e5f1897ed4b978d5cdee646ca7a4f637 Mon Sep 17 00:00:00 2001 2From: Armin Kuster <akuster@mvista.com> 3Date: Fri, 2 Sep 2005 11:50:01 +0000 4Subject: [PATCH] Add gtk+, avahi, dbus-0.34 (.36 coming soon) and 5 6Convert to pkg-config support to match changes done to 7the gpg-error recipe for gpg-error.pc generation. 8 9Upstream-Status: Inappropriate [OE specific] 10 11Signed-off-by: Armin Kuster <akuster@mvista.com> 12 13--- 14 m4/gpg-error.m4 | 159 ++---------------------------------------------- 15 1 file changed, 4 insertions(+), 155 deletions(-) 16 17diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 18index 56a5d07..c0bec1f 100644 19--- a/m4/gpg-error.m4 20+++ b/m4/gpg-error.m4 21@@ -26,159 +26,12 @@ dnl config script does not match the host specification the script 22 dnl is added to the gpg_config_script_warn variable. 23 dnl 24 AC_DEFUN([AM_PATH_GPG_ERROR], 25-[ AC_REQUIRE([AC_CANONICAL_HOST]) 26- gpg_error_config_prefix="" 27- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, 28- dnl since that is consistent with how our three siblings use the directory/ 29- dnl package name in --with-$dir_name-prefix=PFX. 30- AC_ARG_WITH(libgpg-error-prefix, 31- AS_HELP_STRING([--with-libgpg-error-prefix=PFX], 32- [prefix where GPG Error is installed (optional)]), 33- [gpg_error_config_prefix="$withval"]) 34- 35- dnl Accept --with-gpg-error-prefix and make it work the same as 36- dnl --with-libgpg-error-prefix above, for backwards compatibility, 37- dnl but do not document this old, inconsistently-named option. 38- AC_ARG_WITH(gpg-error-prefix,, 39- [gpg_error_config_prefix="$withval"]) 40- 41- if test x"${GPG_ERROR_CONFIG}" = x ; then 42- if test x"${gpg_error_config_prefix}" != x ; then 43- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" 44- else 45- case "${SYSROOT}" in 46- /*) 47- if test -x "${SYSROOT}/bin/gpg-error-config" ; then 48- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config" 49- fi 50- ;; 51- '') 52- ;; 53- *) 54- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) 55- ;; 56- esac 57- fi 58- fi 59- 60- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) 61- min_gpg_error_version=ifelse([$1], ,1.33,$1) 62- ok=no 63- 64- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) 65- if test "$GPGRT_CONFIG" != "no"; then 66- # Determine gpgrt_libdir 67- # 68- # Get the prefix of gpgrt-config assuming it's something like: 69- # <PREFIX>/bin/gpgrt-config 70- gpgrt_prefix=${GPGRT_CONFIG%/*/*} 71- possible_libdir1=${gpgrt_prefix}/lib 72- # Determine by using system libdir-format with CC, it's like: 73- # Normal style: /usr/lib 74- # GNU cross style: /usr/<triplet>/lib 75- # Debian style: /usr/lib/<multiarch-name> 76- # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 77- # It is assumed that CC is specified to the one of host on cross build. 78- if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ 79- sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ 80-/g;p;}"); then 81- # From the output of -print-search-dirs, select valid pkgconfig dirs. 82- libdir_candidates=$(for dir in $libdir_candidates; do 83- if p=$(cd $dir 2>/dev/null && pwd); then 84- test -d "$p/pkgconfig" && echo $p; 85- fi 86- done) 87- 88- for possible_libdir0 in $libdir_candidates; do 89- # possible_libdir0: 90- # Fallback candidate, the one of system-installed (by $CC) 91- # (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32) 92- # possible_libdir1: 93- # Another candidate, user-locally-installed 94- # (<gpgrt_prefix>/lib) 95- # possible_libdir2 96- # Most preferred 97- # (<gpgrt_prefix>/<triplet>/lib, 98- # <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32) 99- if test "${possible_libdir0##*/}" = "lib"; then 100- possible_prefix0=${possible_libdir0%/lib} 101- possible_prefix0_triplet=${possible_prefix0##*/} 102- if test -z "$possible_prefix0_triplet"; then 103- continue 104- fi 105- possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib 106- else 107- possible_prefix0=${possible_libdir0%%/lib*} 108- possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} 109- fi 110- if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then 111- gpgrt_libdir=${possible_libdir2} 112- elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then 113- gpgrt_libdir=${possible_libdir1} 114- elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then 115- gpgrt_libdir=${possible_libdir0} 116- fi 117- if test -n "$gpgrt_libdir"; then break; fi 118- done 119- else 120- # When we cannot determine system libdir-format, use this: 121- gpgrt_libdir=${possible_libdir1} 122- fi 123- else 124- unset GPGRT_CONFIG 125- fi 126- 127- if test -n "$gpgrt_libdir"; then 128- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" 129- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then 130- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" 131- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) 132- gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` 133- else 134- unset GPGRT_CONFIG 135- fi 136- elif test "$GPG_ERROR_CONFIG" != "no"; then 137- gpg_error_config_version=`$GPG_ERROR_CONFIG --version` 138- fi 139- if test "$GPG_ERROR_CONFIG" != "no"; then 140- req_major=`echo $min_gpg_error_version | \ 141- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` 142- req_minor=`echo $min_gpg_error_version | \ 143- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` 144- major=`echo $gpg_error_config_version | \ 145- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` 146- minor=`echo $gpg_error_config_version | \ 147- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` 148- if test "$major" -gt "$req_major"; then 149- ok=yes 150- else 151- if test "$major" -eq "$req_major"; then 152- if test "$minor" -ge "$req_minor"; then 153- ok=yes 154- fi 155- fi 156- fi 157- fi 158- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) 159+[ 160+ min_gpg_error_version=ifelse([$1], ,0.0,$1) 161+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version gpg-error], [ok=yes], [ok=no]) 162 if test $ok = yes; then 163- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` 164- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` 165- if test -z "$GPGRT_CONFIG"; then 166- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` 167- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` 168- else 169- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` 170- GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" 171- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` 172- GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" 173- fi 174- AC_MSG_RESULT([yes ($gpg_error_config_version)]) 175 ifelse([$2], , :, [$2]) 176- if test -z "$GPGRT_CONFIG"; then 177- gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` 178- else 179- gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` 180- fi 181+ gpg_error_config_host=`$PKG_CONFIG --host gpg-error 2>/dev/null || echo none` 182 if test x"$gpg_error_config_host" != xnone ; then 183 if test x"$gpg_error_config_host" != x"$host" ; then 184 AC_MSG_WARN([[ 185@@ -193,10 +46,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], 186 fi 187 fi 188 else 189- GPG_ERROR_CFLAGS="" 190- GPG_ERROR_LIBS="" 191- GPG_ERROR_MT_CFLAGS="" 192- GPG_ERROR_MT_LIBS="" 193 AC_MSG_RESULT(no) 194 ifelse([$3], , :, [$3]) 195 fi 196