From: Przemyslaw Pawelczyk <przemyslaw@pawelczyk.it>
To: systemtap@sourceware.org
Subject: [PATCH 1/2] Do not check stuff required by server if disabled.
Date: Thu, 04 Feb 2010 14:43:00 -0000 [thread overview]
Message-ID: <52a562178072bd6178e9db8b3dc902edf691b712.1265293859.git.przemyslaw@pawelczyk.it> (raw)
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
next reply other threads:[~2010-02-04 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 14:43 Przemyslaw Pawelczyk [this message]
2010-02-04 14:46 ` [PATCH 2/2] Regenerate autotools files using autoreconf v2.61 Przemyslaw Pawelczyk
2010-02-04 20:45 ` [PATCH 1/2] Do not check stuff required by server if disabled Josh Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52a562178072bd6178e9db8b3dc902edf691b712.1265293859.git.przemyslaw@pawelczyk.it \
--to=przemyslaw@pawelczyk.it \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).