Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[configure.ac] Add the option of passing libnl path to configure script #503

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ AM_PATH_PYTHON
AM_PATH_PYTHON3

AC_CHECK_LIB([hiredis], [redisConnect])
PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-nf-3.0])
CFLAGS="$CFLAGS $LIBNL_CFLAGS"
LIBS="$LIBS $LIBNL_LIBS"

LDFLAGS="-Wl,--no-undefined $LDFLAGS"
AC_SUBST([LDFLAGS])
Expand All @@ -31,6 +28,35 @@ esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AM_CONDITIONAL(ARCH64, test `getconf LONG_BIT` = "64")

AC_ARG_WITH(libnl-3.0-inc,
[ --with-libnl-3.0-inc=DIR
prefix where libnl-3.0 includes are installed],
[AC_SUBST(CPPFLAGS, "$CPPFLAGS -I${withval}")
AC_SUBST(LIBNL_INC_DIR, "${withval}")])

AC_ARG_WITH(libnl-3.0-lib,
[ --with-libnl-3.0-lib=DIR
prefix where libnl-3.0 libraries are installed],
[AC_SUBST(LDFLAGS, "$LDFLAGS -L${withval}")
AC_SUBST(LIBNL_LIB_DIR, "${withval}")])

AC_ARG_WITH(libnl-3.0-usr-lib,
[ --with-libnl-3.0-usr-lib=DIR
prefix where libnl-3.0 libraries are installed],
[AC_SUBST(LDFLAGS, "$LDFLAGS -L${withval}")
AC_SUBST(LIBNL_USR_LIB_DIR, "${withval}")])

if test "${with_libnl_3_0_inc+set}" = set; then
AC_CHECK_LIB([nl-3], [nl_addr_alloc])
AC_CHECK_LIB([nl-genl-3], [nl_socket_get_cb])
AC_CHECK_LIB([nl-route-3], [nl_object_alloc])
AC_CHECK_LIB([nl-nf-3], [nfnl_connect])
else
PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-nf-3.0])
CFLAGS="$CFLAGS $LIBNL_CFLAGS"
LIBS="$LIBS $LIBNL_LIBS"
fi

AC_PATH_PROG(SWIG, [swig3.0])

CFLAGS_COMMON=""
Expand Down