summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2012-02-02 14:14:58 +0100
committerStef Walter <stefw@gnome.org>2012-02-03 20:44:47 +0100
commit06e8436557795490d65d46ec2b313035ff928274 (patch)
tree4b64553cb87b898581b047d37d925769e1c0f51a
parent9c20c4d65ea0e95ee589f50fe66bb4fb13bc5b03 (diff)
downloadlibsecret-06e8436557795490d65d46ec2b313035ff928274.tar.gz
Build fixes for 'make distcheck'
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am4
-rw-r--r--build/Makefile.am12
-rw-r--r--configure.ac60
-rw-r--r--library/Makefile.am14
-rw-r--r--library/tests/Makefile.am10
6 files changed, 67 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore
index 0da3c1e..e690b21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
*.gcda
*.gir
*.pc
+*.tar.gz
*.typelib
.deps
.cproject
diff --git a/Makefile.am b/Makefile.am
index 915217b..bc3c3ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,9 @@ SUBDIRS = build po egg library
DISTCHECK_CONFIGURE_FLAGS = \
--enable-debug=yes \
- --disable-coverage
+ --disable-coverage \
+ --enable-strict \
+ --disable-silent-rules
dist-hook:
@if test -d "$(srcdir)/.git"; \
diff --git a/build/Makefile.am b/build/Makefile.am
index f1cc400..73a8b1b 100644
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -6,10 +6,10 @@ VALGRIND_CONTRIB = \
$(NULL)
SUPPRESSIONS = \
- gcrypt.supp \
- glib.supp \
- pthread.supp \
- unknown.supp \
+ $(srcdir)/gcrypt.supp \
+ $(srcdir)/glib.supp \
+ $(srcdir)/pthread.supp \
+ $(srcdir)/unknown.supp \
$(NULL)
valgrind-suppressions: $(SUPPRESSIONS)
@@ -19,4 +19,8 @@ EXTRA_DIST = \
valgrind \
$(SUPPRESSIONS)
+CLEANFILES = \
+ valgrind-suppressions \
+ $(NULL)
+
all-local: valgrind-suppressions
diff --git a/configure.ac b/configure.ac
index 4c37406..e09b8ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,8 @@
-AC_PREREQ(2.65)
-AC_CONFIG_MACRO_DIR([build/m4])
+AC_PREREQ(2.63)
-AC_INIT([libsecret],[0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret])
+AC_INIT([libsecret],[0.1],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret],
+ [libsecret])
dnl ****************************************************************************
dnl Library package and libtool versioning
@@ -20,36 +21,43 @@ SECRET_CURRENT=0
SECRET_REVISION=0
SECRET_AGE=0
-AC_CONFIG_SRCDIR([library/secret-value.c])
-AC_CONFIG_HEADERS([config.h])
+# -----------------------------------------------------------------------------
-dnl Other initialization
-AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([build/m4])
+AM_INIT_AUTOMAKE([1.11 tar-ustar foreign -Wno-portability])
+AM_SANITY_CHECK
+AM_CONFIG_HEADER(config.h)
+AC_CONFIG_SRCDIR([library/secret-value.c])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE([enable])
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
-LT_INIT
-dnl Checks for programs.
+# -----------------------------------------------------------------------------
+# Basic tools
+
+AC_GNU_SOURCE
+AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
-
-AC_CHECK_FUNCS(mlock)
-
-# --------------------------------------------------------------------
-# intltool
-#
-
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])
-GETTEXT_PACKAGE=libsecret
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+GETTEXT_PACKAGE=libsecret
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
AM_GLIB_GNU_GETTEXT
# --------------------------------------------------------------------
+# Checks for functions
+
+AC_CHECK_FUNCS(mlock)
+
+# --------------------------------------------------------------------
# GLib
-#
PKG_CHECK_MODULES(GLIB,
glib-2.0 >= 2.31.0
@@ -63,7 +71,6 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
# --------------------------------------------------------------------
# libgcrypt
-#
GCRYPT_VERSION=1.2.2
GCRYPT_LIBVER=1
@@ -99,15 +106,10 @@ AM_CONDITIONAL(WITH_GCRYPT, test "$enable_gcrypt" = "yes")
# --------------------------------------------------------------------
# Compilation options
-#
-AC_ARG_ENABLE(more-warnings,
- AS_HELP_STRING([--disable-more-warnings], [Inhibit compiler warnings]),
- set_more_warnings=no)
-
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS \
- -Wall -Wstrict-prototypes -Wmissing-declarations \
+ -Wall -Wmissing-declarations \
-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
-Wdeclaration-after-statement -Wformat=2 -Winit-self \
-Waggregate-return -Wmissing-format-attribute"
@@ -140,7 +142,8 @@ if test "$enable_strict" = "yes"; then
-DGDK_PIXBUF_DISABLE_DEPRECATED"
INTROSPECTION_FLAGS="--warn-error"
TEST_MODE="thorough"
-else
+else
+ CFLAGS="$CFLAGS -Wno-error"
TEST_MODE="quick"
INTROSPECTION_FLAGS=""
$enable_strict="no"
@@ -166,6 +169,7 @@ if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -O0"
elif test "$enable_debug" = "no"; then
debug_status="no"
+ CFLAGS="$CFLAGS -O2"
AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
else
debug_status="default"
diff --git a/library/Makefile.am b/library/Makefile.am
index 9f7aa92..3bccea6 100644
--- a/library/Makefile.am
+++ b/library/Makefile.am
@@ -11,7 +11,9 @@ module_flags = \
-export-symbols-regex '^secret_'
INCLUDES = \
- -DSECRET_COMPILATION
+ -I$(top_srcdir) \
+ -DSECRET_COMPILATION \
+ $(NULL)
lib_LTLIBRARIES = libsecret-@SECRET_MAJOR@.la
@@ -51,6 +53,7 @@ PUBLIC_FILES = \
$(NULL)
INTERNAL_FILES = \
+ secret-private.h \
secret-session.c \
secret-util.c \
$(NULL)
@@ -133,5 +136,14 @@ EXTRA_DIST = \
org.freedesktop.Secrets.xml \
$(NULL)
+CLEANFILES = \
+ $(pkgconfig_DATA) \
+ $(gir_DATA) \
+ $(typelibs_DATA) \
+ $(NULL)
+
+DISTCLEANFILES = \
+ $(NULL)
+
check-memory:
make -C tests check-memory
diff --git a/library/tests/Makefile.am b/library/tests/Makefile.am
index 5941894..83bd222 100644
--- a/library/tests/Makefile.am
+++ b/library/tests/Makefile.am
@@ -1,6 +1,7 @@
include $(top_srcdir)/Makefile.decl
INCLUDES = \
+ -I$(top_srcdir) \
-I$(top_srcdir)/library \
-DSRCDIR="\"@abs_srcdir@\"" \
-DSECRET_COMPILATION \
@@ -43,6 +44,15 @@ check_PROGRAMS = \
noinst_PROGRAMS = \
$(NULL)
+EXTRA_DIST = \
+ mock \
+ mock-service-delete.py \
+ mock-service-lock.py \
+ mock-service-normal.py \
+ mock-service-only-plain.py \
+ mock-service-prompt.py \
+ $(NULL)
+
test: $(TEST_PROGS)
gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)