gnulib: add timespec-add/sub definitions from gnulib
authorJeff Layton <jlayton@redhat.com>
Tue, 4 Jun 2013 17:32:08 +0000 (13:32 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 4 Jun 2013 17:52:40 +0000 (13:52 -0400)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Makefile.am
README
autogen.sh [new file with mode: 0755]
configure.ac
m4/.gitignore [new file with mode: 0644]
m4/gnulib-cache.m4 [new file with mode: 0644]

index f73e7cfcaaa677b7d0b10a16673957918d852ba6..6d03d38879b559e7dcee7af2251340af90615d6d 100644 (file)
@@ -1,2 +1,9 @@
+AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
 AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = m4/gnulib-cache.m4
+LDADD = lib/libgnu.a
+
 bin_PROGRAMS = perf1 perf2
+
+SUBDIRS = lib/
diff --git a/README b/README
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..df1777b7c32526df73934eb224668a94e3b3b759 100644 (file)
--- a/README
+++ b/README
@@ -0,0 +1,17 @@
+If building from sources pulled from git, you first need to check out a copy
+of gnulib:
+
+    git clone git://git.savannah.gnu.org/gnulib.git
+
+...once that's done, symlink gnulib-tool in that directory somewhere in your
+$PATH. For instance:
+
+    ln -s /git/gnulib/gnulib-tool ~/bin/gnulib-tool
+
+...then run:
+
+    ./autogen.sh
+
+...and finally the normal:
+
+    ./configure && make
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..27a3459
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+gnulib-tool --update
+
+autoreconf -i
index f8115a03db342c5f210dfae4c1254f03f3e6f911..ea8e150a870d8ef4e95a49d7f22df03a3e198b29 100644 (file)
@@ -10,12 +10,16 @@ AM_INIT_AUTOMAKE
 
 # Checks for programs.
 AC_PROG_CC
+gl_EARLY
 
 # Checks for libraries.
 
 # Checks for header files.
 AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])
 
+# For gnulib
+gl_INIT
+
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_PID_T
 
@@ -23,5 +27,5 @@ AC_TYPE_PID_T
 AC_FUNC_FORK
 AC_CHECK_FUNCS([mkdir])
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile lib/Makefile])
 AC_OUTPUT
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644 (file)
index 0000000..b3aa0b7
--- /dev/null
@@ -0,0 +1,12 @@
+/00gnulib.m4
+/extensions.m4
+/extern-inline.m4
+/gnulib-common.m4
+/gnulib-comp.m4
+/gnulib-tool.m4
+/include_next.m4
+/stddef_h.m4
+/time_h.m4
+/timespec.m4
+/warn-on-use.m4
+/wchar_t.m4
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
new file mode 100644 (file)
index 0000000..96b69c6
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the specification of how gnulib-tool is used.
+# It acts as a cache: It is written and read by gnulib-tool.
+# In projects that use version control, this file is meant to be put under
+# version control, like the configure.ac and various Makefile.am files.
+
+
+# Specification in the form of a command-line invocation:
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-conditional-dependencies --no-libtool --macro-prefix=gl timespec-add timespec-sub
+
+# Specification in the form of a few gnulib-tool.m4 macro invocations:
+gl_LOCAL_DIR([])
+gl_MODULES([
+  timespec-add
+  timespec-sub
+])
+gl_AVOID([])
+gl_SOURCE_BASE([lib])
+gl_M4_BASE([m4])
+gl_PO_BASE([])
+gl_DOC_BASE([doc])
+gl_TESTS_BASE([tests])
+gl_LIB([libgnu])
+gl_MAKEFILE_NAME([])
+gl_MACRO_PREFIX([gl])
+gl_PO_DOMAIN([])
+gl_WITNESS_C_MACRO([])