This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 1/2] Do not check stuff required by server if disabled.
- From: Przemyslaw Pawelczyk <przemyslaw at pawelczyk dot it>
- To: systemtap at sourceware dot org
- Date: Thu, 4 Feb 2010 14:03:22 +0100
- Subject: [PATCH 1/2] Do not check stuff required by server if disabled.
- Mail-from: 52a562178072bd6178e9db8b3dc902edf691b712 Mon Sep 17 00:00:00 2001
Building systemtap package using dpkg-buildpackage under scratchbox
yields following error during configure:
checking for /usr/include/nss3... configure: error: cannot check for
file existence when cross compiling
even if --disable-server is provided. Fix it.
* configure.ac: Check for server-related stuff iff enable_server != no.
---
configure.ac | 60 +++++++++++++++++++++++++++++----------------------------
1 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2ec625d..8a828de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,38 +287,40 @@ AC_ARG_ENABLE([server],
[enable building of stap-server/client (default on if nss etc. found).]),
[enable_server=$enableval],
[enable_server="check"])
+if test "$enable_server" != "no"; then
dnl Find the location of nss and nspr headers and certutil
-AC_CHECK_PROG(have_certutil, certutil, [yes], [no])
-AC_CHECK_FILE([/usr/include/nss3], nssdir=nss3, [
- AC_CHECK_FILE([/usr/include/nss], nssdir=nss)
-])
-AC_CHECK_FILE([/usr/include/nspr4], nsprdir=nspr4, [
- AC_CHECK_FILE([/usr/include/nspr], nsprdir=nspr)
-])
-if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then
-nss_CFLAGS="-I/usr/include/$nssdir"
-nspr_CFLAGS="-I/usr/include/$nsprdir"
-AC_SUBST(nss_CFLAGS)
-AC_SUBST(nspr_CFLAGS)
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS"
-have_nss_includes=yes
-AC_CHECK_HEADERS(["$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h"], [], have_nss_includes=no)
-CPPFLAGS="$save_CPPFLAGS"
-have_nss_libs=no
-AC_CHECK_LIB(nspr4, PR_Connect, [
- AC_CHECK_LIB(ssl3, SSL_ReHandshake, have_nss_libs=yes)
-])
-fi
-if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" != "xyesyesyes"; then
- if test "$enable_server" == "yes"; then
- AC_MSG_ERROR([cannot find all libraries or tools for stap-server])
+ AC_CHECK_PROG(have_certutil, certutil, [yes], [no])
+ AC_CHECK_FILE([/usr/include/nss3], nssdir=nss3, [
+ AC_CHECK_FILE([/usr/include/nss], nssdir=nss)
+ ])
+ AC_CHECK_FILE([/usr/include/nspr4], nsprdir=nspr4, [
+ AC_CHECK_FILE([/usr/include/nspr], nsprdir=nspr)
+ ])
+ if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then
+ nss_CFLAGS="-I/usr/include/$nssdir"
+ nspr_CFLAGS="-I/usr/include/$nsprdir"
+ AC_SUBST(nss_CFLAGS)
+ AC_SUBST(nspr_CFLAGS)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS"
+ have_nss_includes=yes
+ AC_CHECK_HEADERS(["$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h"], [], have_nss_includes=no)
+ CPPFLAGS="$save_CPPFLAGS"
+ have_nss_libs=no
+ AC_CHECK_LIB(nspr4, PR_Connect, [
+ AC_CHECK_LIB(ssl3, SSL_ReHandshake, have_nss_libs=yes)
+ ])
fi
- if test "$enable_server" == "check"; then
- AC_MSG_WARN([will not build stap-server, cannot find all libraries or tools])
+ if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" != "xyesyesyes"; then
+ if test "$enable_server" == "yes"; then
+ AC_MSG_ERROR([cannot find all libraries or tools for stap-server])
+ fi
+ if test "$enable_server" == "check"; then
+ AC_MSG_WARN([will not build stap-server, cannot find all libraries or tools])
+ fi
+ else
+ AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.])
fi
-else
- AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.])
fi
AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes" -a "$enable_server" != "no"])
AM_CONDITIONAL([HAVE_NSS], [test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes"])
--
1.6.3.3