1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-06-09 19:20:43 +00:00

Add support for the Gnulib portability library

In particular, the gnulib-tool utility now maintains lib/Makefile.am, as
well as many files in the m4 and lib directories.  The file
m4/gnulib-cache.m4 allows the Gnulib files to be refreshed.  See
http://www.gnu.org/software/gnulib/.
This commit is contained in:
John Zaitseff 2011-07-23 17:19:07 +10:00
parent dcad9487bb
commit fd55a09493
9 changed files with 212 additions and 33 deletions

7
.gitignore vendored
View File

@ -12,8 +12,15 @@ Makefile.in
/configure
/stamp-h1
/build-aux/config.guess
/build-aux/config.sub
/build-aux/depcomp
/build-aux/install-sh
/build-aux/missing
/build-aux/snippet/arg-nonnull.h
/build-aux/snippet/c++defs.h
/build-aux/snippet/warn-on-use.h
/build-aux/snippet/_Noreturn.h
/src/trader

View File

@ -37,14 +37,17 @@ AC_CONFIG_LIBOBJ_DIR([lib])
AC_PROG_CC
AC_PROG_CC_STDC
gl_EARLY
AX_CFLAGS_WARN_ALL
AC_C_RESTRICT
AC_C_VOLATILE
AX_C___ATTRIBUTE__
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
gl_INIT
AX_WITH_CURSES
AS_IF([test "x$ax_cv_curses" != "xyes"],
AC_MSG_ERROR([requires an X/Open-compatible Curses library.]),

71
lib/.gitignore vendored Normal file
View File

@ -0,0 +1,71 @@
Makefile.am
alloca.in.h
asnprintf.c
ctype.in.h
dosname.h
errno.in.h
float.c
float.in.h
float+.h
fprintf.c
fpucw.h
frexp.c
frexpl.c
fseterr.c
fseterr.h
getopt.c
getopt.in.h
getopt1.c
getopt_int.h
gettext.h
gettimeofday.c
isnan.c
isnand.c
isnand-nolibm.h
isnanf.c
isnanf-nolibm.h
isnanl.c
isnanl-nolibm.h
locale.in.h
malloc.c
math.in.h
memchr.c
memchr.valgrind
printf.c
printf-args.c
printf-args.h
printf-frexp.c
printf-frexp.h
printf-frexpl.c
printf-frexpl.h
printf-parse.c
printf-parse.h
signbitd.c
signbitf.c
signbitl.c
size_max.h
snprintf.c
stat.c
stdarg.in.h
stdbool.in.h
stddef.in.h
stdint.in.h
stdio.in.h
stdio-impl.h
stdlib.in.h
strdup.c
string.in.h
strncat.c
strstr.c
str-two-way.h
sys_stat.in.h
sys_time.in.h
time.in.h
unistd.in.h
vasnprintf.c
vasnprintf.h
verify.h
vfprintf.c
vsnprintf.c
wchar.in.h
xsize.h

View File

@ -1,27 +0,0 @@
#########################################################################
# #
# Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2011, John Zaitseff #
# #
#########################################################################
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id$
#
# This file, lib/Makefile.am, contains the library directory Makefile for
# Star Traders. It needs to be processed by automake to produce the
# corresponding Makefile.in.
#
#
# 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 3 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, see http://www.gnu.org/licenses/.

69
m4/.gitignore vendored Normal file
View File

@ -0,0 +1,69 @@
00gnulib.m4
alloca.m4
asm-underscore.m4
assert.m4
config-h.m4
ctype.m4
errno_h.m4
exponentd.m4
exponentf.m4
exponentl.m4
extensions.m4
float_h.m4
fpieee.m4
fprintf-posix.m4
frexp.m4
frexpl.m4
getopt.m4
gettimeofday.m4
gnulib-common.m4
gnulib-comp.m4
gnulib-tool.m4
include_next.m4
intmax_t.m4
inttypes_h.m4
isnand.m4
isnanf.m4
isnanl.m4
ldexpl.m4
locale_h.m4
longlong.m4
malloc.m4
math_h.m4
memchr.m4
mmap-anon.m4
multiarch.m4
nocrash.m4
printf.m4
printf-frexp.m4
printf-frexpl.m4
printf-posix-rpl.m4
signbit.m4
size_max.m4
snprintf.m4
snprintf-posix.m4
stat.m4
stdarg.m4
stdbool.m4
stddef_h.m4
stdint.m4
stdint_h.m4
stdio_h.m4
stdlib_h.m4
strdup.m4
string_h.m4
strncat.m4
strstr.m4
sys_stat_h.m4
sys_time_h.m4
time_h.m4
unistd_h.m4
vasnprintf.m4
vfprintf-posix.m4
vsnprintf.m4
vsnprintf-posix.m4
warn-on-use.m4
wchar_h.m4
wchar_t.m4
wint_t.m4
xsize.m4

View File

@ -31,4 +31,5 @@ EXTRA_DIST = \
ax_append_flag.m4 \
ax_cflags_warn_all.m4 \
ax_c___attribute__.m4 \
ax_with_curses.m4
ax_with_curses.m4 \
gnulib-cache.m4

56
m4/gnulib-cache.m4 Normal file
View File

@ -0,0 +1,56 @@
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. 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=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl assert config-h ctype fprintf-posix getopt-gnu gettimeofday locale printf-posix snprintf-posix stat stdarg stdbool stdio strdup-posix string strncat strstr sys_stat sys_time unistd vfprintf-posix vsnprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
gl_MODULES([
assert
config-h
ctype
fprintf-posix
getopt-gnu
gettimeofday
locale
printf-posix
snprintf-posix
stat
stdarg
stdbool
stdio
strdup-posix
string
strncat
strstr
sys_stat
sys_time
unistd
vfprintf-posix
vsnprintf-posix
])
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_DOMAIN([])

View File

@ -41,6 +41,7 @@ trader_SOURCES = \
utils.c utils.h \
system.h
trader_LDADD = @CURSES_LIB@
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
trader_LDADD = @LIBINTL@ @CURSES_LIB@ $(top_builddir)/lib/libgnu.a
EXTRA_DIST = README

View File

@ -36,9 +36,7 @@
* Portability definitions *
************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "config.h" // Generated by configure
/************************************************************************