Make building unit tests optional
This commit is contained in:
parent
92b5533333
commit
3569288f8a
|
@ -26,6 +26,7 @@ Doxyfile
|
|||
Makefile
|
||||
*.log
|
||||
*.scan
|
||||
*.trs
|
||||
config.status
|
||||
doc
|
||||
src/.deps
|
||||
|
|
|
@ -9,7 +9,9 @@ CFLAGS = -g -O2 -Wall -Wextra -Wshadow $(NUCLA) \
|
|||
$(pkgconf_CFLAGS) $(fuse_CFLAGS) $(fuse_LIBS)
|
||||
LIBS += $(pkgconf_LIBS) $(fuse_LIBS)
|
||||
|
||||
if UNITTESTS
|
||||
SUBDIRS = test
|
||||
endif
|
||||
|
||||
man_MANS = doc/man/httpdirfs.1
|
||||
CLEANFILES = doc/man/*
|
||||
|
|
|
@ -212,7 +212,7 @@ am__define_uniq_tagged_files = \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DIST_SUBDIRS = test
|
||||
am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in \
|
||||
README.md compile config.guess config.sub depcomp install-sh \
|
||||
missing
|
||||
|
@ -373,7 +373,7 @@ top_srcdir = @top_srcdir@
|
|||
httpdirfs_SOURCES = src/main.c src/network.c src/fuse_local.c src/link.c \
|
||||
src/cache.c src/util.c src/sonic.c src/log.c src/config.c src/memcache.c
|
||||
|
||||
SUBDIRS = test
|
||||
@UNITTESTS_TRUE@SUBDIRS = test
|
||||
man_MANS = doc/man/httpdirfs.1
|
||||
CLEANFILES = doc/man/*
|
||||
DISTCLEANFILES = doc/html/*
|
||||
|
|
18
README.md
18
README.md
|
@ -99,6 +99,24 @@ Build and install:
|
|||
Apple's command-line build tools are usually installed as part of setting up
|
||||
Homebrew. HTTPDirFS will be installed in ``/usr/local``.
|
||||
|
||||
## Running Tests
|
||||
GoogleTest is the utilized unit test framework. Google recommends you live
|
||||
at head, so it is also recommended that you compile and install the latest from
|
||||
[source](https://github.com/google/googletest.git), since what you install from
|
||||
a repository may be outdated. Below are the package names if installing from a
|
||||
repository
|
||||
|
||||
### Ubuntu and Debian
|
||||
libgtest-dev
|
||||
|
||||
### FreeBSD and macOS
|
||||
googletest
|
||||
|
||||
Build and run tests
|
||||
|
||||
./configure --enable-unittests
|
||||
make check
|
||||
|
||||
## Usage
|
||||
|
||||
./httpdirfs -f --cache $URL $MOUNT_POINT
|
||||
|
|
|
@ -616,10 +616,12 @@ ac_subst_vars='am__EXEEXT_FALSE
|
|||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
fuse_LIBS
|
||||
fuse_CFLAGS
|
||||
pkgconf_LIBS
|
||||
pkgconf_CFLAGS
|
||||
UNITTESTS_FALSE
|
||||
UNITTESTS_TRUE
|
||||
fuse_LIBS
|
||||
fuse_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
|
@ -725,6 +727,7 @@ ac_user_opts='
|
|||
enable_option_checking
|
||||
enable_dependency_tracking
|
||||
enable_silent_rules
|
||||
enable_unittests
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -740,10 +743,10 @@ CCC
|
|||
PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
pkgconf_CFLAGS
|
||||
pkgconf_LIBS
|
||||
fuse_CFLAGS
|
||||
fuse_LIBS'
|
||||
fuse_LIBS
|
||||
pkgconf_CFLAGS
|
||||
pkgconf_LIBS'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -1376,6 +1379,7 @@ Optional Features:
|
|||
speeds up one-time build
|
||||
--enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
--disable-silent-rules verbose build output (undo: "make V=0")
|
||||
--enable-unittests build the unit tests (default is NO)
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
|
@ -1392,12 +1396,12 @@ Some influential environment variables:
|
|||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
fuse_CFLAGS C compiler flags for fuse, overriding pkg-config
|
||||
fuse_LIBS linker flags for fuse, overriding pkg-config
|
||||
pkgconf_CFLAGS
|
||||
C compiler flags for pkgconf, overriding pkg-config
|
||||
pkgconf_LIBS
|
||||
linker flags for pkgconf, overriding pkg-config
|
||||
fuse_CFLAGS C compiler flags for fuse, overriding pkg-config
|
||||
fuse_LIBS linker flags for fuse, overriding pkg-config
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
@ -2632,8 +2636,6 @@ IFS=$ac_save_IFS
|
|||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile Doxyfile test/Makefile"
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5104,6 +5106,9 @@ END
|
|||
fi
|
||||
fi
|
||||
|
||||
ac_config_files="$ac_config_files Makefile Doxyfile"
|
||||
|
||||
# This is separate because we need to be able to use $(fuse_LIBS) in CFLAGS
|
||||
|
||||
|
||||
|
||||
|
@ -5235,98 +5240,6 @@ printf "%s\n" "no" >&6; }
|
|||
fi
|
||||
fi
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gumbo libcurl uuid expat openssl gtest" >&5
|
||||
printf %s "checking for gumbo libcurl uuid expat openssl gtest... " >&6; }
|
||||
|
||||
if test -n "$pkgconf_CFLAGS"; then
|
||||
pkg_cv_pkgconf_CFLAGS="$pkgconf_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl gtest\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl gtest") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_CFLAGS=`$PKG_CONFIG --cflags "gumbo libcurl uuid expat openssl gtest" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$pkgconf_LIBS"; then
|
||||
pkg_cv_pkgconf_LIBS="$pkgconf_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl gtest\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl gtest") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_LIBS=`$PKG_CONFIG --libs "gumbo libcurl uuid expat openssl gtest" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gumbo libcurl uuid expat openssl gtest" 2>&1`
|
||||
else
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gumbo libcurl uuid expat openssl gtest" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$pkgconf_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (gumbo libcurl uuid expat openssl gtest) were not met:
|
||||
|
||||
$pkgconf_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
pkgconf_CFLAGS=$pkg_cv_pkgconf_CFLAGS
|
||||
pkgconf_LIBS=$pkg_cv_pkgconf_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
# This is separate because we need to be able to use $(fuse_LIBS) in CFLAGS
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse" >&5
|
||||
printf %s "checking for fuse... " >&6; }
|
||||
|
@ -5417,6 +5330,211 @@ else
|
|||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
# Check whether --enable-unittests was given.
|
||||
if test ${enable_unittests+y}
|
||||
then :
|
||||
enableval=$enable_unittests; unittests=$enableval
|
||||
else $as_nop
|
||||
unittests=no
|
||||
fi
|
||||
|
||||
if test "x$unittests" = "xyes"; then
|
||||
UNITTESTS_TRUE=
|
||||
UNITTESTS_FALSE='#'
|
||||
else
|
||||
UNITTESTS_TRUE='#'
|
||||
UNITTESTS_FALSE=
|
||||
fi
|
||||
|
||||
if test "x$unittests" = "xyes"; then
|
||||
ac_config_files="$ac_config_files test/Makefile"
|
||||
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gumbo libcurl uuid expat openssl gtest" >&5
|
||||
printf %s "checking for gumbo libcurl uuid expat openssl gtest... " >&6; }
|
||||
|
||||
if test -n "$pkgconf_CFLAGS"; then
|
||||
pkg_cv_pkgconf_CFLAGS="$pkgconf_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl gtest\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl gtest") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_CFLAGS=`$PKG_CONFIG --cflags "gumbo libcurl uuid expat openssl gtest" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$pkgconf_LIBS"; then
|
||||
pkg_cv_pkgconf_LIBS="$pkgconf_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl gtest\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl gtest") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_LIBS=`$PKG_CONFIG --libs "gumbo libcurl uuid expat openssl gtest" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gumbo libcurl uuid expat openssl gtest" 2>&1`
|
||||
else
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gumbo libcurl uuid expat openssl gtest" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$pkgconf_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (gumbo libcurl uuid expat openssl gtest) were not met:
|
||||
|
||||
$pkgconf_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
pkgconf_CFLAGS=$pkg_cv_pkgconf_CFLAGS
|
||||
pkgconf_LIBS=$pkg_cv_pkgconf_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
else
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gumbo libcurl uuid expat openssl" >&5
|
||||
printf %s "checking for gumbo libcurl uuid expat openssl... " >&6; }
|
||||
|
||||
if test -n "$pkgconf_CFLAGS"; then
|
||||
pkg_cv_pkgconf_CFLAGS="$pkgconf_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_CFLAGS=`$PKG_CONFIG --cflags "gumbo libcurl uuid expat openssl" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$pkgconf_LIBS"; then
|
||||
pkg_cv_pkgconf_LIBS="$pkgconf_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gumbo libcurl uuid expat openssl\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "gumbo libcurl uuid expat openssl") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_pkgconf_LIBS=`$PKG_CONFIG --libs "gumbo libcurl uuid expat openssl" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gumbo libcurl uuid expat openssl" 2>&1`
|
||||
else
|
||||
pkgconf_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gumbo libcurl uuid expat openssl" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$pkgconf_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (gumbo libcurl uuid expat openssl) were not met:
|
||||
|
||||
$pkgconf_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
Alternatively, you may set the environment variables pkgconf_CFLAGS
|
||||
and pkgconf_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
pkgconf_CFLAGS=$pkg_cv_pkgconf_CFLAGS
|
||||
pkgconf_LIBS=$pkg_cv_pkgconf_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
@ -5590,6 +5708,10 @@ else
|
|||
am__EXEEXT_FALSE=
|
||||
fi
|
||||
|
||||
if test -z "${UNITTESTS_TRUE}" && test -z "${UNITTESTS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"UNITTESTS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
: "${CONFIG_STATUS=./config.status}"
|
||||
ac_write_fail=0
|
||||
|
@ -6157,10 +6279,10 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
for ac_config_target in $ac_config_targets
|
||||
do
|
||||
case $ac_config_target in
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
|
||||
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -1,6 +1,5 @@
|
|||
AC_INIT([httpdirfs],[1.2.5])
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CONFIG_FILES([Makefile Doxyfile test/Makefile])
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_SEARCH_LIBS([backtrace],[execinfo])
|
||||
|
@ -9,7 +8,20 @@ AC_SEARCH_LIBS([backtrace],[execinfo])
|
|||
AX_CHECK_COMPILE_FLAG([-Wunused-command-line-argument],[NUCLA=-Wno-unused-command-line-argument],[-Werror])
|
||||
AC_SUBST([NUCLA])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
PKG_CHECK_MODULES([pkgconf],[gumbo libcurl uuid expat openssl gtest])
|
||||
AC_CONFIG_FILES([Makefile Doxyfile])
|
||||
# This is separate because we need to be able to use $(fuse_LIBS) in CFLAGS
|
||||
PKG_CHECK_MODULES([fuse],[fuse])
|
||||
|
||||
AC_ARG_ENABLE([unittests],
|
||||
[AS_HELP_STRING([--enable-unittests],
|
||||
[build the unit tests (default is NO)])],
|
||||
[unittests=$enableval], [unittests=no])
|
||||
AM_CONDITIONAL([UNITTESTS], [test "x$unittests" = "xyes"])
|
||||
if test "x$unittests" = "xyes"; then
|
||||
AC_CONFIG_FILES([test/Makefile])
|
||||
PKG_CHECK_MODULES([pkgconf],[gumbo libcurl uuid expat openssl gtest])
|
||||
else
|
||||
PKG_CHECK_MODULES([pkgconf],[gumbo libcurl uuid expat openssl])
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
if UNITTESTS
|
||||
AM_CPPFLAGS = -I../src $(gtest_CPPFLAGS)
|
||||
AM_CXXFLAGS = -std=c++14
|
||||
LDADD = $(fuse_LIBS) $(pkgconf_LIBS) -lgtest_main $(gtest_LIBS)
|
||||
|
@ -13,4 +14,4 @@ test_utilities_SOURCES = \
|
|||
../src/util.c \
|
||||
../src/log.c \
|
||||
../src/config.c
|
||||
|
||||
endif
|
||||
|
|
|
@ -87,8 +87,8 @@ NORMAL_UNINSTALL = :
|
|||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
check_PROGRAMS = test_utilities$(EXEEXT)
|
||||
noinst_PROGRAMS = test_utilities$(EXEEXT)
|
||||
@UNITTESTS_TRUE@check_PROGRAMS = test_utilities$(EXEEXT)
|
||||
@UNITTESTS_TRUE@noinst_PROGRAMS = test_utilities$(EXEEXT)
|
||||
subdir = test
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
|
@ -99,15 +99,17 @@ mkinstalldirs = $(install_sh) -d
|
|||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am__test_utilities_SOURCES_DIST = test_utilities.cpp ../src/util.c \
|
||||
../src/log.c ../src/config.c
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_test_utilities_OBJECTS = test_utilities.$(OBJEXT) \
|
||||
../src/util.$(OBJEXT) ../src/log.$(OBJEXT) \
|
||||
../src/config.$(OBJEXT)
|
||||
@UNITTESTS_TRUE@am_test_utilities_OBJECTS = test_utilities.$(OBJEXT) \
|
||||
@UNITTESTS_TRUE@ ../src/util.$(OBJEXT) ../src/log.$(OBJEXT) \
|
||||
@UNITTESTS_TRUE@ ../src/config.$(OBJEXT)
|
||||
test_utilities_OBJECTS = $(am_test_utilities_OBJECTS)
|
||||
test_utilities_LDADD = $(LDADD)
|
||||
am__DEPENDENCIES_1 =
|
||||
test_utilities_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
@UNITTESTS_TRUE@test_utilities_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
|
@ -153,7 +155,7 @@ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
|||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(test_utilities_SOURCES)
|
||||
DIST_SOURCES = $(test_utilities_SOURCES)
|
||||
DIST_SOURCES = $(am__test_utilities_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
@ -488,15 +490,15 @@ target_alias = @target_alias@
|
|||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CPPFLAGS = -I../src $(gtest_CPPFLAGS)
|
||||
AM_CXXFLAGS = -std=c++14
|
||||
LDADD = $(fuse_LIBS) $(pkgconf_LIBS) -lgtest_main $(gtest_LIBS)
|
||||
TESTS = $(check_PROGRAMS)
|
||||
test_utilities_SOURCES = \
|
||||
test_utilities.cpp \
|
||||
../src/util.c \
|
||||
../src/log.c \
|
||||
../src/config.c
|
||||
@UNITTESTS_TRUE@AM_CPPFLAGS = -I../src $(gtest_CPPFLAGS)
|
||||
@UNITTESTS_TRUE@AM_CXXFLAGS = -std=c++14
|
||||
@UNITTESTS_TRUE@LDADD = $(fuse_LIBS) $(pkgconf_LIBS) -lgtest_main $(gtest_LIBS)
|
||||
@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS)
|
||||
@UNITTESTS_TRUE@test_utilities_SOURCES = \
|
||||
@UNITTESTS_TRUE@ test_utilities.cpp \
|
||||
@UNITTESTS_TRUE@ ../src/util.c \
|
||||
@UNITTESTS_TRUE@ ../src/log.c \
|
||||
@UNITTESTS_TRUE@ ../src/config.c
|
||||
|
||||
all: all-am
|
||||
|
||||
|
|
Loading…
Reference in New Issue