Browse Source

Blank autotools infrastructure

Serj Kalichev 10 years ago
parent
commit
874b873b13
5 changed files with 142 additions and 0 deletions
  1. 28 0
      .gitignore
  2. 27 0
      LICENCE
  3. 25 0
      Makefile.am
  4. 5 0
      autogen.sh
  5. 57 0
      configure.ac

+ 28 - 0
.gitignore

@@ -0,0 +1,28 @@
+.deps
+.dirstamp
+.libs
+.*.swp
+*.o
+*.lo
+*.la
+*.so
+*~
+
+/autom4te.cache
+/m4/libtool.m4
+/m4/lt*
+/aux_scripts
+/config.log
+/config.status
+/stamp-h1
+/Makefile
+/config.h
+/libtool
+/configure
+/config.h.in
+/aclocal.m4
+/Makefile.in
+
+/birq
+
+/*.tar*

+ 27 - 0
LICENCE

@@ -0,0 +1,27 @@
+New BSD licence.
+Copyright (c) 2013 Serj Kalichev <serj.kalichev@gmail.com>.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+3. The name of the author may not be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 25 - 0
Makefile.am

@@ -0,0 +1,25 @@
+## Process this file with automake to generate Makefile.in
+AUTOMAKE_OPTIONS = foreign nostdinc
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CPPFLAGS = -I. -I$(top_srcdir)
+AM_LD = $(CC)
+
+if DEBUG
+  DEBUG_CFLAGS = -DDEBUG
+endif
+
+AM_CFLAGS = -Wall $(DEBUG_CFLAGS)
+#AM_CFLAGS = -ansi -pedantic -Werror -Wall -D_POSIX_C_SOURCE=199309 -DVERSION=$(VERSION) $(DEBUG_CFLAGS)
+
+sbin_PROGRAMS = birq
+
+lib_LTLIBRARIES =
+lib_LIBRARIES =
+nobase_include_HEADERS =
+
+birq_SOURCES = birq.c
+
+EXTRA_DIST = \
+	LICENCE \
+	README

+ 5 - 0
autogen.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -x -e
+mkdir -p m4
+autoreconf -fvi

+ 57 - 0
configure.ac

@@ -0,0 +1,57 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+m4_define([MAJOR_VERSION], 1)
+m4_define([MINOR_VERSION], 0)
+m4_define([MICRO_VERSION], 0)
+
+AC_PREREQ(2.59)
+AC_INIT([birq],
+        [MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION],
+        [serj.kalichev at gmail dot com])
+
+AC_CONFIG_AUX_DIR(aux_scripts)
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE(subdir-objects)
+AM_PROG_CC_C_O
+
+# needed to handle 64-bit architecture
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(size_t)
+
+################################
+# Deal with debugging options
+################################
+AC_ARG_ENABLE(debug,
+              [AS_HELP_STRING([--enable-debug],
+                              [Turn on debugging including asserts [default=no]])],
+              [],
+              [enable_debug=no])
+AM_CONDITIONAL(DEBUG,test x$enable_debug = xyes)
+
+################################
+# Check for getopt_long()
+################################
+AC_CHECK_HEADERS(getopt.h, [],
+    AC_MSG_WARN([getopt.h not found: only short parameters can be used on command line]))
+
+################################
+# Check for locale.h
+################################
+AC_CHECK_HEADERS(locale.h, [],
+    AC_MSG_WARN([locale.h not found: the locales is not supported]))
+
+################################
+# Check for chroot
+################################
+AC_CHECK_FUNCS(chroot, [],
+    AC_MSG_WARN([chroot() not found: the choot is not supported]))
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT