aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 39 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b5c01ba..089cb7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,19 +483,55 @@ if test "x$LIBMULTITHREAD" != x; then
else
GPG_ERROR_CONFIG_MT_LIBS=""
fi
-GPG_ERROR_CONFIG_CFLAGS=""
+if test "$have_w32ce_system" = yes; then
+ GPG_ERROR_CONFIG_CFLAGS="-idirafter \${includedir}/gpg-extra"
+else
+ GPG_ERROR_CONFIG_CFLAGS=""
+fi
if test "x$THREADLIB_CPPFLAGS" != x; then
GPG_ERROR_CONFIG_MT_CFLAGS="${THREADLIB_CPPFLAGS}"
else
GPG_ERROR_CONFIG_MT_CFLAGS=""
fi
-GPG_ERROR_CONFIG_ISUBDIRAFTER=""
GPG_ERROR_CONFIG_HOST="$host"
+
+case "$includedir" in
+ /usr/include|/include) ;;
+ '${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
+
AC_SUBST(GPG_ERROR_CONFIG_LIBS)
AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
AC_SUBST(GPG_ERROR_CONFIG_MT_LIBS)
AC_SUBST(GPG_ERROR_CONFIG_MT_CFLAGS)
-AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER)
AC_SUBST(GPG_ERROR_CONFIG_HOST)
@@ -510,7 +546,6 @@ if test "$have_w32_system" = yes; then
fi
if test "$have_w32ce_system" = yes; then
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
- GPG_ERROR_CONFIG_ISUBDIRAFTER="gpg-extra"
fi
force_use_syscfg=yes
fi