Skip to content
Snippets Groups Projects
Commit 686084d6 authored by Yorhel's avatar Yorhel
Browse files

Added compll to the compilation environment and allow linking to zlib

parent d942a0eb
No related branches found
No related tags found
No related merge requests found
[submodule "compll"]
path = compll
url = git://g.blicky.net/compll.git/
compll @ f089f642
Subproject commit f089f64220c1a41532853c5e4ee17daa8f40b2ff
...@@ -18,6 +18,8 @@ AC_CHECK_HEADERS( ...@@ -18,6 +18,8 @@ AC_CHECK_HEADERS(
AC_TYPE_OFF_T AC_TYPE_OFF_T
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_STRUCT_ST_BLOCKS 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. # Check for library functions.
AC_CHECK_FUNCS( AC_CHECK_FUNCS(
...@@ -47,6 +49,28 @@ AC_CHECK_LIB([$ncurses], ...@@ -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]) AC_OUTPUT([Makefile src/Makefile doc/Makefile])
echo "" echo ""
......
bin_PROGRAMS = ncdu bin_PROGRAMS = ncdu
ncdu_SOURCES = browser.c calc.c delete.c dirlist.c exclude.c help.c main.c path.c util.c 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
../compll/compll.c
\ No newline at end of file
../compll/compll.h
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment