Provide an m4 macro defining runstatedir as $(localstatedir)/var. This
applies to automake versions < 2.70.
---
 .gitignore       |  2 ++
 configure.ac     |  4 ++++
 m4/configmake.m4 | 15 +++++++++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 m4/configmake.m4

diff --git a/.gitignore b/.gitignore
index bbb44c3..74acd7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,8 @@ missing
 stamp-h1
 autom4te.cache
 test-driver
+m4/
+!m4/configmake.m4
 
 connman.pc
 include/connman
diff --git a/configure.ac b/configure.ac
index 69c0eeb..51482cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,8 @@
 AC_PREREQ(2.60)
 AC_INIT(connman, 1.30)
 
+AC_CONFIG_MACRO_DIR([m4])
+
 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
 AC_CONFIG_HEADERS([config.h])
 
@@ -31,6 +33,8 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 
+gl_CONFIGMAKE_PREP
+
 AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
                        [disable code optimization through compiler]), [
        if (test "${enableval}" = "no"); then
diff --git a/m4/configmake.m4 b/m4/configmake.m4
new file mode 100644
index 0000000..ef78ebe
--- /dev/null
+++ b/m4/configmake.m4
@@ -0,0 +1,15 @@
+# configmake.m4 serial 2
+dnl Copyright (C) 2010-2015 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_CONFIGMAKE_PREP
+# ------------------
+AC_DEFUN([gl_CONFIGMAKE_PREP],
+[
+  dnl Added in autoconf 2.70
+  if test "x$runstatedir" = x; then
+    AC_SUBST([runstatedir], ['${localstatedir}/run'])
+  fi
+])
-- 
2.1.4

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to