[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit-dev] [monit] r263 committed - add --with-ssl-static option
From: |
monit |
Subject: |
[monit-dev] [monit] r263 committed - add --with-ssl-static option |
Date: |
Sat, 18 Sep 2010 14:20:03 +0000 |
Revision: 263
Author: martin2812
Date: Sat Sep 18 07:19:27 2010
Log: add --with-ssl-static option
http://code.google.com/p/monit/source/detail?r=263
Modified:
/trunk/configure.ac
=======================================
--- /trunk/configure.ac Sat Sep 18 06:36:12 2010
+++ /trunk/configure.ac Sat Sep 18 07:19:27 2010
@@ -556,7 +556,7 @@
# SSL Code
# ------------------------------------------------------------------------
-# Check for ssl includes (take from the stunnel project)
+# Check for ssl includes (taken from the stunnel project)
checksslincldir() { :
if test -f "$1/openssl/ssl.h"; then
sslincldir="$1"
@@ -566,156 +566,191 @@
}
# Check for ssl libraries
-checkssllibdir() { :
- if test "(" -f "$1/libcrypto.so" -o -f "$1/libcrypto.a" -o
-f "$1/libcrypto.dylib" ")" -a \
- "(" -f "$1/libssl.so" -o -f "$1/libssl.a" -o
-f "$1/libssl.dylib" ")" ; then
+checkssllibdirdynamic() { :
+ if test "(" -f "$1/libcrypto.so" -o -f "$1/libcrypto.dylib" ")" -a \
+ "(" -f "$1/libssl.so" -o -f "$1/libssl.dylib" ")" ; then
ssllibdir="$1"
return 0
fi
return 1
}
+
+checkssllibdirstatic() { :
+ if test "(" -f "$1/libcrypto.a" ")" -a \
+ "(" -f "$1/libssl.a" ")" ; then
+ ssllibdir="$1"
+ return 0
+ fi
+ return 1
+}
# Check if we want to have SSL
-AC_MSG_CHECKING([for SSL support])
-AC_ARG_WITH(ssl,
- [ --without-ssl disable the use of ssl (default: enabled)],
+
+AC_MSG_CHECKING([for static SSL support])
+
+AC_ARG_WITH(ssl-static,
+ [ --with-ssl-static=DIR location of SSL installation],
[
- dnl Check the withvalue
- if test "x$withval" = "xno" ; then
- use_ssl=0
- AC_MSG_RESULT([disabled])
- fi
- if test "x$withval" = "xyes" ; then
- use_ssl=1
- AC_MSG_RESULT([enabled])
- fi
+ dnl Check the specified location only
+ for dir in "$withval" "$withval/include"; do
+ checksslincldir "$dir"
+ done
+ for dir in "$withval" "$withval/lib"; do
+ checkssllibdirstatic "$dir" && break 2
+ done
+ use_sslstatic=1
+ AC_MSG_RESULT([enabled])
+ 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"
],
[
- use_ssl=1
- AC_MSG_RESULT([enabled])
+ use_sslstatic=0
+ AC_MSG_RESULT([disabled])
]
)
-
-# Check for SSL directory (take from the stunnel project)
-if test "$use_ssl" = "1"; then
- AC_ARG_WITH(ssl-dir,
- [ --with-ssl-dir=DIR location of SSL installation],
+if test "$use_sslstatic" = "0"
+then
+ AC_MSG_CHECKING([for SSL support])
+
+ AC_ARG_WITH(ssl,
+ [ --without-ssl disable the use of ssl (default:
enabled)],
[
- dnl Check the specified location only
- for dir in "$withval" "$withval/include"; do
- checksslincldir "$dir"
- done
- for dir in "$withval" "$withval/lib"; do
- checkssllibdir "$dir" && break 2
- done
- ]
- )
-
- AC_MSG_CHECKING([for SSL include directory])
-
- AC_ARG_WITH(ssl-incl-dir,
- [ --with-ssl-incl-dir=DIR location of installed SSL include
files],
- [
- dnl Check the specified location only
- checksslincldir "$withval"
+ dnl Check the withvalue
+ if test "x$withval" = "xno" ; then
+ use_ssl=0
+ AC_MSG_RESULT([disabled])
+ fi
+ if test "x$withval" = "xyes" ; then
+ use_ssl=1
+ AC_MSG_RESULT([enabled])
+ fi
],
[
- if test -z "$sslincldir"; then
- dnl Search default locations of SSL includes
- for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt
/usr/sfw; do
- for dir in "$maindir/include"\
- "$maindir/include/openssl"\
- "$maindir/include/ssl"\
- "$maindir/ssl/include"; do
- checksslincldir $dir && break 2
- done
- done
- fi
+ use_ssl=1
+ AC_MSG_RESULT([enabled])
]
)
- if test -z "$sslincldir"; then
- AC_MSG_RESULT([Not found])
- echo
- echo "Couldn't find your SSL header files."
- echo "Use --with-ssl-incl-dir option to fix this problem or
disable"
- echo "the SSL support with --without-ssl"
- echo
- exit 1
- fi
-
- AC_MSG_RESULT([$sslincldir])
-
- AC_MSG_CHECKING([for SSL library directory])
-
- AC_ARG_WITH(ssl-lib-dir,
- [ --with-ssl-lib-dir=DIR location of installed SSL library
files],
- [
- dnl Check the specified location only
- checkssllibdir "$withval"
- ],
- [
- if test -z "$ssllibdir"; then
- dnl Search default locations of SSL libraries
- for maindir in /usr \
- /usr/local \
- /usr/pkg \
- /var /opt \
- /usr/sfw; do
- for dir in $maindir \
- $maindir/openssl \
- $maindir/ssl \
- $maindir/lib \
- $maindir/lib/openssl \
- $maindir/lib/ssl \
- $maindir/ssl/lib \
- $maindir/lib/64 \
- $maindir/lib/64/openssl \
- $maindir/lib/64/ssl \
- $maindir/ssl/lib/64 \
- $maindir/lib64 \
- $maindir/lib64/openssl \
- $maindir/lib64/ssl \
- $maindir/ssl/lib64; do
- checkssllibdir $dir && break 2
+
+ # Check for SSL directory (taken from the stunnel project)
+ if test "$use_ssl" = "1"; then
+
+ AC_ARG_WITH(ssl-dir,
+ [ --with-ssl-dir=DIR location of SSL installation],
+ [
+ dnl Check the specified location only
+ for dir in "$withval" "$withval/include"; do
+ checksslincldir "$dir"
+ done
+ for dir in "$withval" "$withval/lib"; do
+ checkssllibdirdynamic "$dir" && break 2
+ done
+ ]
+ )
+
+ AC_MSG_CHECKING([for SSL include directory])
+ AC_ARG_WITH(ssl-incl-dir,
+ [ --with-ssl-incl-dir=DIR location of installed SSL include
files],
+ [
+ dnl Check the specified location only
+ checksslincldir "$withval"
+ ],
+ [
+ if test -z "$sslincldir"; then
+ dnl Search default locations of SSL includes
+ for maindir in /usr /usr/local /usr/lib /usr/pkg /var
/opt /usr/sfw; do
+ for dir in "$maindir/include"\
+ "$maindir/include/openssl"\
+ "$maindir/include/ssl"\
+ "$maindir/ssl/include"; do
+ checksslincldir $dir && break 2
+ done
done
- done
- fi
- ]
- )
-
- if test -z "$ssllibdir"; then
- AC_MSG_RESULT([Not found])
- 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_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
- AC_SUBST(sslincldir)
- AC_SUBST(ssllibdir)
-fi
-
-# Add SSL includes and libraries
-if test "$sslincldir" -a "$ssllibdir"
-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"
- else
- CFLAGS="$CFLAGS -I$sslincldir"
- LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+ fi
+ ]
+ )
+ if test -z "$sslincldir"; then
+ AC_MSG_RESULT([Not found])
+ echo
+ echo "Couldn't find your SSL header files."
+ echo "Use --with-ssl-incl-dir option to fix this problem or
disable"
+ echo "the SSL support with --without-ssl"
+ echo
+ exit 1
+ fi
+ AC_MSG_RESULT([$sslincldir])
+
+ AC_MSG_CHECKING([for SSL library directory])
+ AC_ARG_WITH(ssl-lib-dir,
+ [ --with-ssl-lib-dir=DIR location of installed SSL library
files],
+ [
+ dnl Check the specified location only
+ checkssllibdirdynamic "$withval"
+ ],
+ [
+ if test -z "$ssllibdir"; then
+ dnl Search default locations of SSL libraries
+ for maindir in /usr \
+ /usr/local \
+ /usr/pkg \
+ /var /opt \
+ /usr/sfw; do
+ for dir in $maindir \
+ $maindir/openssl \
+ $maindir/ssl \
+ $maindir/lib \
+ $maindir/lib/openssl \
+ $maindir/lib/ssl \
+ $maindir/ssl/lib \
+ $maindir/lib/64 \
+ $maindir/lib/64/openssl \
+ $maindir/lib/64/ssl \
+ $maindir/ssl/lib/64 \
+ $maindir/lib64 \
+ $maindir/lib64/openssl \
+ $maindir/lib64/ssl \
+ $maindir/ssl/lib64; do
+ checkssllibdirdynamic $dir && break 2
+ done
+ done
+ fi
+ ]
+ )
+ if test -z "$ssllibdir"; then
+ AC_MSG_RESULT([Not found])
+ 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_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have openssl.])
+ AC_SUBST(sslincldir)
+ AC_SUBST(ssllibdir)
fi
+
+ # Add SSL includes and libraries
+ if test "$sslincldir" -a "$ssllibdir"
+ 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"
+ else
+ CFLAGS="$CFLAGS -I$sslincldir"
+ LIBS="$LIBS -L$ssllibdir -lssl -lcrypto"
+ fi
+ fi
fi
# ------------------------------------------------------------------------
@@ -735,7 +770,7 @@
else
echo " PAM support: disabled"
fi
-if test "$use_ssl" = "1"; then
+if test "$use_sslstatic" = "1" -o "$use_ssl" = "1"; then
echo " SSL support: enabled"
echo " SSL include directory: ${sslincldir}"
echo " SSL library directory: ${ssllibdir}"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [monit-dev] [monit] r263 committed - add --with-ssl-static option,
monit <=