diff options
author | Elliott Baron <ebaron@tonberry.(none)> | 2009-02-17 10:04:15 -0500 |
---|---|---|
committer | Elliott Baron <ebaron@tonberry.(none)> | 2009-02-17 10:04:15 -0500 |
commit | 8ca54d604d559bc3d9b450a31e8ad5ad88ffc786 (patch) | |
tree | 8be063cf63f4234e684ee3445d8521b9a1d008e6 /configure.ac | |
parent | a79ec729450bc24d0943c2c1ee67efa8acb58273 (diff) | |
download | systemtap-steved-8ca54d604d559bc3d9b450a31e8ad5ad88ffc786.tar.gz systemtap-steved-8ca54d604d559bc3d9b450a31e8ad5ad88ffc786.tar.xz systemtap-steved-8ca54d604d559bc3d9b450a31e8ad5ad88ffc786.zip |
PR 9716, replaced pkgconfig checks with AC macros in configure.ac for server deps.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 542b3b48..d2389cb0 100644 --- a/configure.ac +++ b/configure.ac @@ -220,9 +220,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 +249,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. |