diff options
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7b6d515..37a2e0f 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,30 @@ AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"]) AC_SUBST([GCOV_CFLAGS]) AC_SUBST([GCOV_LDFLAGS]) +dnl Stolen from glib-networking - those guys rock +AC_MSG_CHECKING([location of system Certificate Authority list]) +AC_ARG_WITH(ca-certificates, + [AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@], + [path to system Certificate Authority list])]) +if test "$with_ca_certificates" = "no"; then + AC_MSG_RESULT([disabled]) +else + if test -z "$with_ca_certificates"; then + for f in /etc/pki/tls/certs/ca-bundle.crt \ + /etc/ssl/certs/ca-certificates.crt; do + if test -f "$f"; then + with_ca_certificates="$f" + fi + done + if test -z "$with_ca_certificates"; then + AC_MSG_ERROR([could not find. Use --with-ca-certificates=path to set, or --without-ca-certificates to disable]) + fi + fi + + AC_MSG_RESULT($with_ca_certificates) + AC_DEFINE_UNQUOTED(REST_SYSTEM_CA_FILE, ["$with_ca_certificates"], [The system TLS CA list]) +fi + AC_OUTPUT([ Makefile rest/Makefile |