Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 1 | From 7b60f1563ecdb7020c145de8a96cae1c0a66c595 Mon Sep 17 00:00:00 2001 |
| 2 | From: Armin Kuster <akuster@mvista.com> |
| 3 | Date: Fri, 2 Sep 2005 11:50:01 +0000 |
| 4 | Subject: [PATCH] Add gtk+, avahi, dbus-0.34 (.36 coming soon) and |
| 5 | |
| 6 | Convert to pkg-config support to match changes done to |
| 7 | the gpg-error recipe for gpg-error.pc generation. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [OE specific] |
| 10 | |
| 11 | Signed-off-by: Armin Kuster <akuster@mvista.com> |
| 12 | |
| 13 | --- |
| 14 | m4/gpg-error.m4 | 141 ++---------------------------------------------- |
| 15 | 1 file changed, 4 insertions(+), 137 deletions(-) |
| 16 | |
| 17 | diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 |
| 18 | index c9b235f..a4fd41c 100644 |
| 19 | --- a/m4/gpg-error.m4 |
| 20 | +++ b/m4/gpg-error.m4 |
| 21 | @@ -25,141 +25,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 | - if test "$prefix" = NONE ; then |
| 65 | - prefix_option_expanded=/usr/local |
| 66 | - else |
| 67 | - prefix_option_expanded="$prefix" |
| 68 | - fi |
| 69 | - if test "$exec_prefix" = NONE ; then |
| 70 | - exec_prefix_option_expanded=$prefix_option_expanded |
| 71 | - else |
| 72 | - exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix) |
| 73 | - fi |
| 74 | - libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir) |
| 75 | - |
| 76 | - if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then |
| 77 | - gpgrt_libdir=$libdir_option_expanded |
| 78 | - else |
| 79 | - if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then |
| 80 | - if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then |
| 81 | - if test -f $possible_libdir/pkgconfig/gpg-error.pc; then |
| 82 | - gpgrt_libdir=$possible_libdir |
| 83 | - fi |
| 84 | - fi |
| 85 | - fi |
| 86 | - fi |
| 87 | - |
| 88 | - if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then |
| 89 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) |
| 90 | - if test "$GPGRT_CONFIG" = "no"; then |
| 91 | - unset GPGRT_CONFIG |
| 92 | - else |
| 93 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" |
| 94 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then |
| 95 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" |
| 96 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) |
| 97 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` |
| 98 | - else |
| 99 | - unset GPGRT_CONFIG |
| 100 | - fi |
| 101 | - fi |
| 102 | - else |
| 103 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` |
| 104 | - fi |
| 105 | - if test "$GPG_ERROR_CONFIG" != "no"; then |
| 106 | - req_major=`echo $min_gpg_error_version | \ |
| 107 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
| 108 | - req_minor=`echo $min_gpg_error_version | \ |
| 109 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
| 110 | - major=`echo $gpg_error_config_version | \ |
| 111 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
| 112 | - minor=`echo $gpg_error_config_version | \ |
| 113 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
| 114 | - if test "$major" -gt "$req_major"; then |
| 115 | - ok=yes |
| 116 | - else |
| 117 | - if test "$major" -eq "$req_major"; then |
| 118 | - if test "$minor" -ge "$req_minor"; then |
| 119 | - ok=yes |
| 120 | - fi |
| 121 | - fi |
| 122 | - fi |
| 123 | - if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then |
| 124 | - if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then |
| 125 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) |
| 126 | - if test "$GPGRT_CONFIG" = "no"; then |
| 127 | - unset GPGRT_CONFIG |
| 128 | - else |
| 129 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" |
| 130 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then |
| 131 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" |
| 132 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) |
| 133 | - else |
| 134 | - unset GPGRT_CONFIG |
| 135 | - fi |
| 136 | - fi |
| 137 | - fi |
| 138 | - fi |
| 139 | - fi |
| 140 | - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) |
| 141 | +[ |
| 142 | + min_gpg_error_version=ifelse([$1], ,0.0,$1) |
| 143 | + PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version gpg-error], [ok=yes], [ok=no]) |
| 144 | if test $ok = yes; then |
| 145 | - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` |
| 146 | - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` |
| 147 | - if test -z "$GPGRT_CONFIG"; then |
| 148 | - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` |
| 149 | - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` |
| 150 | - else |
| 151 | - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` |
| 152 | - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" |
| 153 | - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` |
| 154 | - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" |
| 155 | - fi |
| 156 | - AC_MSG_RESULT([yes ($gpg_error_config_version)]) |
| 157 | ifelse([$2], , :, [$2]) |
| 158 | - if test -z "$GPGRT_CONFIG"; then |
| 159 | - gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` |
| 160 | - else |
| 161 | - gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` |
| 162 | - fi |
| 163 | + gpg_error_config_host=`$PKG_CONFIG --host gpg-error 2>/dev/null || echo none` |
| 164 | if test x"$gpg_error_config_host" != xnone ; then |
| 165 | if test x"$gpg_error_config_host" != x"$host" ; then |
| 166 | AC_MSG_WARN([[ |
| 167 | @@ -174,10 +45,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], |
| 168 | fi |
| 169 | fi |
| 170 | else |
| 171 | - GPG_ERROR_CFLAGS="" |
| 172 | - GPG_ERROR_LIBS="" |
| 173 | - GPG_ERROR_MT_CFLAGS="" |
| 174 | - GPG_ERROR_MT_LIBS="" |
| 175 | AC_MSG_RESULT(no) |
| 176 | ifelse([$3], , :, [$3]) |
| 177 | fi |