Skip to content

Commit

Permalink
configure.in: fixed compilation with selinux
Browse files Browse the repository at this point in the history
  • Loading branch information
hvhaugwitz committed May 20, 2013
1 parent 0568748 commit c1c9ea9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Print checksums of databases in verbose level 2 or higher (closes
feature request 1502032)
* Added new 'database_attrs' option
* configure.in: fixed compilation with selinux

2013-05-18 Hannes von Haugwitz <[email protected]>
* configure.in: removed check for 'libcrypt'
Expand Down
25 changes: 18 additions & 7 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,26 @@ AC_ARG_WITH([selinux],
)

AS_IF([test "x$with_selinux_support" != xno],
[AC_DEFINE(WITH_SELINUX,1,[use SELinux])
if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists libselinux; then
SELINUXLIB=$(${PKG_CONFIG} --libs libselinux --static)
else
SELINUXLIB="-lselinux"
fi
AC_DEFINE(WITH_SELINUX,1,[use SELinux])
[AC_MSG_RESULT(yes)
if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists libselinux; then
if test "$aide_static_choice" == "yes"; then
SELINUXLIB=$(${PKG_CONFIG} --libs libselinux --static)
else
SELINUXLIB=$(${PKG_CONFIG} --libs libselinux)
fi
else
SELINUXLIB="-lselinux"
if test "$aide_static_choice" == "yes"; then
saveLIBS=$LIBS
LIBS="-static $SELINUXLIB"
AC_SEARCH_LIBS([lgetfilecon_raw], [], [], [SELINUXLIB="$SELINUXLIB -lpthread"])
LIBS=$saveLIBS
fi
fi
compoptionstring="${compoptionstring}WITH_SELINUX\\n"
aideextragroups="${aideextragroups}+selinux"
AC_MSG_RESULT(yes)],
],
[AC_MSG_RESULT(no)]
)

Expand Down

0 comments on commit c1c9ea9

Please sign in to comment.