aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-11-28 11:54:13 +0000
committerWerner Koch <[email protected]>2017-11-28 12:15:29 +0000
commit241e9a73891fcd12f124aab1a299c2cf4f8eebc4 (patch)
tree5cec2c3e3ffc2e74fda5f7c965393f24e91fc92c
parentcore: New API functions gpgrt_getenv and gpgrt_setenv. (diff)
downloadlibgpg-error-241e9a73891fcd12f124aab1a299c2cf4f8eebc4.tar.gz
libgpg-error-241e9a73891fcd12f124aab1a299c2cf4f8eebc4.zip
core: Prepare to build with gpgscm.
* configure.ac: New option --enable-gpgscm. Create gpgscm/Makefile. (GPGRT_ENABLE_LOG_MACROS): Define. * Makefile.am (SUBDIRS): Add gpgscm * src/logging.c (_gpgrt_logv_clock): Do not use the log_debug macro. -- Note that gpscm does not yet build. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--Makefile.am9
-rw-r--r--configure.ac16
-rw-r--r--src/logging.c2
3 files changed, 24 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index f5d0b81..856f44c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,12 +27,19 @@ EXTRA_DIST = autogen.sh autogen.rc libgpg-error.spec.in \
po/ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \
build-aux/git-log-footer build-aux/git-log-fix
+
if LANGUAGES_SOME
lang_subdirs = lang
else
lang_subdirs =
endif
+if BUILD_GPGSCM
+doc = gpgscm
+else
+doc =
+endif
+
if BUILD_DOC
doc = doc
else
@@ -45,7 +52,7 @@ else
tests =
endif
-SUBDIRS = m4 src $(doc) $(tests) po $(lang_subdirs)
+SUBDIRS = m4 src $(gpgscm) $(doc) $(tests) po $(lang_subdirs)
dist-hook: gen-ChangeLog
diff --git a/configure.ac b/configure.ac
index 9f3ea82..68dbc55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,7 @@ AH_BOTTOM([
#define GPG_ERR_ENABLE_GETTEXT_MACROS 1
#define GPG_ERR_ENABLE_ERRNO_MACROS 1
#define GPGRT_ENABLE_ES_MACROS 1
+#define GPGRT_ENABLE_LOG_MACROS 1
])
@@ -531,6 +532,19 @@ if test "$enable_log_clock" = yes ; then
AC_DEFINE(ENABLE_LOG_CLOCK,1,[Defined to use log_clock timestamps])
fi
+#
+# For now we do not build gpgscm by default.
+# Eventually we will reverse the meaning of that option.
+#
+build_gpgscm=no
+AC_MSG_CHECKING([whether to build gpgscm])
+AC_ARG_ENABLE(gpgscm,
+ AC_HELP_STRING([--enable-gpgscm],
+ [build the gpgscm tool]),
+ build_gpgscm=$enableval, build_gpgscm=no)
+AC_MSG_RESULT($build_gpgscm)
+AM_CONDITIONAL([BUILD_GPGSCM], [test "x$build_gpgscm" != xno])
+
#
# Add -Werror to CFLAGS. This hack can be used to avoid problems with
@@ -597,7 +611,7 @@ AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno])
#
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([doc/Makefile po/Makefile.in m4/Makefile])
-AC_CONFIG_FILES([src/Makefile tests/Makefile])
+AC_CONFIG_FILES([src/Makefile gpgscm/Makefile tests/Makefile])
AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest])
AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
diff --git a/src/logging.c b/src/logging.c
index 13873eb..70c13ba 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -1165,7 +1165,7 @@ _gpgrt_logv_clock (const char *fmt, va_list arg_ptr)
if (clock_gettime (CLOCK_REALTIME, &tv))
{
- log_debug ("error getting the realtime clock value\n");
+ _gpgrt_log_debug ("error getting the realtime clock value\n");
return;
}
now = tv.tv_sec * 1000000000ull;