diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-05 15:42:36 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-07 09:42:50 -0800 |
commit | 4841039e5385f264d12757903894f47c64f59361 (patch) | |
tree | 0b3aae75c4062e4f10ff59068ba73baa0dc7c2ae /configure.ac | |
parent | aef0c8dd129838ac35b3cf8a7cdf04c7fd67dff1 (diff) | |
download | xorg-lib-libXpm-4841039e5385f264d12757903894f47c64f59361.tar.gz |
configure: add --disable-open-zfile instead of requiring -DNO_ZPIPE
Documents the two compression options in the README, makes their
configure options reflect the interdependency of their implementation,
and makes the configure script report their configuration.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 789a96e..1b64830 100644 --- a/configure.ac +++ b/configure.ac @@ -49,25 +49,35 @@ if test "x$USE_GETTEXT" = "xyes" ; then fi AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes") +# Optional feature: When a filename ending in .Z or .gz is requested, +# open a pipe to a newly forked compress/uncompress/gzip/gunzip command to +# handle it. +AC_MSG_CHECKING([whether to handle compressed pixmaps]) +case $host_os in + *mingw*) zpipe_default="no" ;; + *) zpipe_default="yes" ;; +esac +AC_ARG_ENABLE(open-zfile, + AS_HELP_STRING([--enable-open-zfile], + [Search for files with .Z & .gz extensions automatically @<:@default=auto@:>@]), + [OPEN_ZFILE=$enableval], [OPEN_ZFILE=yes]) +AC_MSG_RESULT([$OPEN_ZFILE]) +if test x$OPEN_ZFILE = xno ; then + AC_DEFINE(NO_ZPIPE, 1, [Define to 1 to disable decompression via pipes]) +fi + # Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz # Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile +AC_MSG_CHECKING([whether to search for compressed pixmaps]) AC_ARG_ENABLE(stat-zfile, - AS_HELP_STRING([--enable-stat-zfile], - [Search for files with .Z & .gz extensions automatically @<:@default=yes@:>@]), - [STAT_ZFILE=$enableval], [STAT_ZFILE=yes]) + AS_HELP_STRING([--enable-stat-zfile], + [Search for files with .Z & .gz extensions automatically @<:@default=auto@:>@]), + [STAT_ZFILE=$enableval], [STAT_ZFILE=$OPEN_ZFILE]) +AC_MSG_RESULT([$STAT_ZFILE]) if test x$STAT_ZFILE = xyes ; then - AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions]) + AC_DEFINE(STAT_ZFILE, 1, [Define to 1 to automatically look for files with .Z & .gz extensions]) fi - -case $host_os in - *mingw*) - AC_DEFINE(NO_ZPIPE, 1, [Define to 1 to disable decompression via pipes]) - ;; - *) - ;; -esac - AC_CONFIG_FILES([Makefile doc/Makefile include/Makefile |