From 21298f7a45ee536800be5e771438b01089a5cb2c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Feb 2012 13:39:03 +0000 Subject: [PATCH] Initial build environment. --- .gitignore | 24 +++++++++++++++++++ Makefile.am | 22 +++++++++++++++++ configure.ac | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ daemon/Makefile.am | 18 ++++++++++++++ m4/.gitignore | 5 ++++ tools/Makefile.am | 18 ++++++++++++++ 6 files changed, 156 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile.am create mode 100644 configure.ac create mode 100644 daemon/Makefile.am create mode 100644 m4/.gitignore create mode 100644 tools/Makefile.am diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af123c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +.deps +*~ +*.o +Makefile.in +Makefile +/aclocal.m4 +/autom4te.cache +/compile +/config.guess +/config.h +/config.h.in +/config.log +/config.status +/config.sub +/configure +/daemon/lexer.c +/daemon/parser.c +/depcomp +/install-sh +/libtool +/ltmain.sh +/missing +/stamp-h1 +/ylwrap diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..3cec9e7 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,22 @@ +# whenjobs +# Copyright (C) 2012 Red Hat Inc. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = daemon tools + +CLEANFILES = *~ diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f192971 --- /dev/null +++ b/configure.ac @@ -0,0 +1,69 @@ +# whenjobs +# Copyright (C) 2012 Red Hat Inc. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +AC_INIT([whenjobs],0.0.1) +AM_INIT_AUTOMAKE([foreign]) + +AC_CONFIG_MACRO_DIR([m4]) + +dnl Allow all GNU/Linux functions. +dnl autoconf complains unless this is very early in the file. +AC_USE_SYSTEM_EXTENSIONS + +AC_PROG_LIBTOOL + +dnl Check for basic C environment. +AC_PROG_CC_STDC +AC_PROG_INSTALL +AC_PROG_CPP + +AC_C_PROTOTYPES +test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant]) + +AM_PROG_CC_C_O + +AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], + [turn on lots of GCC warnings (for developers)])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; + esac + gcc_warnings=$enableval], + [gcc_warnings=no] +) + +if test "$gcc_warnings" = yes; then + # XXX With gnulib we can improve this in future. + WARN_CFLAGS="-Wall" + AC_SUBST([WARN_CFLAGS]) + WERROR_CFLAGS="-Werror" + AC_SUBST([WERROR_CFLAGS]) +fi + +dnl Check support for 64 bit file offsets. +AC_SYS_LARGEFILE + +dnl lex and yacc, or hopefully GNU equivalents. +AC_PROG_LEX +AC_PROG_YACC + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([Makefile + daemon/Makefile + tools/Makefile]) +AC_OUTPUT diff --git a/daemon/Makefile.am b/daemon/Makefile.am new file mode 100644 index 0000000..057074c --- /dev/null +++ b/daemon/Makefile.am @@ -0,0 +1,18 @@ +# whenjobs +# Copyright (C) 2012 Red Hat Inc. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +CLEANFILES = *~ diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..764b428 --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,5 @@ +/libtool.m4 +/lt~obsolete.m4 +/ltoptions.m4 +/ltsugar.m4 +/ltversion.m4 diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..057074c --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,18 @@ +# whenjobs +# Copyright (C) 2012 Red Hat Inc. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +CLEANFILES = *~ -- 1.8.3.1