diff options
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | src/Makefile.am | 12 |
2 files changed, 34 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index ad78677..8389b67 100644 --- a/configure.ac +++ b/configure.ac @@ -494,12 +494,37 @@ else GPG_ERROR_CONFIG_MT_CFLAGS="" fi GPG_ERROR_CONFIG_HOST="$host" + case "$includedir" in /usr/include|/include) ;; - *) GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" ;; + '${prefix}/include') + if test "$prefix" != / -a "$prefix" != /usr; then + if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then + GPG_ERROR_CONFIG_CFLAGS="-I$includedir" + else + GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" + fi + fi + ;; + *) + if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then + GPG_ERROR_CONFIG_CFLAGS="-I$includedir" + else + GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" + fi + ;; esac case "$libdir" in /usr/lib|/usr/lib64|/lib|/lib64) ;; + '${exec_prefix}/lib') + if test "$exec_prefix" = "NONE"; then + if test "$prefix" != / -a "$prefix" != /usr; then + GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" + fi + elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then + GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" + fi + ;; *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;; esac @@ -509,6 +534,7 @@ AC_SUBST(GPG_ERROR_CONFIG_MT_LIBS) AC_SUBST(GPG_ERROR_CONFIG_MT_CFLAGS) AC_SUBST(GPG_ERROR_CONFIG_HOST) + # # Special defines for certain platforms # diff --git a/src/Makefile.am b/src/Makefile.am index 04b8fb6..d631ee2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -336,12 +336,14 @@ gpgrt-config: gpg-error-config cp gpg-error-config gpgrt-config gpg-error-config: gpg-error-config-new gpg-error-config-old - @echo "Confirm gpg-error-config works" + @echo "Confirm gpg-error-config works... " @if $(srcdir)/gpg-error-config-test.sh --old-new; then \ - cp gpg-error-config-new $@; \ - else \ - echo "*** New gpg-error-config doesn't work on this machine, please report to <https://bugs.gnupg.org>"; \ - cp gpg-error-config-old $@; \ + echo "good"; \ + cp gpg-error-config-new $@; \ + else \ + echo "no"; \ + echo "*** Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log"; \ + cp gpg-error-config-old $@; \ fi install-data-local: |