diff options
author | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-10-27 20:33:07 +0000 |
---|---|---|
committer | Sergiu Ivanov <unlimitedscolobb@gmail.com> | 2009-10-27 20:33:07 +0000 |
commit | a85ac8c0d182245d75eed1136503a57ac1c3a8fa (patch) | |
tree | 5bab9dbccfafa73132b335fe70d6d28dc994583f | |
parent | 9401ed47c6d00cca32b581e096502f9534998bcd (diff) |
Add an autotools-based build system.
* configure.ac: New file.
* package.m4: Likewise.
* Makefile.am: Likewise.
* build: Remove file.
* filter.c (netfs_server_name, netfs_server_version): Set from the Autoconf
variables.
* options.c (argp_program_version): Likewise.
(argp_program_bug_address): New.
-rw-r--r-- | Makefile.am | 54 | ||||
-rw-r--r-- | configure.ac | 45 | ||||
-rw-r--r-- | filter.c | 4 | ||||
-rw-r--r-- | options.c | 3 | ||||
-rw-r--r-- | package.m4 | 3 |
5 files changed, 106 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..672883152 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,54 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This file is part of nsmux. +# +# 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, 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. + + +AM_CPPFLAGS = +AM_CFLAGS = + +bin_PROGRAMS = + + +AM_CPPFLAGS += \ + -include config.h + +AM_CFLAGS += \ + -Wall + + +bin_PROGRAMS += \ + filter + + +filter_SOURCES = \ + filter.c \ + node.c \ + options.c \ + trace.c + +filter_CPPFLAGS = \ + -DDEBUG \ + $(AM_CPPFLAGS) + +filter_LDADD = \ + -lnetfs \ + -lfshelp \ + -liohelp \ + -lthreads \ + -lports \ + -lihash \ + -lshouldbeinlibc diff --git a/configure.ac b/configure.ac new file mode 100644 index 000000000..e78de23bd --- /dev/null +++ b/configure.ac @@ -0,0 +1,45 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This file is part of nsmux. +# +# 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, 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. + + +m4_include([package.m4]) +AC_INIT( + [AC_PACKAGE_NAME], + [AC_PACKAGE_VERSION], + [AC_PACKAGE_BUGREPORT]) + +AC_CONFIG_SRCDIR([filter.c]) + +AC_CONFIG_AUX_DIR([build-aux]) + +AM_INIT_AUTOMAKE( + [foreign] dnl For now. + [-Wall] + [no-define] + [subdir-objects]) + + +AC_PROG_CC +AC_PROG_CC_C_O + + +AC_CONFIG_HEADERS([config.h]) + +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT @@ -43,10 +43,10 @@ /*---------------------------------------------------------------------------*/ /*--------Global Variables---------------------------------------------------*/ /*The name of the server*/ -char *netfs_server_name = "filter"; +char *netfs_server_name = PACKAGE_NAME; /*---------------------------------------------------------------------------*/ /*The version of the server*/ -char *netfs_server_version = "0.0"; +char *netfs_server_version = PACKAGE_VERSION; /*---------------------------------------------------------------------------*/ /*The maximal length of a chain of symbolic links*/ int netfs_maxsymlinks = 12; @@ -100,7 +100,8 @@ static const struct argp_child argp_children_startup[] = { /*---------------------------------------------------------------------------*/ /*The version of the server for argp*/ -const char *argp_program_version = "0.0"; +const char *argp_program_version = PACKAGE_VERSION; +const char *argp_program_bug_address = PACKAGE_BUGREPORT; /*---------------------------------------------------------------------------*/ /*The arpg parser for runtime arguments*/ struct argp argp_runtime = { 0, 0, 0, 0, argp_children_runtime }; diff --git a/package.m4 b/package.m4 new file mode 100644 index 000000000..3b3fd1026 --- /dev/null +++ b/package.m4 @@ -0,0 +1,3 @@ +m4_define([AC_PACKAGE_NAME],[filter]) +m4_define([AC_PACKAGE_VERSION],[0]) +m4_define([AC_PACKAGE_BUGREPORT],[bug-hurd@gnu.org]) |