aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgrt.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgrt.m4')
-rw-r--r--src/gpgrt.m418
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gpgrt.m4 b/src/gpgrt.m4
index 912b103..55c3ff0 100644
--- a/src/gpgrt.m4
+++ b/src/gpgrt.m4
@@ -69,8 +69,20 @@ AC_DEFUN([AM_PATH_GPGRT],
fi
fi
- if test -f $libdir/pkgconfig/gpg-error.pc; then
- gpgrt_libdir=$libdir
+ if test "$prefix" = NONE ; then
+ prefix_option_expanded=/usr/local
+ else
+ prefix_option_expanded="$prefix"
+ fi
+ if test "$exec_prefix" = NONE ; then
+ exec_prefix_option_expanded=$prefix_option_expanded
+ else
+ exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
+ fi
+ libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+
+ if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
+ gpgrt_libdir=$libdir_option_expanded
else
if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
@@ -84,7 +96,7 @@ AC_DEFUN([AM_PATH_GPGRT],
if test -n "$gpgrt_libdir"; then
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
if test "$GPGRT_CONFIG" != "no"; then
- GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
+ GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
fi
fi
min_gpgrt_version=ifelse([$1], ,1.33,$1)