-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue: 1056823 Improve build configure structure
Current configure.ac was modified to improve readability. Some functionality was put out the file to separated m4 files as prof.m4, func.m4 and verbs.m4 Signed-off-by: Igor Ivanov <[email protected]>
- Loading branch information
1 parent
5c16c01
commit 8939ca0
Showing
12 changed files
with
793 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# func.m4 - Collection of functions | ||
# | ||
# Copyright (C) Mellanox Technologies Ltd. 2016-2017. ALL RIGHTS RESERVED. | ||
# See file LICENSE for terms. | ||
# | ||
|
||
########################## | ||
# Configure functions | ||
# | ||
# Some helper script functions | ||
# | ||
AC_DEFUN([FUNC_CONFIGURE_INIT], | ||
[ | ||
show_section_title() | ||
{ | ||
cat <<EOF | ||
============================================================================ | ||
== ${1} | ||
============================================================================ | ||
EOF | ||
} | ||
show_summary_title() | ||
{ | ||
cat <<EOF | ||
Mellanox VMA library | ||
============================================================================ | ||
Version: ${VMA_LIBRARY_MAJOR}.${VMA_LIBRARY_MINOR}.${VMA_LIBRARY_REVISION}.${VMA_LIBRARY_RELEASE} | ||
Git: ${GIT_VER} | ||
EOF | ||
} | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# nl.m4 - Detect nl package | ||
# | ||
# Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. | ||
# See file LICENSE for terms. | ||
# | ||
|
||
########################## | ||
# Checking nl library | ||
# | ||
AC_DEFUN([CHECK_NL_LIB], | ||
[ | ||
# checking for libnl1 or libnl3 in libibverbs | ||
if test -f "$ac_cv_ofed_path/lib64/libibverbs.so" ; then | ||
libibverbs_file="$ac_cv_ofed_path/lib64/libibverbs.so" | ||
else | ||
libibverbs_file="$ac_cv_ofed_path/lib/libibverbs.so" | ||
fi | ||
have_libnl1=no | ||
have_libnl3=no | ||
ldd $libibverbs_file | grep libnl >/dev/null 2>&1 | ||
if test $? -eq 0 ; then | ||
ldd $libibverbs_file | grep -e 'libnl3' -e 'libnl-3' >/dev/null 2>&1 | ||
if test $? -eq 0 ; then | ||
# libnl3 case | ||
PKG_CHECK_MODULES([LIBNL3],[libnl-route-3.0],have_libnl3=yes AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-route-3.0]),[:]) | ||
if test "$have_libnl3" == no; then | ||
AC_MSG_ERROR([libibverbs is linked with libnl3 while libnl3-devel is not installed. Please install libnl3-devel and try again]) | ||
fi | ||
AC_SUBST([LIBNL_LIBS], "$LIBNL3_LIBS") | ||
AC_SUBST([LIBNL_CFLAGS], "$LIBNL3_CFLAGS") | ||
AC_SUBST([LIBNLX_DEVEL], "libnl3-devel") | ||
else | ||
# libnl1 case | ||
PKG_CHECK_MODULES([LIBNL1],[libnl-1], have_libnl1=yes AC_DEFINE([HAVE_LIBNL1], [1], [Use libnl-1]), [:]) | ||
if test "$have_libnl1" == no; then | ||
AC_MSG_ERROR([libibverbs is linked with libnl1 while libnl1-devel is not installed. Please install libnl1-devel and try again]) | ||
fi | ||
AC_SUBST([LIBNL_LIBS], "$LIBNL1_LIBS") | ||
AC_SUBST([LIBNL_CFLAGS], "$LIBNL1_CFLAGS") | ||
AC_SUBST([LIBNLX_DEVEL], "libnl-devel") | ||
fi | ||
fi | ||
AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl1" = "yes" -o "$have_libnl3" = "yes"]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.