diff options
author | Yorhel <git@yorhel.nl> | 2010-05-07 14:17:03 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-05-07 14:17:03 +0200 |
commit | 686084d6e0a33b4a91cd1ea3a572016c14efeb7e (patch) | |
tree | c0713542e800e3be575ef0017289b5dcab479f51 | |
parent | d942a0ebc6766437fbb09e27211d7f75d74e36b8 (diff) |
Added compll to the compilation environment and allow linking to zlib
-rw-r--r-- | .gitmodules | 3 | ||||
m--------- | compll | 0 | ||||
-rw-r--r-- | configure.in | 24 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
l--------- | src/compll.c | 1 | ||||
l--------- | src/compll.h | 1 |
6 files changed, 33 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..85c75f4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "compll"] + path = compll + url = git://g.blicky.net/compll.git/ diff --git a/compll b/compll new file mode 160000 +Subproject f089f64220c1a41532853c5e4ee17daa8f40b2f diff --git a/configure.in b/configure.in index c4ee13e..d350e0d 100644 --- a/configure.in +++ b/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 "" diff --git a/src/Makefile.am b/src/Makefile.am index 3047a5e..698d5eb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/compll.c b/src/compll.c new file mode 120000 index 0000000..60ae193 --- /dev/null +++ b/src/compll.c @@ -0,0 +1 @@ +../compll/compll.c
\ No newline at end of file diff --git a/src/compll.h b/src/compll.h new file mode 120000 index 0000000..0425579 --- /dev/null +++ b/src/compll.h @@ -0,0 +1 @@ +../compll/compll.h
\ No newline at end of file |