diff options
author | Przemyslaw Pawelczyk <przemyslaw@pawelczyk.it> | 2010-02-04 14:03:22 +0100 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-02-04 12:17:02 -0800 |
commit | 161f9ed669cee8091555fe0314b7ecf5c441702a (patch) | |
tree | f4ee5d396b250ace14e238fe63824680bcc3f7ed /configure.ac | |
parent | ecf33ff44feaccfde06f3c2b55b0a78d69e29545 (diff) | |
download | systemtap-steved-161f9ed669cee8091555fe0314b7ecf5c441702a.tar.gz systemtap-steved-161f9ed669cee8091555fe0314b7ecf5c441702a.tar.xz systemtap-steved-161f9ed669cee8091555fe0314b7ecf5c441702a.zip |
Do not check stuff required by server if disabled.
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index 2ec625d3..8a828de9 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"]) |