diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 542b3b48..f74d8d99 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl configure.ac --- autoconf input file for systemtap dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 0.8, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 0.9, systemtap@sources.redhat.com, systemtap) dnl ^^^^^ see also NEWS, systemtap.spec, testsuite/configure.ac AC_PREREQ(2.59) @@ -9,6 +9,7 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AM_PROG_MKDIR_P +AC_SUBST(MKDIR_P) AC_PROG_LN_S AC_PROG_CC AC_PROG_CXX @@ -220,9 +221,28 @@ AC_ARG_ENABLE([server], [enable building of stap-server/client (default on if nss etc. found).]), [enable_server=$enableval], [enable_server="check"]) -PKG_CHECK_MODULES([nss],[nss >= 3], have_nss=yes, have_nss=no) -PKG_CHECK_MODULES([nspr],[nspr >= 4], have_nspr=yes, have_nspr=no) -if test "x${have_nss}${have_nspr}" != "xyesyes"; then +dnl Find the location of nss and nspr headers +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" +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=yes, 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}" != "xyesyes"; then if test "$enable_server" == "yes"; then AC_MSG_ERROR([cannot find all libraries for stap-server]) fi @@ -230,7 +250,7 @@ if test "x${have_nss}${have_nspr}" != "xyesyes"; then AC_MSG_WARN([will not build stap-server, cannot find all libraries]) fi fi -AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"]) +AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss_includes}${have_nss_libs}" == "xyesyes" -a "$enable_server" != "no"]) dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used dnl the system's elfutils. |