mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Added compll to the compilation environment and allow linking to zlib
This commit is contained in:
parent
d942a0ebc6
commit
686084d6e0
6 changed files with 34 additions and 1 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "compll"]
|
||||
path = compll
|
||||
url = git://g.blicky.net/compll.git/
|
||||
1
compll
Submodule
1
compll
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit f089f64220c1a41532853c5e4ee17daa8f40b2ff
|
||||
24
configure.in
24
configure.in
|
|
@ -18,6 +18,8 @@ AC_CHECK_HEADERS(
|
|||
AC_TYPE_OFF_T
|
||||
AC_SYS_LARGEFILE
|
||||
AC_STRUCT_ST_BLOCKS
|
||||
AC_CHECK_TYPE([unsigned long long], [],
|
||||
[AC_MSG_ERROR([your compiler does not have an unsigned long long type.])])
|
||||
|
||||
# Check for library functions.
|
||||
AC_CHECK_FUNCS(
|
||||
|
|
@ -47,6 +49,28 @@ AC_CHECK_LIB([$ncurses],
|
|||
|
||||
|
||||
|
||||
# compll configuration (only zlib is supported currently)
|
||||
compll=no
|
||||
AC_ARG_WITH([compll],
|
||||
AC_HELP_STRING([--with-compll=zlib], [use zlib for in-memory compression (experimental)]),
|
||||
[compll=$withval])
|
||||
if test "x$compll" != "xno"; then
|
||||
AC_CHECK_LIB([z],
|
||||
[zlibVersion],
|
||||
[AC_CHECK_HEADER([zlib.h], [LIBS="$LIBS -lz"; compll=zlib],
|
||||
[if test "x$compll" = "xauto"; then compll=no
|
||||
else AC_MSG_ERROR([--with-compll is given, but zlib.h could not be found]); fi])
|
||||
],
|
||||
[if test "x$compll" = "xauto"; then compll=no
|
||||
else AC_MSG_ERROR([--with-compll is given, but no zlib library could not be found]); fi])
|
||||
fi
|
||||
if test "x$compll" = "xno"; then
|
||||
AC_DEFINE([COMPLL_NOLIB], [1], [don't use compll])
|
||||
fi
|
||||
AM_CONDITIONAL([COMPLL], [test "x$compll" != "xno"])
|
||||
|
||||
|
||||
|
||||
AC_OUTPUT([Makefile src/Makefile doc/Makefile])
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
bin_PROGRAMS = ncdu
|
||||
|
||||
ncdu_SOURCES = browser.c calc.c delete.c dirlist.c exclude.c help.c main.c path.c util.c
|
||||
if COMPLL
|
||||
ncdu_SOURCES += compll.c
|
||||
endif
|
||||
|
||||
noinst_HEADERS = browser.h calc.h delete.h dirlist.h exclude.h global.h help.h path.h util.h
|
||||
noinst_HEADERS = browser.h compll.h calc.h delete.h dirlist.h exclude.h global.h help.h path.h util.h
|
||||
|
|
|
|||
1
src/compll.c
Symbolic link
1
src/compll.c
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../compll/compll.c
|
||||
1
src/compll.h
Symbolic link
1
src/compll.h
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../compll/compll.h
|
||||
Loading…
Reference in a new issue