Added autotools configure option and build stuff to build tests;
This commit is contained in:
parent
af34a2515e
commit
a43f62e54e
10
configure.ac
10
configure.ac
@ -4,7 +4,7 @@ AC_INIT(ejabberdauth, m4_esyscmd([tr -d '\n' < VERSION]))
|
|||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([1.11] [foreign])
|
AM_INIT_AUTOMAKE([1.11] [foreign subdir-objects])
|
||||||
|
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
@ -12,6 +12,14 @@ AC_PROG_CC
|
|||||||
|
|
||||||
LT_INIT
|
LT_INIT
|
||||||
|
|
||||||
|
dnl options to build
|
||||||
|
AC_ARG_ENABLE([build_tests], AC_HELP_STRING([--enable-build-tests], [Enable tests build]))
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_build_tests" = "xyes"],
|
||||||
|
AC_DEFINE([BUILD_TESTS], 1, [tests building enabled]))
|
||||||
|
|
||||||
|
AM_CONDITIONAL(BUILD_TESTS, test "x$enable_build_tests" = "xyes")
|
||||||
|
|
||||||
dnl checking for dependencies
|
dnl checking for dependencies
|
||||||
dnl check for the openssl/libressl
|
dnl check for the openssl/libressl
|
||||||
PKG_CHECK_MODULES(OPENSSL, [openssl])
|
PKG_CHECK_MODULES(OPENSSL, [openssl])
|
||||||
|
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
ejabberdauth
|
ejabberdauth
|
||||||
.deps
|
.deps
|
||||||
|
testimap
|
||||||
|
@ -9,9 +9,19 @@ AM_CPPFLAGS = \
|
|||||||
|
|
||||||
AM_CFLAGS = -Wall -g
|
AM_CFLAGS = -Wall -g
|
||||||
|
|
||||||
|
if BUILD_TESTS
|
||||||
|
bin_PROGRAMS = ejabberdauth testimap
|
||||||
|
else
|
||||||
bin_PROGRAMS = ejabberdauth
|
bin_PROGRAMS = ejabberdauth
|
||||||
|
endif
|
||||||
|
|
||||||
ejabberdauth_SOURCES = main.c eport.c tls.c imap.c
|
ejabberdauth_SOURCES = main.c eport.c tls.c imap.c
|
||||||
|
|
||||||
ejabberdauth_LDADD = $(LIBS) $(OPENSSL_LIBS)
|
ejabberdauth_LDADD = $(LIBS) $(OPENSSL_LIBS)
|
||||||
|
|
||||||
|
if BUILD_TESTS
|
||||||
|
testimap_SOURCES = tls.c imap.c tests/testimap.c
|
||||||
|
|
||||||
|
testimap_LDADD = $(LIBS) $(OPENSSL_LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user