ALT Linux repos
Group :: Monitoring
RPM: monit
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: monit-5.3-pkgconfig-configure.patch
Download
Download
diff -Naur monit-5.3-orig/configure.ac monit-5.3/configure.ac
--- monit-5.3-orig/configure.ac 2011-09-13 03:00:36.000000000 +0300
+++ monit-5.3/configure.ac 2011-09-13 21:12:44.962803530 +0300
@@ -586,7 +586,7 @@
# Check for ssl includes
checksslincldir() { :
if test -f "$1/openssl/ssl.h"; then
- sslincldir="$1"
+ libssl_CFLAGS="-I$1"
return 0
fi
return 1
@@ -598,7 +598,7 @@
SSLLIB=`ls -1 $1/libssl.so* $1/libssl.dylib* 2>/dev/null | wc -l`
if test "(" $CRYPTOLIB -gt 0 -a $SSLLIB -gt 0 ")"
then
- ssllibdir="$1"
+ libssl_LIBS="-L$1 -lssl -lcrypto"
return 0
fi
return 1
@@ -633,8 +633,8 @@
AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
AC_SUBST(sslincldir)
AC_SUBST(ssllibdir)
- CFLAGS="$CFLAGS -I$sslincldir"
- LIBS="$LIBS $ssllibdir/libssl.a $ssllibdir/libcrypto.a"
+ CFLAGS="$CFLAGS $libssl_CFLAGS"
+ LIBS="$LIBS $libssl_LIBS"
],
[
use_sslstatic=0
@@ -690,7 +690,7 @@
checksslincldir "$withval"
],
[
- if test -z "$sslincldir"; then
+ if test -z "$libssl_CFLAGS"; then
dnl Search default locations of SSL includes
for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt /opt/csw /usr/sfw; do
for dir in "$maindir/include"\
@@ -703,7 +703,7 @@
fi
]
)
- if test -z "$sslincldir"; then
+ if test -z "$libssl_CFLAGS"; then
AC_MSG_RESULT([Not found])
echo
echo "Couldn't find your SSL header files."
@@ -712,7 +712,7 @@
echo
exit 1
fi
- AC_MSG_RESULT([$sslincldir])
+ AC_MSG_RESULT([$libssl_CFLAGS])
AC_MSG_CHECKING([for SSL library directory])
AC_ARG_WITH(ssl-lib-dir,
@@ -722,7 +722,7 @@
checkssllibdirdynamic "$withval"
],
[
- if test -z "$ssllibdir"; then
+ if test -z "$libssl_LIBS"; then
dnl Search default locations of SSL libraries
for maindir in "" \
/usr \
@@ -753,16 +753,18 @@
fi
]
)
- if test -z "$ssllibdir"; then
+ if test -z "$libssl_LIBS"; then
AC_MSG_RESULT([Not found])
+ PKG_CHECK_MODULES([libssl], [openssl], [], [
echo
echo "Couldn't find your SSL library files."
echo "Use --with-ssl-lib-dir option to fix this problem or disable the"
echo "SSL support with --without-ssl"
echo
exit 1
+ ])
fi
- AC_MSG_RESULT([$ssllibdir])
+ AC_MSG_RESULT([$libssl_LIBS])
AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
AC_SUBST(sslincldir)
@@ -770,18 +772,18 @@
fi
# Add SSL includes and libraries
- if test "$sslincldir" -a "$ssllibdir"
+ if test "$libssl_CFLAGS" -a "$libssl_LIBS"
then
if test "x$ARCH" = "xDARWIN"; then
# Darwin already knows about ssldirs
LIBS="$LIBS -lssl -lcrypto"
elif test -f "/usr/kerberos/include/krb5.h"; then
# Redhat 9 compilation fix:
- CFLAGS="$CFLAGS -I$sslincldir -I/usr/kerberos/include"
- LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+ CFLAGS="$CFLAGS $libssl_CFLAGS -I/usr/kerberos/include"
+ LIBS="$LIBS $libssl_LIBS"
else
- CFLAGS="$CFLAGS -I$sslincldir"
- LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+ CFLAGS="$CFLAGS $libssl_CFLAGS"
+ LIBS="$LIBS $libssl_LIBS"
fi
fi
fi