Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Commit

Permalink
Added a test to check if the user wants gnutls to be supported and if…
Browse files Browse the repository at this point in the history
… they do, check if they have it installed and otherwise give an error.
  • Loading branch information
gpadd committed Jun 8, 2013
1 parent e24e171 commit 53799ad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ SOURCES = \
irc/tagged-hook.scm \
irc/irc.scm \
irc/handlers.scm
if GNUTLS
SOURCES += \
irc/gnutls.scm \
irc/network.scm
else
SOURCES +=
endif

info_TEXINFOS = doc/api.texi

Expand Down
24 changes: 18 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AC_INIT(guile-irc, 0.2)
AC_CONFIG_SRCDIR(irc/irc.scm)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
AM_SILENT_RULES([yes])
AM_SILENT_RULES([yes])

GUILE_PROGS

Expand All @@ -14,11 +14,23 @@ if $GUILE_TOOLS | grep -q compile; then
else
AC_MSG_ERROR([Guile 2.0 required.])
fi
if gnutls-cli --help | grep -q USAGE:; then
# good, it seems to be installed
true
else
AC_MSG_ERROR([GnuTLS required])

AC_ARG_ENABLE([gnutls],
[ --enable-gnutls Turn on gnutls],
[case "${enableval}" in
yes) gnutls=true ;;
no) gnutls=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gnutls]) ;;
esac],[gnutls=false])
AM_CONDITIONAL([GNUTLS], [test x$gnutls = xtrue])

if $GNUTLS ; then
if gnutls-cli --help | grep -q USAGE:; then
# good, seems to be installed
true
else
AC_MSG_ERROR([GnuTLS required])
fi
fi

AC_CONFIG_FILES([Makefile] [doc/Makefile])
Expand Down

0 comments on commit 53799ad

Please sign in to comment.