mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
configure: Only check for older libnl versions if newer is unavailable
More recent libnl versions can be installed in parallel. Therefore it is possible for more than one libnl check to pass successful. The way the #ifdefs are done this results in code for multiple libnl versions to be included. Signed-off-by: Thomas Graf <tgraf@redhat.com>
This commit is contained in:
parent
156f403f31
commit
6764711cc9
1 changed files with 18 additions and 18 deletions
36
configure.ac
36
configure.ac
|
|
@ -314,24 +314,6 @@ fi
|
|||
AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
|
||||
|
||||
have_libnl="no"
|
||||
PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
|
||||
if (test "${have_libnl1}" = "yes"); then
|
||||
AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
|
||||
LIBNL_CFLAGS="$LIBNL1_CFLAGS"
|
||||
LIBNL_LIBS="$LIBNL1_LIBS"
|
||||
libnl_version="1"
|
||||
have_libnl="yes"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
|
||||
if (test "${have_libnl2}" = "yes"); then
|
||||
AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
|
||||
LIBNL_CFLAGS="$LIBNL2_CFLAGS"
|
||||
LIBNL_LIBS="$LIBNL2_LIBS"
|
||||
libnl_version="2"
|
||||
have_libnl="yes"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
|
||||
if (test "${have_libnl2}" = "yes"); then
|
||||
AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
|
||||
|
|
@ -339,6 +321,24 @@ if (test "${have_libnl2}" = "yes"); then
|
|||
LIBNL_LIBS="$LIBNL3_LIBS"
|
||||
libnl_version="3"
|
||||
have_libnl="yes"
|
||||
else
|
||||
PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
|
||||
if (test "${have_libnl2}" = "yes"); then
|
||||
AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
|
||||
LIBNL_CFLAGS="$LIBNL2_CFLAGS"
|
||||
LIBNL_LIBS="$LIBNL2_LIBS"
|
||||
libnl_version="2"
|
||||
have_libnl="yes"
|
||||
else
|
||||
PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
|
||||
if (test "${have_libnl1}" = "yes"); then
|
||||
AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
|
||||
LIBNL_CFLAGS="$LIBNL1_CFLAGS"
|
||||
LIBNL_LIBS="$LIBNL1_LIBS"
|
||||
libnl_version="1"
|
||||
have_libnl="yes"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if (test "${have_libnl}" = "no"); then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue