diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-07 13:39:56 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-08 14:50:03 -0800 |
commit | 501494c6c68a84114fdd0b44d4b67ef9cde776c9 (patch) | |
tree | fb5b1c7483d8f6859f52ed93c8ea931a1dde11ad /configure.ac | |
parent | 4841039e5385f264d12757903894f47c64f59361 (diff) |
test: Add unit tests using glib framework
Includes rudimentary tests for XpmReadFileToXpmImage, XpmReadFileToData,
XpmReadFileToBuffer, XpmCreateXpmImageFromData, XpmCreateXpmImageFromBuffer,
XpmWriteFileFromXpmImage, XpmWriteFileFromData, XpmWriteFileFromBuffer,
XpmAttributesSize, XpmGetErrorString, XpmLibraryVersion
Includes test cases for CVE-2004-0687
Tests .Z and .gz files if --enable-open-zfile is active
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 1b64830..2f90a68 100644 --- a/configure.ac +++ b/configure.ac @@ -13,10 +13,10 @@ AM_INIT_AUTOMAKE([foreign dist-xz]) # Initialize libtool AC_PROG_LIBTOOL -# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +# Require X.Org macros 1.16 or later for XORG_MEMORY_CHECK_FLAGS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.8) + [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.16) XORG_DEFAULT_OPTIONS # Checks for library functions @@ -62,6 +62,7 @@ AC_ARG_ENABLE(open-zfile, [Search for files with .Z & .gz extensions automatically @<:@default=auto@:>@]), [OPEN_ZFILE=$enableval], [OPEN_ZFILE=yes]) AC_MSG_RESULT([$OPEN_ZFILE]) +AM_CONDITIONAL(COMPRESSED_PIXMAPS, test "x$OPEN_ZFILE" = "xyes") if test x$OPEN_ZFILE = xno ; then AC_DEFINE(NO_ZPIPE, 1, [Define to 1 to disable decompression via pipes]) fi @@ -78,6 +79,12 @@ if test x$STAT_ZFILE = xyes ; then AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions]) fi +# --enable-unit-tests +AC_REQUIRE_AUX_FILE([tap-driver.sh]) +XORG_ENABLE_UNIT_TESTS +XORG_WITH_GLIB([2.46]) +XORG_MEMORY_CHECK_FLAGS + AC_CONFIG_FILES([Makefile doc/Makefile include/Makefile @@ -85,5 +92,6 @@ AC_CONFIG_FILES([Makefile src/Makefile sxpm/Makefile cxpm/Makefile + test/Makefile xpm.pc]) AC_OUTPUT |