AC_PREREQ([2.63])
AC_INIT([umurmur], [0.2.14], [http://code.google.com/p/umurmur/issues/entry], [umurmur], [http://code.google.com/p/umurmur])
AC_CONFIG_SRCDIR([src/client.h])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([src/config.h])
AM_INIT_AUTOMAKE
AC_CANONICAL_HOST
AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([could not find libssl])])
])
+AM_CONDITIONAL(USE_OPENSSL, test x$with_ssl = xopenssl)
+AM_CONDITIONAL(USE_GNUTLS, test x$with_ssl = xgnutls)
+
AC_DEFINE([DEFAULT_CONFIG], ["/etc/umurmur.conf"], [Default config])
# Checks for header files.
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bin_PROGRAMS=umurmurd
-umurmurd_SOURCES=client.c main.c messages.c pds.c server.c ssl.c log.c conf.c crypt.c timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c ban.c
+umurmurd_SOURCES=client.c main.c messages.c pds.c server.c log.c conf.c crypt.c timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c ban.c
+if USE_OPENSSL
+umurmurd_SOURCES+=ssli_openssl.c
+else
+if USE_GNUTLS
+umurmurd_SOURCES+=ssli_gnutls.c
+else
+umurmurd_SOURCES+=ssli_polarssl.c
+endif
+endif