summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-02-13 15:04:22 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-02-13 15:04:32 +0100
commit1e22a0ce39a4871d42ea8987cc2085bc812fad2f (patch)
treed918276d49b5f915a47a5a0bb08310c578be4f92 /CMakeLists.txt
parent7d83a0cb922982e1ef6f3409b8ca1f3dd7ede110 (diff)
downloadtdelibs-1e22a0ce39a4871d42ea8987cc2085bc812fad2f.tar.gz
tdelibs-1e22a0ce39a4871d42ea8987cc2085bc812fad2f.zip
Add search for utempter helper
This resolves Bug 2841 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit a14adb9ab9c50cbcd95a2d2e3f42c41fecf73fb0)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2bbfceaf..f3bdc78d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -595,7 +595,26 @@ endif( HAVE_LIBMAGIC )
if( WITH_UTEMPTER )
check_include_file( utempter.h HAVE_UTEMPTER_H )
check_library_exists( utempter addToUtmp "" HAVE_ADDTOUTEMP )
- if( HAVE_UTEMPTER_H AND HAVE_ADDTOUTEMP )
+ if( NOT DEFINED UTEMPTER_HELPER )
+ message( STATUS "Looking for utempter helper" )
+ find_program( UTEMPTER_HELPER utempter
+ PATHS
+ /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/utempter
+ /usr/lib/utempter
+ /usr/libexec/utempter
+ /usr/libexec
+ /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}/utempter
+ /usr/local/lib/utempter
+ /usr/local/libexec/utempter
+ /usr/local/libexec
+ )
+ if( UTEMPTER_HELPER )
+ message( STATUS "Looking for utempter helper - found" )
+ else( )
+ message( STATUS "Looking for utempter helper - not found" )
+ endif( )
+ endif( )
+ if( HAVE_UTEMPTER_H AND HAVE_ADDTOUTEMP AND UTEMPTER_HELPER )
set( HAVE_UTEMPTER 1 )
set( UTEMPTER_LIBRARY utempter )
else( )