From c941b72166d95113206bc535f8877ba98e3ca5d2 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 18 Feb 2006 19:13:05 +0000 Subject: [PATCH] build: Bring up-to-date for modern autoconf and friends. --- acconfig.h | 85 ------------------------------------------------------------ configure.in | 28 +++++++++----------- 2 files changed, 12 insertions(+), 101 deletions(-) delete mode 100644 acconfig.h diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index 69a53ef..0000000 --- a/acconfig.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -*-c-*- - * - * $Id: acconfig.h,v 1.2 2004/04/08 01:52:18 mdw Exp $ - * - * Configuration skeleton - * - * (c) 1999 EBI - */ - -/*----- Licensing notice --------------------------------------------------* - * - * This file is part of sw-tools. - * - * sw-tools 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. - * - * sw-tools 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 sw-tools; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ACCONFIG_H -#define ACCONFIG_H - -#ifdef __cplusplus - extern "C" { -#endif - -#define _GNU_SOURCE - -/*----- Configuration variables -------------------------------------------*/ -@TOP@ - -/* The package name. */ -#define PACKAGE "sw-tools" - -/* Current version. */ -#define VERSION "1.0.0" - -/* The installed name of my program. */ -#define SW "sw" - -/* Various handy directories. */ -#define PREFIX "/usr/local" -#define BINDIR "/usr/local/bin" -#define DATADIR "/usr/local/share" - -/* Derived facts from the above. */ -#define ARCHTAB DATADIR "/archtab" -#define PATH_SW BINDIR "/" SW - -/* My architecture name. */ -#define ARCH "i386-linux" - -/* Whether to compile in curses support. */ -#define HAVE_CURSES - -/* Whether the `environ' array is already declared somewhere useful. */ -#undef DECL_ENVIRON - -/* Command for starting a remote shell. */ -#define RSH "/usr/bin/rsh" - -/* Return type from `read' and `write'. */ -#undef ssize_t - -/* Define if you have . */ -#undef HAVE_CURSES_H - -@BOTTOM@ - -/*----- That's all, folks -------------------------------------------------*/ - -#ifdef __cplusplus - } -#endif - -#endif diff --git a/configure.in b/configure.in index 7d6fc67..9525b18 100644 --- a/configure.in +++ b/configure.in @@ -19,7 +19,7 @@ dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl --- Boring boilerplate --- AC_INIT(src/sw.c) -AM_INIT_AUTOMAKE(sw-tools, 1.0.5mdw1) +AM_INIT_AUTOMAKE(sw-tools, 1.0.5mdw2) AM_CONFIG_HEADER(config.h) dnl --- Work out the architecture name --- @@ -27,7 +27,7 @@ dnl --- Work out the architecture name --- AC_MSG_CHECKING([architecture name]) arch=`$srcdir/sw.in --archname` AC_MSG_RESULT($arch) -AC_DEFINE_UNQUOTED(ARCH, "$arch") +AC_DEFINE_UNQUOTED(ARCH, "$arch", [My architecture name.]) AC_SUBST(arch) dnl --- Set up the C compiler --- @@ -46,7 +46,7 @@ AC_ARG_WITH(rsh, [ --with-rsh=PROGRAM use PROGRAM to start remote shells], [RSH=$withval]) AC_PATH_PROGS(RSH, $RSH remsh rsh ssh, rsh) -AC_DEFINE_UNQUOTED(RSH, "$RSH") +AC_DEFINE_UNQUOTED(RSH, "$RSH", [Default remote shell program.]) dnl --- Various simple tests --- @@ -63,19 +63,15 @@ mdw_CHECK_MANYLIBS(socketpair, socket) dnl --- Write in some useful paths --- -mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix -transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'` -test "$prefix" = "NONE" && prefix=$ac_default_prefix -test "$exec_prefix" = "NONE" && exec_prefix=$prefix -SW=`echo sw|sed "$transform"` -AC_SUBST(SW) -AC_DEFINE_UNQUOTED(PREFIX, "$mdw_prefix") -AC_DEFINE_UNQUOTED(BINDIR, "`eval echo $bindir`") -AC_DEFINE_UNQUOTED(DATADIR, "`eval echo $datadir`") -AC_DEFINE_UNQUOTED(SW, "$SW") -pkgdatadir="`eval echo $datadir/sw`" -AC_SUBST(pkgdatadir) -prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix + +mdw_DEFINE_PATHS([ + mdw_DEFINE_PATH([PREFIX], [$prefix]) + mdw_DEFINE_PATH([DATADIR], [$datadir]) + mdw_DEFINE_PATH([ARCHTAB], [$datadir/archtab]) + mdw_DEFINE_PROG([PATH_SW], [sw]) + pkgdatadir=mdw_PATH([$datadir/$PACKAGE]) AC_SUBST(pkgdatadir) + SW=mdw_PROG(sw) AC_SUBST(SW) +]) dnl --- Output the configuration --- -- 2.11.0