Skip to content

Commit 2427463

Browse files
committed
autotools: Initial version
Using autotools (autoreconf) to build SwSS project. Usage: ./autogen.sh ./configure --prefix=out [--enable-debug] make -j `nproc` && make install Signed-off-by: Elad Raz <eladr@mellanox.com>
1 parent 8f8760a commit 2427463

File tree

5 files changed

+55
-0
lines changed

5 files changed

+55
-0
lines changed

Makefile.am

Whitespace-only changes.

autogen.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if [ `uname` == "Darwin" ]; then
4+
LIBTOOLIZE=glibtoolize
5+
else
6+
LIBTOOLIZE=libtoolize
7+
fi
8+
9+
touch NEWS README AUTHORS COPYING ChangeLog
10+
$LIBTOOLIZE --force --copy &&
11+
autoreconf --force --install -I m4
12+
rm -Rf autom4te.cache
13+

config/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore
5+

configure.ac

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
AC_INIT([sonic-swss],[1.0])
2+
AC_CONFIG_SRCDIR([])
3+
AC_CONFIG_AUX_DIR(config)
4+
AM_CONFIG_HEADER(config.h)
5+
AM_INIT_AUTOMAKE
6+
AC_LANG_C
7+
AC_LANG([C++])
8+
AC_PROG_CC
9+
AC_PROG_CXX
10+
AC_PROG_LIBTOOL
11+
AC_HEADER_STDC
12+
13+
AC_CHECK_LIB([hiredis], [redisConnect])
14+
AC_CHECK_LIB([nl-genl-3], [genl_connect])
15+
16+
AC_ARG_ENABLE(debug,
17+
[ --enable-debug Compile with debugging flags],
18+
[case "${enableval}" in
19+
yes) debug=true ;;
20+
no) debug=false ;;
21+
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
22+
esac],[debug=false])
23+
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
24+
25+
CFLAGS_COMMON="-std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3"
26+
AC_SUBST(CFLAGS_COMMON)
27+
28+
AC_CONFIG_FILES([
29+
Makefile
30+
])
31+
32+
AC_OUTPUT

m4/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore
5+

0 commit comments

Comments
 (0)