mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-11 13:24:43 -04:00
Add configure options to disable installation, regression tests
The main reason for disabling installation is if you're building libevent as a subpackage for embedding: you want to have your main package's "make all" build libevent, but you don't want your main package's "make install" to install libevent.
This commit is contained in:
parent
0b334799d6
commit
49e9bb7fb0
19
Makefile.am
19
Makefile.am
@ -72,7 +72,7 @@ VERSION_INFO = 5:1:0
|
|||||||
dist_bin_SCRIPTS = event_rpcgen.py
|
dist_bin_SCRIPTS = event_rpcgen.py
|
||||||
|
|
||||||
pkgconfigdir=$(libdir)/pkgconfig
|
pkgconfigdir=$(libdir)/pkgconfig
|
||||||
pkgconfig_DATA=libevent.pc
|
LIBEVENT_PKGCONFIG=libevent.pc
|
||||||
|
|
||||||
# These sources are conditionally added by configure.in or conditionally
|
# These sources are conditionally added by configure.in or conditionally
|
||||||
# included from other files.
|
# included from other files.
|
||||||
@ -89,14 +89,21 @@ EXTRA_DIST = \
|
|||||||
Makefile.nmake test/Makefile.nmake \
|
Makefile.nmake test/Makefile.nmake \
|
||||||
$(PLATFORM_DEPENDENT_SRC)
|
$(PLATFORM_DEPENDENT_SRC)
|
||||||
|
|
||||||
lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la
|
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
|
||||||
if PTHREADS
|
if PTHREADS
|
||||||
lib_LTLIBRARIES += libevent_pthreads.la
|
LIBEVENT_LIBS_LA += libevent_pthreads.la
|
||||||
pkgconfig_DATA += libevent_pthreads.pc
|
LIBEVENT_PKGCONFIG += libevent_pthreads.pc
|
||||||
endif
|
endif
|
||||||
if OPENSSL
|
if OPENSSL
|
||||||
lib_LTLIBRARIES += libevent_openssl.la
|
LIBEVENT_LIBS_LA += libevent_openssl.la
|
||||||
pkgconfig_DATA += libevent_openssl.pc
|
LIBEVENT_PKGCONFIG += libevent_openssl.pc
|
||||||
|
endif
|
||||||
|
|
||||||
|
if INSTALL_LIBEVENT
|
||||||
|
lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
|
||||||
|
pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
|
||||||
|
else
|
||||||
|
noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = . include sample test
|
SUBDIRS = . include sample test
|
||||||
|
19
configure.in
19
configure.in
@ -42,6 +42,9 @@ if test "$GCC" = "yes" ; then
|
|||||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
enable_libevent_install_def=yes
|
||||||
|
enable_libevent_regress_def=yes
|
||||||
|
|
||||||
AC_ARG_ENABLE(gcc-warnings,
|
AC_ARG_ENABLE(gcc-warnings,
|
||||||
AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings with GCC))
|
AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings with GCC))
|
||||||
AC_ARG_ENABLE(thread-support,
|
AC_ARG_ENABLE(thread-support,
|
||||||
@ -56,6 +59,12 @@ AC_ARG_ENABLE(openssl,
|
|||||||
AC_ARG_ENABLE(debug-mode,
|
AC_ARG_ENABLE(debug-mode,
|
||||||
AS_HELP_STRING(--disable-debug-mode, disable support for running in debug mode),
|
AS_HELP_STRING(--disable-debug-mode, disable support for running in debug mode),
|
||||||
[], [enable_debug_mode=yes])
|
[], [enable_debug_mode=yes])
|
||||||
|
AC_ARG_ENABLE([libevent-install],
|
||||||
|
AS_HELP_STRING([--disable-libevent-install, disable installation of libevent]),
|
||||||
|
[], [enable_libevent_install=$enable_libevent_install_def])
|
||||||
|
AC_ARG_ENABLE([libevent-regress],
|
||||||
|
AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]),
|
||||||
|
[], [enable_libevent_regress=$enable_libevent_regress_def])
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
@ -65,6 +74,14 @@ dnl the command line with --enable-shared and --disable-shared.
|
|||||||
dnl AC_DISABLE_SHARED
|
dnl AC_DISABLE_SHARED
|
||||||
AC_SUBST(LIBTOOL_DEPS)
|
AC_SUBST(LIBTOOL_DEPS)
|
||||||
|
|
||||||
|
AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
|
||||||
|
if test "$enable_libevent_regress" = "yes" ; then
|
||||||
|
CHECK_REGRESS=regress
|
||||||
|
else
|
||||||
|
CHECK_REGRESS=
|
||||||
|
fi
|
||||||
|
AC_SUBST([CHECK_REGRESS])
|
||||||
|
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
AC_SEARCH_LIBS([inet_ntoa], [nsl])
|
AC_SEARCH_LIBS([inet_ntoa], [nsl])
|
||||||
AC_SEARCH_LIBS([socket], [socket])
|
AC_SEARCH_LIBS([socket], [socket])
|
||||||
@ -672,5 +689,7 @@ if test "$GCC" = yes ; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([LIBEVENT_GC_SECTIONS])
|
AC_SUBST([LIBEVENT_GC_SECTIONS])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([INSTALL_LIBEVENT], [test "$enable_libevent_install" = "yes"])
|
||||||
|
|
||||||
AC_CONFIG_FILES( [libevent.pc libevent_openssl.pc libevent_pthreads.pc] )
|
AC_CONFIG_FILES( [libevent.pc libevent_openssl.pc libevent_pthreads.pc] )
|
||||||
AC_OUTPUT(Makefile include/Makefile test/Makefile sample/Makefile)
|
AC_OUTPUT(Makefile include/Makefile test/Makefile sample/Makefile)
|
||||||
|
@ -4,14 +4,19 @@ AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -I$(top_srcdir)/include -I../
|
|||||||
|
|
||||||
EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c test.sh
|
EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c test.sh
|
||||||
|
|
||||||
noinst_PROGRAMS = test-init test-eof test-weof test-time regress \
|
noinst_PROGRAMS = test-init test-eof test-weof test-time @CHECK_REGRESS@ \
|
||||||
bench bench_cascade bench_http bench_httpclient test-ratelim \
|
bench bench_cascade bench_http bench_httpclient test-ratelim \
|
||||||
test-changelist
|
test-changelist
|
||||||
|
EXTRA_PROGRAMS = regress
|
||||||
noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h
|
noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h
|
||||||
|
|
||||||
TESTS = $(top_srcdir)/test/test.sh
|
TESTS = $(top_srcdir)/test/test.sh
|
||||||
|
|
||||||
BUILT_SOURCES = regress.gen.c regress.gen.h
|
BUILT_SOURCES =
|
||||||
|
if BUILD_REGRESS
|
||||||
|
BUILT_SOURCES += regress.gen.c regress.gen.h
|
||||||
|
endif
|
||||||
|
|
||||||
test_init_SOURCES = test-init.c
|
test_init_SOURCES = test-init.c
|
||||||
test_init_LDADD = ../libevent_core.la
|
test_init_LDADD = ../libevent_core.la
|
||||||
test_eof_SOURCES = test-eof.c
|
test_eof_SOURCES = test-eof.c
|
||||||
|
@ -97,6 +97,7 @@ run_tests () {
|
|||||||
announce FAILED ;
|
announce FAILED ;
|
||||||
FAILED=yes
|
FAILED=yes
|
||||||
fi
|
fi
|
||||||
|
test -x $TEST_DIR/regress || return
|
||||||
announce_n " regress: "
|
announce_n " regress: "
|
||||||
if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
|
if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user