Skip to content
Browse files

Move to PKG_CHECK_MODULES for libraries.

  • Loading branch information...
1 parent b3781eb commit 1d5e015b91e480469f9ae7cb372c5023f27a53e8 @davidstrauss davidstrauss committed
Showing with 10 additions and 15 deletions.
  1. +0 −2 Makefile.am
  2. +3 −6 configure.ac
  3. +2 −2 src/Makefile.am
  4. +4 −4 src/statcache.c
  5. +1 −1 src/statcache.h
View
2 Makefile.am
@@ -1,5 +1,3 @@
-# $Id$
-
# This file is part of fusedav.
#
# fusedav is free software; you can redistribute it and/or modify it
View
9 configure.ac
@@ -1,8 +1,6 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-# $Id$
-
# This file is part of fusedav.
#
# fusedav is free software; you can redistribute it and/or modify it
@@ -107,11 +105,10 @@ AC_FUNC_MALLOC
AC_CHECK_FUNCS([ftruncate memset strdup strerror strrchr memchr strchr strcspn])
AC_CHECK_LIB([pthread], [pthread_create])
-AC_CHECK_LIB([systemd-journal], [sd_journal_send])
-AC_CHECK_LIB([yaml], [yaml_parser_initialize])
-AC_CHECK_LIB([leveldb], [leveldb_open])
-#PKG_CHECK_MODULES(LIBYAML, libyaml >= 1.2 )
+PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-journal ] )
+PKG_CHECK_MODULES(YAML, [ yaml-0.1 ] )
+PKG_CHECK_MODULES(LEVELDB, [ leveldb ])
PKG_CHECK_MODULES(NEON, [ neon >= 0.29 ])
PKG_CHECK_MODULES(FUSE, [ fuse >= 2.8 ])
View
4 src/Makefile.am
@@ -24,5 +24,5 @@ fusedav_SOURCES=fusedav.c fusedav.h \
session.c session.h \
log.c log.h
-fusedav_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS) $(FUSE_CFLAGS) -DFUSE_USE_VERSION=26
-fusedav_LDADD = -lpthread $(NEON_LIBS) $(FUSE_LIBS)
+fusedav_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS) $(FUSE_CFLAGS) $(YAML_CFLAGS) $(LEVELDB_CFLAGS) $(SYSTEMD_CFLAGS) -DFUSE_USE_VERSION=26
+fusedav_LDADD = -lpthread $(NEON_LIBS) $(FUSE_LIBS) $(YAML_LIBS) $(LEVELDB_LIBS) $(SYSTEMD_LIBS)
View
8 src/statcache.c
@@ -116,7 +116,7 @@ static const char *key2path(const char *key) {
return NULL;
}
-int stat_cache_open(stat_cache_t **c, char *cache_path) {
+int stat_cache_open(stat_cache_t **cache, char *cache_path) {
#ifdef HAVE_LIBLEVELDB
char *error = NULL;
char storage_path[PATH_MAX];
@@ -145,7 +145,7 @@ int stat_cache_open(stat_cache_t **c, char *cache_path) {
// Use a fusedav logger.
leveldb_options_set_info_log(options, NULL);
- *c = leveldb_open(options, storage_path, &error);
+ *cache = leveldb_open(options, storage_path, &error);
if (error) {
log_print(LOG_ERR, "ERROR opening db: %s", error);
return -1;
@@ -154,10 +154,10 @@ int stat_cache_open(stat_cache_t **c, char *cache_path) {
return 0;
}
-int stat_cache_close(stat_cache_t *c) {
+int stat_cache_close(stat_cache_t *cache) {
#ifdef HAVE_LIBLEVELDB
if (c != NULL)
- leveldb_close(c);
+ leveldb_close(cache);
#endif
return 0;
}
View
2 src/statcache.h
@@ -49,7 +49,7 @@ int print_stat(struct stat *stbuf, const char *title);
unsigned long stat_cache_get_local_generation(void);
-int stat_cache_open(stat_cache_t **cache, char *storage_path);
+int stat_cache_open(stat_cache_t **cache, char *cache_path);
int stat_cache_close(stat_cache_t *cache);
struct stat_cache_value *stat_cache_value_get(stat_cache_t *cache, const char *path);

0 comments on commit 1d5e015

Please sign in to comment.
Something went wrong with that request. Please try again.