Skip to content

Commit 5f2885d

Browse files
author
Eric Chanudet
committed
carrier-detect: Build-system refresh
Refresh the macro used in the build-system, rename configure.ac and rewrite the Makefile.am. Remove invocation of deprecated autotools macros. Silence configure warnings and facilitate building from externalsrc. Provide a standard .gitignore to make things more manageable. Signed-off-by: Eric Chanudet <[email protected]>
1 parent da6996c commit 5f2885d

File tree

4 files changed

+84
-82
lines changed

4 files changed

+84
-82
lines changed

carrier-detect/.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Autotools.
2+
# http://www.gnu.org/software/automake
3+
Makefile
4+
Makefile.in
5+
/ar-lib
6+
/mdate-sh
7+
/py-compile
8+
/test-driver
9+
/ylwrap
10+
11+
# http://www.gnu.org/software/autoconf
12+
/autom4te.cache
13+
/autoscan.log
14+
/autoscan-*.log
15+
/aclocal.m4
16+
/compile
17+
/config.guess
18+
config.h
19+
config.h.in
20+
config.h.in~
21+
/config.sub
22+
/configure
23+
/configure.scan
24+
/depcomp
25+
/install-sh
26+
/missing
27+
stamp-h1
28+
/config.log
29+
/config.status
30+
31+
## C.
32+
# Prerequisites
33+
*.d
34+
35+
# Object files
36+
*.o

carrier-detect/Makefile.am

+7-32
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
1-
#
2-
# Copyright (c) 2014 Citrix Systems, Inc.
3-
#
4-
# This program is free software; you can redistribute it and/or modify
5-
# it under the terms of the GNU General Public License as published by
6-
# the Free Software Foundation; either version 2 of the License, or
7-
# (at your option) any later version.
8-
#
9-
# This program is distributed in the hope that it will be useful,
10-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
# GNU General Public License for more details.
13-
#
14-
# You should have received a copy of the GNU General Public License
15-
# along with this program; if not, write to the Free Software
16-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17-
#
18-
19-
#
20-
# Makefile.am:
21-
#
22-
# $Id:$
23-
#
24-
# $Log:$
25-
#
26-
#
27-
28-
INCLUDES = ${LIBNL_INC} ${LIBNL_ROUTE_INC}
29-
30-
AM_CFLAGS=-g -W -Wall
31-
321
bin_PROGRAMS = carrier-detect
332

34-
carrier_detect_LDFLAGS = ${LIBNL_LIB} ${LIBNL_ROUTE_LIB}
3+
carrier_detect_CFLAGS = \
4+
-g -W -Wall -Werror \
5+
$(LIBNL_CFLAGS) \
6+
$(LIBNL_ROUTE_CFLAGS)
357

8+
carrier_detect_LDADD = \
9+
$(LIBNL_LIBS) \
10+
$(LIBNL_ROUTE_LIBS)

carrier-detect/configure.ac

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Autoconf initialisation.
3+
#
4+
AC_INIT(carrier-detect, 1.0)
5+
AC_PREREQ(2.13)
6+
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
7+
AC_CONFIG_MACRO_DIR([m4])
8+
9+
#
10+
# Version management.
11+
# +1 : 0 Interface changes breaking retro-compatibility.
12+
# 0 : +1 Internal changes without lost of retro-compatibility.
13+
#
14+
VERSION_MAJOR=0
15+
VERSION_MINOR=1
16+
AC_DEFINE_UNQUOTED([VERSION_MAJOR], [$VERSION_MAJOR], [major version number])
17+
AC_DEFINE_UNQUOTED([VERSION_MINOR], [$VERSION_MINOR], [minor version number])
18+
19+
#
20+
# Standard checks.
21+
#
22+
AC_PROG_CC
23+
AC_PROG_CPP
24+
AC_PROG_INSTALL
25+
AC_PROG_LN_S
26+
AC_PROG_MAKE_SET
27+
AM_PROG_AR
28+
29+
# Compiler capabilities.
30+
AC_C_INLINE
31+
AC_C_CONST
32+
33+
# Required headers.
34+
AC_CHECK_HEADERS([sys/mman.h stdio.h])
35+
36+
# Required packages.
37+
PKG_CHECK_MODULES(LIBNL, [libnl-3.0])
38+
PKG_CHECK_MODULES(LIBNL_ROUTE, [libnl-route-3.0])
39+
40+
# Output files.
41+
AC_OUTPUT([Makefile])

carrier-detect/configure.in

-50
This file was deleted.

0 commit comments

Comments
 (0)