FIND_PATH( LIBDAEMON_INCLUDE_DIR daemon.h /usr/include/libdaemon /usr/local/include/libdaemon )
FIND_LIBRARY( LIBDAEMON_LIBRARY NAMES daemon PATH /usr/lib /usr/local/lib )

IF( LIBDAEMON_INCLUDE_DIR AND LIBDAEMON_LIBRARY )
   SET( LIBDAEMON_FOUND TRUE )
ENDIF( LIBDAEMON_INCLUDE_DIR AND LIBDAEMON_LIBRARY )

IF( LIBDAEMON_FOUND )
   IF( NOT libdaemon_FIND_QUIETLY )
      MESSAGE( STATUS "Found libdaemon: ${LIBDAEMON_LIBRARY}" )
   ENDIF( NOT libdaemon_FIND_QUIETLY )
ELSE( LIBDAEMON_FOUND )
   IF( libdaemon_FIND_REQUIRED )
      MESSAGE( FATAL_ERROR "Could not find libdaemon" )
   ENDIF( libdaemon_FIND_REQUIRED )
ENDIF( LIBDAEMON_FOUND )